When I leave KTorrent 2.2.8 running for some days, its log files get full and get rotated. Unfortunately sometimes a KDE dialog appears asking whether to overwrite "log-1" with "log" (if I remember it correctly). Anyway, without user interaction (leaving the dialog open), KTorrent appears to start to consume large amounts of memory, which could render the machine unresponsive. Tracing the source code lead me to a part in libktorrent/util/autorotatelogjob.cpp which appears to try to move a file twice, resulting in a race: if (cnt == 1) { // move current log to 1 and zip it bt::Move(file,file + "-1",true); KIO::Job* sj = KIO::file_move(KURL::fromPathOrURL(file),KURL::fromPathOrURL(file + "-1"),-1,true,false,false); connect(sj,SIGNAL(result(KIO::Job*)),this,SLOT(moveJobDone(KIO::Job* ))); }
Created attachment 178605 [details, diff] ktorrent-logfile-race.diff A patch which will hopefully resolve this.
.
For what I cant tell, this is an upstream bug, so the proper place to report this is bugs.kde.org. In any case, check whether the 3.x.x versions still show this problem.
(In reply to comment #3) > For what I cant tell, this is an upstream bug, so the proper place to report > this is bugs.kde.org. In any case, check whether the 3.x.x versions still show > this problem. > I won't install an unstable KDE 4 for KTorrent version 3. A similar bug, but not the quite the same for that is reported here: https://bugs.kde.org/show_bug.cgi?id=168874 For version 2.2.8, I reported the bug here: https://bugs.kde.org/show_bug.cgi?id=184161 Anyway, the patch I submitted here earlier appears to work fine and I get no dialogs any more. So I'd still consider a revision bump with the patch given. Also consider the thread at the URL for this bug.
Upstream WONTFIX.
The thing is, I can apply your patch, but you should push it upstream no matter what. Are you telling me that upstream refuses to apply the patch? If so, for what reason? What is the URL for the bug report you opened upstream?
(In reply to comment #6) > The thing is, I can apply your patch, but you should push it upstream no matter > what. Are you telling me that upstream refuses to apply the patch? If so, for > what reason? What is the URL for the bug report you opened upstream? > As I stated in my previous comment, the URL is https://bugs.kde.org/show_bug.cgi?id=184161 Reason given for WONTFIX for that bug report is they don't develop the 2.2 series of KTorrent any more. It's also stated in http://ktorrent.org/?q=node/24 that 2.2.8 is and will be the final release for KDE 3.
OK, looks good, I'll try to get your patch tomorrow in the tree.
In CVS, thanks