multi-threaded app hangs

Sudipto Biswas sudipto at alumnux.com
Wed Dec 10 03:48:58 EST 2003


Hi,

I have written a multi-threaded (about 8 threads) networking application with a text-mode interface. It writes to a trace-file in the background. Additionally I have also given some debug prints to STDOUT from different threads. The program runs fine on Python-2.2.2/RH 8.0.

But when I move to Python-2.2.2/RH-9.0 the program behaves oddly. It stops suddenly and *does not* give the continueous stream of expected output in STDOUT and tracefile.

On pressing ctrl-Z the hanged program gets suspended. On giving 'fg' command the suspended program comes to foreground, AND AGAIN RUNS FOR SOMETIMES (generates stream of text in STDOUT and tracefile) before it hangs again. This way ctrl-Z and 'fg' if pressed on hang, helps the program to run further.

I am using the 'Thread' class to create objects which run as separate threads.

Has anybody faced a similar problem?

Rgds,
Sudipto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20031210/d7c9326d/attachment.html>


More information about the Python-list mailing list