[Python-bugs-list] [ python-Bugs-497111 ] active_limbo_lock error at program exit

noreply@sourceforge.net noreply@sourceforge.net
Thu, 10 Jan 2002 04:46:14 -0800


Bugs item #497111, was opened at 2001-12-27 11:12
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=497111&group_id=5470

Category: Threads
Group: Python 2.1.2
Status: Open
Resolution: Fixed
Priority: 5
Submitted By: Simo Salminen (frangen)
Assigned to: Guido van Rossum (gvanrossum)
Summary: active_limbo_lock error at program exit

Initial Comment:
I'm running my threaded application, and now and then I get 
following error at exit. I'm using python 2.2 final, but I have had 
the same error with python 2.1. Unfortunately I cannot reproduce 
it. This bug has only occured when I've run the program under 
win2ksp2, tried to produce it under linux but without luck. My 
program is pure python application. I guess saving reference to 
_active_limbo_lock at Thread-class could solve the 
problem..
<error>
Traceback (most recent call last):
  File 
"C:\utils\PYTHON22\lib\threading.py", line 424, in 
__bootstrap
    self.__delete()
  File 
"C:\utils\PYTHON22\lib\threading.py", line 433, in __delete
    
_active_limbo_lock.acquire()
AttributeError: 'NoneType' 
object has no attribute 'acquire'
</error>

----------------------------------------------------------------------

>Comment By: Anthony Baxter (anthonybaxter)
Date: 2002-01-10 04:46

Message:
Logged In: YES 
user_id=29957

checked in to 2.1.2.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-12-28 14:07

Message:
Logged In: YES 
user_id=6380

I've checked in a fix that simply ignores the error in this
case: threading.py rev. 1.20.

This is a 2.1.2 and 2.2.1 bugfix candidate!


----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-12-28 06:35

Message:
Logged In: YES 
user_id=6380

Good.  I saw the same thing in a program, also one using
daemon threads. The daemon threads make this thing
understandable. I'll think of a fix.

----------------------------------------------------------------------

Comment By: Simo Salminen (frangen)
Date: 2001-12-27 14:21

Message:
Logged In: YES 
user_id=291461

Yes, program is running a mainthread and two daemon threads.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-12-27 11:51

Message:
Logged In: YES 
user_id=6380

Hm, this looks like it could happen when the treading module
is deleted while there are still threads running. But that
can only happen with daemon threads. Does your program have
daemon threads?

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=497111&group_id=5470