os.path.abspath causes thread to freeze

"Martin v. Löwis" martin at v.loewis.de
Mon Dec 30 06:41:59 EST 2002

Austin Luminais wrote:
> It seems to work ok if I don't call abspath, but I'm worried what
> other hidden problems may exist with the threading in my program.  Is
> there some kind of thread locking issue with the os module?

I believe some of the calls in abspath release the interpreter lock, so 
that other threads could acquire it and run. If those threads then don't 
release the interpreter lock in a timely manner, the abspath call will 
block; this problem could exist for about any system call where Python 
releases the GIL. Of course, the bug is in that other thread which won't 
return the GIL.

To be really sure what is happening, you need to attach a debugger to 
the process and find out what all the threads are doing. Without that 
information, this is all guesswork.


More information about the Python-list mailing list