First time user - can't clone
skip at pobox.com
skip at pobox.com
Wed Nov 21 11:43:43 UTC 2007
Danek> Do the same test as you did for os, but use osutil instead:
Danek> python -c "import mercurial.osutil as os; print os.listdir('<directory>')"
Danek> And see what happens.
Ka-bam!
% python -c "import mercurial.osutil as os; print os.listdir('lockfile')"
[('', None), ('', None), ('', None)]
Exception exceptions.OSError: (2, 'No such file or directory', 'lockfile/') in 'garbage collection' ignored
Fatal Python error: unexpected exception during garbage collection
Abort (core dumped)
% cd lockfile
ink% python -c "import mercurial.osutil as os; print os.listdir('.')"
[('', None), ('', None), ('', None)]
Exception exceptions.OSError: (2, 'No such file or directory', './') in 'garbage collection' ignored
Fatal Python error: unexpected exception during garbage collection
Abort (core dumped)
My attempts to step through the code in a reasonable manner have so far been
thwarted by compiler optimization. If I have a chance later today at work
I'll try again.
In the meantime, I commented out the extension module setup for osutil.so,
rebuilt and reinstalled. "hg update -C tip" now works properly, so now too
does the clone command.
Danek> I'm a little confused, because the dtrace output indicates that
Danek> fstatat() is being called from the listdir() function, but at
Danek> least in my code, it's being called from statfiles(). Unless the
Danek> compiler is doing some tail call optimization that doesn't look
Danek> terribly likely, I can't really explain the stack.
As I indicated above, I had trouble seeing what was going on within gdb.
Stepping through the code was quite an exercise in guesswork. I would
execute a statement then try to print the assigned value. It would tell me
no such value existed. My guess is that gcc inlined listfiles and statfiles
into listdir. I'll probably rebuild with all optimization disabled so I
have a better chance.
Skip
More information about the Mercurial
mailing list