Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue1683] Thread local storage and PyGILState_* mucked up by os.fork()

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Jun 11, 2008, 2:26 PM

Post #1 of 5 (222 views)
Permalink
[issue1683] Thread local storage and PyGILState_* mucked up by os.fork()

Gregory P. Smith <greg [at] krypto> added the comment:

we need this in before 2.6 is released.

----------
assignee: -> gregory.p.smith
nosy: +gregory.p.smith
priority: high -> critical

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue1683>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 11, 2008, 3:59 PM

Post #2 of 5 (224 views)
Permalink
[issue1683] Thread local storage and PyGILState_* mucked up by os.fork() [In reply to]

Benjamin Peterson <musiccomposition [at] gmail> added the comment:

Gregory, go ahead and apply and see if can stop the hell in the buildbots.

----------
nosy: +benjamin.peterson

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue1683>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 11, 2008, 4:27 PM

Post #3 of 5 (226 views)
Permalink
[issue1683] Thread local storage and PyGILState_* mucked up by os.fork() [In reply to]

Adam Olsen <rhamph [at] gmail> added the comment:

Updated version of roudkerk's patch. Adds the new function to
pythread.h and is based off of current trunk.

Note that Parser/intrcheck.c isn't used on my box, so it's completely
untested.

roudkerk's original analysis is correct. The TLS is never informed that
the old thread is gone, so when it seems the same id again it assumes it
is the old thread, which PyThreadState_Swap doesn't like.

Added file: http://bugs.python.org/file10595/fork-thread-patch-2

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue1683>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 11, 2008, 4:57 PM

Post #4 of 5 (223 views)
Permalink
[issue1683] Thread local storage and PyGILState_* mucked up by os.fork() [In reply to]

Adam Olsen <rhamph [at] gmail> added the comment:

Incidentally, it doesn't seem necessary to reinitialize the lock. Posix
duplicates the lock, so if you hold it when you fork your child will be
able to unlock it and use it as normal. Maybe there's some non-Posix
behaviour or something even more obscure when #401226 was done?

(reinitializing is essentially harmless though, so in no way should this
hold up release.)

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue1683>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 12, 2008, 5:10 PM

Post #5 of 5 (211 views)
Permalink
[issue1683] Thread local storage and PyGILState_* mucked up by os.fork() [In reply to]

Benjamin Peterson <musiccomposition [at] gmail> added the comment:

I applied this in r64212.

----------
resolution: -> fixed
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue1683>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.