msg15079 - (view) |
Author: Johan Fredrik Öhman (johanfo) |
Date: 2003-03-11 21:46 |
Bottom line: Some programs may lock up when spawned from a thread. >>> import thread, os >>> thread.start_new_thread(os.system, ("/usr/sbin/ntpdate ifi.uio.no",)) This starts a program "ntpdate" from a Python thread. Usually this is no problem. Ntpdate, is a simple program to adjust the clock of the system. However, when ntpdate is started from a thread it locks up and newer exits!! With my limited debugging knowledge, it sems as it hangs in a "poll()" kernel call, however, this could be misleading. (I used stacktrace -p ) |
|
|
msg15080 - (view) |
Author: Michael Hudson (mwh)  |
Date: 2003-03-12 12:40 |
Logged In: YES user_id=6656 IIRC, threads other than the main thread get a signal mask that blocks everything. That could be the problem, but I don't know what to do about it... What platform are you on? Linux? |
|
|
msg15081 - (view) |
Author: Johan Fredrik Öhman (johanfo) |
Date: 2003-03-12 16:12 |
Logged In: YES user_id=556425 I have verified this bug on both Redhat 8.0 and SuSE 8.1, linux yes. Signal is one possible path, filedescriptors another. I read somwhere that there was some issues with pthreads forking and filedescriptors. However, this is not my area (too low level).... |
|
|
msg15082 - (view) |
Author: Facundo Batista (facundobatista) *  |
Date: 2005-01-15 20:34 |
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 |
|
|
msg15083 - (view) |
Author: Facundo Batista (facundobatista) *  |
Date: 2005-01-15 20:34 |
Logged In: YES user_id=752496 Works ok for me: Python 2.3.4 (#1, Oct 26 2004, 16:42:40) [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import thread, os >>> thread.start_new_thread(os.system,("/usr/sbin/ntpdate ifi.uio.no",)) -1210684496 >>> |
|
|
msg15084 - (view) |
Author: Facundo Batista (facundobatista) *  |
Date: 2005-05-30 19:29 |
Logged In: YES user_id=752496 Deprecated. Reopen only if still happens in 2.3 or newer. . Facundo |
|
|