[Python-Dev] fun threading problem
On everyones favorite platform (HP-UX), the following code consistently fails: ### from thread import start_new_thread, allocate_lock from time import sleep def bootstrap(): from os import fork ; fork() allocate_lock().acquire() start_new_thread(bootstrap, ()) sleep(.1) ### The error is: Fatal Python error: Invalid thread state for this thread This code was whittled down from test_socketserver which fails in the same way. It doesn't matter what value is passed to sleep as long as it's greater than 0. I also tried changing the sleep to a while 1: pass and the same problem occurred. So there isn't a huge interaction of APIs, only: fork, allocate_lock.acquire and start_new_thread. HP-UX seems to be more sensitive to various threading issues. In Modules/_test_capimodule.c, I had to make this modification: Index: Modules/_testcapimodule.c === --- Modules/_testcapimodule.c (revision 51875) +++ Modules/_testcapimodule.c (working copy) @@ -665,6 +665,9 @@ PyThread_acquire_lock(thread_done, 1); /* wait for thread to finish */ Py_END_ALLOW_THREADS + /* Release lock we acquired above. This is required on HP-UX. */ + PyThread_release_lock(thread_done); + PyThread_free_lock(thread_done); Py_RETURN_NONE; } Without that patch, there would be this error: sem_destroy: Device busy sem_init: Device busy Fatal Python error: UNREF invalid object ABORT instruction (core dumped) Anyone have any ideas? n ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] fun threading problem
On Thu, Sep 14, 2006, Neal Norwitz wrote: > > On everyones favorite platform (HP-UX), the following code > consistently fails: Which exact HP-UX? I remember from my ancient days that each HP-UX version completely changes the way threading works -- dunno whether that's still true. -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ "LL YR VWL R BLNG T S" -- www.nancybuttons.com ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] fun threading problem
On 9/14/06, Aahz <[EMAIL PROTECTED]> wrote: > On Thu, Sep 14, 2006, Neal Norwitz wrote: > > > > On everyones favorite platform (HP-UX), the following code > > consistently fails: > > Which exact HP-UX? I remember from my ancient days that each HP-UX > version completely changes the way threading works -- dunno whether > that's still true. HP-UX 11i v2 on PA-RISC td191 on http://www.testdrive.hp.com/current.shtml ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Weekly Python Patch/Bug Summary
Patch / Bug Summary ___ Patches : 416 open ( +3) / 3408 closed ( +1) / 3824 total ( +4) Bugs: 898 open ( +1) / 6180 closed (+13) / 7078 total (+14) RFE : 234 open ( +0) / 238 closed ( +0) / 472 total ( +0) New / Reopened Patches __ email parser incorrectly breaks headers with a CRLF at 8192 (2006-09-10) http://python.org/sf/170 opened by Tony Meyer datetime's strftime limits strings to 127 chars (2006-09-12) http://python.org/sf/1557390 opened by Eric V. Smith Add RLIMIT_SBSIZE to resource module (2006-09-12) http://python.org/sf/1557515 opened by Eric Huss missing imports ctypes in documentation examples (2006-09-13) http://python.org/sf/1557890 opened by Daniele Varrazzo Patches Closed __ UserDict New Style (2006-09-08) http://python.org/sf/1555097 closed by rhettinger New / Reopened Bugs ___ Bug in the match function (2006-09-09) CLOSED http://python.org/sf/1555496 opened by wojtekwu Please include pliblist for all plattforms (2006-09-09) http://python.org/sf/101 opened by Guido Guenther sgmllib should allow angle brackets in quoted values (2006-06-11) http://python.org/sf/1504333 reopened by nnorwitz Move fpectl elsewhere in library reference (2006-09-11) http://python.org/sf/1556261 opened by Michael Hoffman datetime's strftime limits strings to 127 chars (2006-09-11) http://python.org/sf/1556784 opened by Eric V. Smith datetime's strftime limits strings to 127 chars (2006-09-12) CLOSED http://python.org/sf/1557037 opened by Eric V. Smith typo in encoding name in email package (2006-09-12) http://python.org/sf/1556895 opened by Guillaume Rousse 2.5c1 Core dump during 64-bit make on Solaris 9 Sparc (2006-09-12) http://python.org/sf/1557490 opened by Tony Bigbee xlc 6 does not like bufferobject.c line22 (2006-09-13) http://python.org/sf/1557983 opened by prueba uno apache2 - mod_python - python2.4 core dump (2006-09-14) CLOSED http://python.org/sf/1558223 opened by ThurnerRupert Tru64 make install failure (2006-09-14) http://python.org/sf/1558802 opened by Ralf W. Grosse-Kunstleve 2.5c2 macosx installer aborts during "GUI Applications" (2006-09-14) http://python.org/sf/1558983 opened by Evan Bugs Closed ___ datetime.datetime.now() mangles tzinfo (2006-09-06) http://python.org/sf/1553577 closed by nnorwitz __unicode__ breaks for exception class objects (2006-09-03) http://python.org/sf/1551432 closed by bcannon Bug in the match function (2006-09-09) http://python.org/sf/1555496 closed by tim_one Recently introduced sgmllib regexp bug hangs Python (2006-08-16) http://python.org/sf/1541697 closed by nnorwitz logging.handlers.RotatingFileHandler - inconsistent mode (2006-09-06) http://python.org/sf/1553496 closed by vsajip datetime's strftime limits strings to 127 chars (2006-09-12) http://python.org/sf/1557037 closed by ericvsmith apache2 - mod_python - python2.4 core dump (2006-09-13) http://python.org/sf/1558223 closed by nnorwitz ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
