`<div dir="ltr">Here is the strace. Which shows the underlying libc call failing. chdir would have failed if the directory was not there. Maybe a race condition going on here? Does this now become a Linux bug?<div><br></div><div>I've even made a call to pwd in the exception and it does not fail.<br><div><br></div><div><div>lstat("ParameterSet", {st_mode=S_IFDIR|0777, st_size=4, ...}) = 0</div><div>chdir("ParameterSet") = 0</div><div>write(1, "'/main/documents/oneofmydirectories"..., 101'/main/documents/oneofmydirectories/ParameterSet'</div><div>) = 101</div><div>getcwd(0x7fffffefebc0, 1026) = -1 ENOENT (No such file or directory)</div><div>write(1, "[Errno 2] No such file or direct"..., 36[Errno 2] No such file or directory</div><div>) = 36</div></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 14, 2017 at 10:02 AM, Mini Trader <span dir="ltr"><<a href="mailto:miniflowtrader@gmail.com" target="_blank">miniflowtrader@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I just tried on CentOS same error. The directory has to be from LOFS i.e. a ZFS pool.<div><br></div><div>From OmniOS can you output zfs get all zonefileset and /usr/bin/ls -lV zonedirectory and share your results.</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Sat, Jan 14, 2017 at 9:35 AM, Natxo Asenjo <span dir="ltr"><<a href="mailto:natxo.asenjo@gmail.com" target="_blank">natxo.asenjo@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">hi,<div><div class="m_4362928231035466078h5"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 14, 2017 at 3:16 PM, Mini Trader <span dir="ltr"><<a href="mailto:miniflowtrader@gmail.com" target="_blank">miniflowtrader@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Well the author at my request was able to remove the call to os.getcwd() which allows the program to operate.<div><br></div><div><br></div><div>If anyone wants to tinker here is an example that will likely break on someones system. I don't know if this is an LX bug, libc bug, python bug etc.</div><div><br></div><div><span><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></span><div>def chdir(d):</div><div> global cwdlist</div><div><br></div><div> if d != '.':</div><div> os.chdir(d)</div><div> if d == '..':</div><div> cwdlist.pop()</div><div> else:</div><div> cwdlist.append(d)</div><div> print repr('/'.join(cwdlist))</div><div> # Comment the line below to allow things to run</div><div> os.getcwd()</div><div><br></div><div>def walk(d):</div><div> chdir(d)</div><span><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></span><div> print err</div><div> chdir('..')</div><span><div><br></div><div>if len(sys.argv) != 2:</div><div> print 'need 1 arg, directory to scan'</div><div><br></div></span><div>os.chdir(sys.argv[1])</div><div>cwd = os.getcwd()</div><div>cwdlist = cwd.split('/')</div><div><br></div><div>walk('.')</div></div><div><br></div></div></blockquote></div><br></div></div></div><div class="gmail_extra">runs fine in a centos 6.8 container, no problem.<br><br></div><div class="gmail_extra">I even have a couple of mount points with several thousand files and it walks everything without a hitch.<span class="m_4362928231035466078HOEnZb"><font color="#888888"><br><br>-- <br></font></span></div><span class="m_4362928231035466078HOEnZb"><font color="#888888"><div class="gmail_extra">regards,<br></div><div class="gmail_extra">Natxo<br></div><div class="gmail_extra"><br><br></div></font></span></div>
<br></div></div><span class="">______________________________<wbr>_________________<br>
OmniOS-discuss mailing list<br>
<a href="mailto:OmniOS-discuss@lists.omniti.com" target="_blank">OmniOS-discuss@lists.omniti.co<wbr>m</a><br>
<a href="http://lists.omniti.com/mailman/listinfo/omnios-discuss" rel="noreferrer" target="_blank">http://lists.omniti.com/mailma<wbr>n/listinfo/omnios-discuss</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br></div>
`