multi-threaded app hangs

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sudipto Biswas

    multi-threaded app hangs

    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

  • Peter Hansen

    #2
    Re: multi-threaded app hangs

    > Sudipto Biswas wrote:[color=blue]
    >
    > I have written a multi-threaded (about 8 threads) networking application [snip]
    > 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.[/color]
    [snip]

    I vaguely recall a comment somewhere about the threading model changing
    in Redhat 9.0. Could this be the cause? Maybe somebody else will have
    a specific reference, or you could try Google.

    -Peter

    Comment

    Working...