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.

Simple python script.

# read a directory, stat all files

import os
import sys
from stat import *

def walk(d):
    os.chdir(d)
    working = os.getcwd()
    print working
    dirlist = os.listdir('.')
    dirlist.sort()
    for f in dirlist:
        try:
            s = os.lstat(f)
            if S_ISDIR(s.st_mode):
                walk(f)
        except OSError, err:
            print "CurrentDIR: " + working
            print "CurrentFile: " + f
            print err
    os.chdir('..')
    print "DONE"

if len(sys.argv) != 2:
    print 'need 1 arg, directory to scan'

cwd = os.getcwd()
os.chdir(sys.argv[1])
walk('.')


On Fri, Jan 13, 2017 at 3:52 PM, Dale Ghent <da...@omniti.com> wrote:

> Could you provide some of your telemetry and background here? There might
> be a reasonable explanation, or a quick fix.
>
> /dale
>
> > On Jan 13, 2017, at 3:12 PM, Mini Trader <miniflowtra...@gmail.com>
> wrote:
> >
> > 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.
> >
> > On Fri, Jan 13, 2017 at 9:30 AM, Nahum Shalman <nshal...@omniti.com>
> wrote:
> > Have you tried simply tracing the lx-syscall probes?
> >
> > On Fri, Jan 13, 2017 at 9:24 AM, Mini Trader <miniflowtra...@gmail.com>
> wrote:
> > 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.
> >
> >
> > On Fri, Jan 13, 2017 at 8:55 AM Nahum Shalman <nshal...@omniti.com>
> wrote:
> > The short answer is yes.
> >
> > My experience debugging LX was on SmartOS and there are some notes on
> https://wiki.smartos.org/display/DOC/LX+Branded+Zones#
> LXBrandedZones-Debugging
> >
> > Some of the details on that page are Specific to SmartOS, but some of it
> is generic to LX.
> >
> > -Nahum
> >
> > On Fri, Jan 13, 2017 at 12:46 AM, Mini Trader <miniflowtra...@gmail.com>
> wrote:
> > Is there anything that can be done to trace a program having issues on
> an LX Zone.
> >
> > I am seeing:
> >
> > OSError: [Errno 2] No such file or directory:
> >
> > 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?
> >
> > Thanks!
> >
> >
> >
> > _______________________________________________
> >
> >
> > OmniOS-discuss mailing list
> >
> >
> > OmniOS-discuss@lists.omniti.com
> >
> >
> > http://lists.omniti.com/mailman/listinfo/omnios-discuss
> >
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > OmniOS-discuss mailing list
> > OmniOS-discuss@lists.omniti.com
> > http://lists.omniti.com/mailman/listinfo/omnios-discuss
>
>
_______________________________________________
OmniOS-discuss mailing list
OmniOS-discuss@lists.omniti.com
http://lists.omniti.com/mailman/listinfo/omnios-discuss

Reply via email to