Bugs item #701836, was opened at 2003-03-11 18:46 Message generated for change (Comment added) made by facundobatista You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=701836&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.2.2 >Status: Closed >Resolution: Wont Fix Priority: 5 Submitted By: Johan Fredrik Öhman (johanfo) Assigned to: Nobody/Anonymous (nobody) Summary: Thread running (os.system or popen#) Initial Comment: 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 <pid>) ---------------------------------------------------------------------- Comment By: Facundo Batista (facundobatista) Date: 2005-05-30 16:29 Message: Logged In: YES user_id=752496 Deprecated. Reopen only if still happens in 2.3 or newer. . Facundo ---------------------------------------------------------------------- Comment By: Facundo Batista (facundobatista) Date: 2005-01-15 17:34 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: Facundo Batista (facundobatista) Date: 2005-01-15 17:34 Message: 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 >>> ---------------------------------------------------------------------- Comment By: Johan Fredrik Öhman (johanfo) Date: 2003-03-12 13:12 Message: 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).... ---------------------------------------------------------------------- Comment By: Michael Hudson (mwh) Date: 2003-03-12 09:40 Message: 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? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=701836&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com