`<div dir="ltr">Here is the code. It will run just fine with Debian 8.6 or OmniOS. It will fail on the LX zone with Debian. The only way for it to fail is for the stat call to fail and this seems to happen because the system doen't know what directory it is in. The files being looked at are static so not a race condition.<div><br></div><div>Simple python script.<br><div><br></div><div><div># read a directory, stat all files</div><div><br></div><div>import os</div><div>import sys</div><div>from stat import *</div><div><br></div><div>def walk(d):</div><div> os.chdir(d)</div><div> working = os.getcwd()</div><div> print working</div><div> dirlist = os.listdir('.')</div><div> dirlist.sort()</div><div> for f in dirlist:</div><div> try:</div><div> s = os.lstat(f)</div><div> if S_ISDIR(s.st_mode):</div><div> walk(f)</div><div> except OSError, err:</div><div> print "CurrentDIR: " + working</div><div> print "CurrentFile: " + f</div><div> print err</div><div> os.chdir('..')</div><div> print "DONE"</div><div><br></div><div>if len(sys.argv) != 2:</div><div> print 'need 1 arg, directory to scan'</div><div><br></div><div>cwd = os.getcwd()</div><div>os.chdir(sys.argv[1])</div><div>walk('.')</div></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 13, 2017 at 3:52 PM, Dale Ghent <span dir="ltr"><<a href="mailto:daleg@omniti.com" target="_blank">daleg@omniti.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Could you provide some of your telemetry and background here? There might be a reasonable explanation, or a quick fix.<br>
<span class="HOEnZb"><font color="#888888"><br>
/dale<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Jan 13, 2017, at 3:12 PM, Mini Trader <<a href="mailto:miniflowtrader@gmail.com">miniflowtrader@gmail.com</a>> wrote:<br>
><br>
> I have a small program that will reproduce the issue. Where should the bug be sent? It's pretty serious. The system is forgetting the location of the current working directory in a recursive call.<br>
><br>
> On Fri, Jan 13, 2017 at 9:30 AM, Nahum Shalman <<a href="mailto:nshalman@omniti.com">nshalman@omniti.com</a>> wrote:<br>
> Have you tried simply tracing the lx-syscall probes?<br>
><br>
> On Fri, Jan 13, 2017 at 9:24 AM, Mini Trader <<a href="mailto:miniflowtrader@gmail.com">miniflowtrader@gmail.com</a>> wrote:<br>
> I followed these instructions prior to my post and my zone would not boot after doing the mod to add the flag to the file.<br>
><br>
><br>
> On Fri, Jan 13, 2017 at 8:55 AM Nahum Shalman <<a href="mailto:nshalman@omniti.com">nshalman@omniti.com</a>> wrote:<br>
> The short answer is yes.<br>
><br>
> My experience debugging LX was on SmartOS and there are some notes on <a href="https://wiki.smartos.org/display/DOC/LX+Branded+Zones#LXBrandedZones-Debugging" rel="noreferrer" target="_blank">https://wiki.smartos.org/<wbr>display/DOC/LX+Branded+Zones#<wbr>LXBrandedZones-Debugging</a><br>
><br>
> Some of the details on that page are Specific to SmartOS, but some of it is generic to LX.<br>
><br>
> -Nahum<br>
><br>
> On Fri, Jan 13, 2017 at 12:46 AM, Mini Trader <<a href="mailto:miniflowtrader@gmail.com">miniflowtrader@gmail.com</a>> wrote:<br>
> Is there anything that can be done to trace a program having issues on an LX Zone.<br>
><br>
> I am seeing:<br>
><br>
> OSError: [Errno 2] No such file or directory:<br>
><br>
> Again under certain conditions which I am trying to trace - unfortunately this is a closed source program. Can DTrace be used to help track something like this?<br>
><br>
> Thanks!<br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
><br>
><br>
> OmniOS-discuss mailing list<br>
><br>
><br>
> <a href="mailto:OmniOS-discuss@lists.omniti.com">OmniOS-discuss@lists.omniti.<wbr>com</a><br>
><br>
><br>
> <a href="http://lists.omniti.com/mailman/listinfo/omnios-discuss" rel="noreferrer" target="_blank">http://lists.omniti.com/<wbr>mailman/listinfo/omnios-<wbr>discuss</a><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> OmniOS-discuss mailing list<br>
> <a href="mailto:OmniOS-discuss@lists.omniti.com">OmniOS-discuss@lists.omniti.<wbr>com</a><br>
> <a href="http://lists.omniti.com/mailman/listinfo/omnios-discuss" rel="noreferrer" target="_blank">http://lists.omniti.com/<wbr>mailman/listinfo/omnios-<wbr>discuss</a><br>
<br>
</div></div></blockquote></div><br></div>
`