[ python-Bugs-579116 ] pthread_exit missing in thread_pthread.h

SourceForge.net noreply at sourceforge.net
Wed Dec 1 03:11:19 CET 2004


Bugs item #579116, was opened at 2002-07-09 10:45
Message generated for change (Comment added) made by facundobatista
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=579116&group_id=5470

Category: Threads
Group: Python 2.2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Pronath (micpro)
Assigned to: Nobody/Anonymous (nobody)
Summary: pthread_exit missing in thread_pthread.h

Initial Comment:

I'm using the Python 2.2.1 interpreter for scripting
language in a larger program. When I used the threading
module to create new threads, my main program did not
exit anymore, but hang, because one python thread
always remained.
It got much better when I inserted a call to
pthread_exit into do_PyThread_exit_thread
(thread_pthread.h).

Patchfile is attached.


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

Comment By: Facundo Batista (facundobatista)
Date: 2004-11-30 23:11

Message:
Logged In: YES 
user_id=752496

Please, could you verify if this problem persists in Python 2.3.4
or 2.4?

If yes, in which version? Can you provide a test case?

If the problem is solved, from which version?

Note that if you fail to answer in one month, I'll close this bug
as "Won't fix".

Thank you! 

.    Facundo

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

Comment By: Valeriy Pogrebitskiy (vpogrebi)
Date: 2003-11-06 11:55

Message:
Logged In: YES 
user_id=902722

I'm using Python 2.2.1 (Unix) in a daemon process that starts 
child threads to handle specific events. I have noticed that 
occasionally (not all the time) child thread "stays" (in a 
SLEEPING) status after thread exits. When this happens, that 
thread never exits until entire process is stopped.

I have log files that have output coming from threading 
module (I have set threading._VERBOSE to 1) that show each 
thread's start and termination events. In addition, I use 
Queue module for inter-thread communication (when thread 
starts execution, it posts "START" message, and when it is 
about to exit its run() method, it posts "END" event).

So, from these logs and from output of "ps -fp <PID> -
o 'user,pid,ppid,pgid,time,stime,lwp,s'" I can see that some 
threads exit (which is indicated by _VERBOSE output and a 
message in a Queue), but still stay (in a SLEEPING state) in 
the process.

Does this behavior have something to do with the problem 
described in this report, or is it something different?

Is there patch (full instalation package) that fixes this 
problem (without me having to update source code and 
recompile the executable)?

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

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-01-07 22:08

Message:
Logged In: YES 
user_id=33168

Michael do you still have this problem with 2.2.2 or do you
still require this patch?

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

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


More information about the Python-bugs-list mailing list