Version: (using KDE KDE 3.2.0) Installed from: Compiled From Sources Compiler: gcc 3.4 prerelease and gcc 3.3.2 OS: Linux Kget does not work on my machine with RedHat 9. It does not crash in the strong sense, but it hangs forever in a call to QThread::wait(). This behavoiur is not deterministic. Sometimes it hangs after the first download, sometimes during the second, but at least before the fifth one it hangs. This results from a IMHO unappropriate use of a condition variable, QThread::terminate() and QThread::wait(). The patch in the next message solves the problem. The patch was made against the actual CVS KDE_3_2_BRANCH. Kget hangs because QThread::terminate() is called and the thread does not reach a cancellable state. The patch is a first step to a correct solution. Because it waits on the mutex for new jobs, the thread can be cancelled by QThread::terminate(). Some additional remarks: - QWaitCondition::wait(int) should not be used. - QThread::terminate() should not be used at all. A better solution would be to define a TERMINATE Slavecommand. The slave exits Slave::run() when this command is emitted. I could not find out how Slave::slotResult is called and which thread is responsible for what, but I think Slave::slotResult is the appropriate Place to send such a command to the Slave. - Is there a design document which explains how threads are used in kget? After looking only at slave.h, slave.cpp and transfer.cpp a little bit, it seems that threads are not necessary at all.
Created attachment 4860 [details] First step solution This bug is not a normal bug is a crash.
Maybe this bug is a duplicate of a lot of other hang, crash bugs. Especially it uses another solution to the problem than Thomas Zell in Bug #74597
Created attachment 4956 [details] patch for Thread ! This patch probably correct your this bug ! Can You test it ? Bye
I can confirm that I've periodically seen KGet get hung up on RedHat 9. I'll go ahead and mark it as a dup of 74597 as well. *** This bug has been marked as a duplicate of 74597 ***