This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KTorrent 2.2.8 log file race

Tags: None
(comma "," separated)
J
Registered Member
Posts
86
Karma
0

KTorrent 2.2.8 log file race

Thu Jan 15, 2009 1:19 pm
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:

Code: Select all
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* )));
}


I know that you won't likely be relasing a new version for KDE 3, but as I'm using KDE 3.5.10 which is currently the latest "Stable" KDE version in Gentoo, I still hope to fix this issue under Gentoo. So please tell me whether I'm on the right track or whether there's a way to turn off that logging completely as a workaround?


Thank you KTorrent developers! :)
_________________
"Thou shalt not steal." - STOP PIRACY NOW!
George
Moderator
Posts
5421
Karma
1

Thu Jan 15, 2009 1:57 pm
That looks like the bug
J
Registered Member
Posts
86
Karma
0

Thu Jan 15, 2009 5:32 pm
Ok, I submitted a bugreport at Gentoo with a patch hopefully fixing this.


Thank you KTorrent developers! :)
_________________
"Thou shalt not steal." - STOP PIRACY NOW!


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar