Summary: | Ktorrent crash when moving data from one partition to the another | ||
---|---|---|---|
Product: | [Applications] ktorrent | Reporter: | Dave Plater <dplater> |
Component: | general | Assignee: | Joris Guisson <joris.guisson> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
As requested
ktorrent log tail when using valgrind I plead sleep deprivation. |
Description
Dave Plater
2010-12-29 13:06:38 UTC
*** Bug 262560 has been marked as a duplicate of this bug. *** Would it be possible to run ktorrent under valgrind ? valgrind --tool=memcheck --num-callers=40 --log-file=vg.log /usr/bin/ktorrent --nofork Run it until it crashes, then post the vg.log file here. Note that, running under valgrind is slow. Created attachment 55982 [details]
As requested
I've also noticed that the column headers for the peers display intermittently become greyed out and unusable, at the same time the right click context menu only shows a shadow of a box in the cell where the mouse pointer is and an empty almost collapsed rectangle where the kick/ban peer context menu should be.
Created attachment 55983 [details]
ktorrent log tail when using valgrind
Just in case it's useful, I tailed the ktorrent log almost from the start of valgrind (it gave me something to look at while ktorrent slowly started).
Another factor to take into consideration is that I was seeding a private torrent.
If you look at the ktorrent log, the end contains the same output as valgrind when the crash happened. BTW I've just noticed that this bug is for the checking/unchecking "move when completed" box. This no longer causes a crash only the superseeding check box. One more comment : The right click individual torrent box originally had a greyed out "Use dht to get more peers" and "Use peer exchange to get more peers" check boxes. I've just noticed that they have also come to the foreground and are usable. Ok I've just confirmed that the crash only happens with private torrents from : http://www.scenetime.com/ and http://thebox.bz which are the only private torrent sites I use. I can check/uncheck the superseeding box with public torrents with no ill effects, also the individual dht and peer exchange check boxes work with public torrents but not with the private ones. The problem with the intermittent column geaders in peers display is most probably also isolated to private torrents as I haven't noticed it in public ones but I can't confirm. And the vg.log file ? Created attachment 56016 [details]
I plead sleep deprivation.
This bug is for ktorrent-4.1beta1 and libktorrent-1.1beta1 commit d467159e12b408d6713ee618a6ec895ff9f936ee branch master Author: Joris <joris.guisson@gmail.com> Date: Fri Jan 14 21:19:37 2011 +0100 Fix crash due to not properly cleaning up peers and everything related when switching to superseeding mode. BUG: 261529 diff --git a/ChangeLog b/ChangeLog index c85fc6b..1b3604f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ Changes in 1.1rc1: - Fix crash due to manipulating timers in the wrong thread (261903) - Fix compiler warning in TimeEstimator (262618) - Fix crash due to cleaning up timer in the wrong thread (260712) + - Fix crash due to not properly cleaning up Peers and everything related when switching to superseeding mode (261529) Changes in 1.1beta1: - Use UTF-8 as default codec in bt::Value::toString diff --git a/src/peer/peermanager.cpp b/src/peer/peermanager.cpp index fd5084d..42a2138 100644 --- a/src/peer/peermanager.cpp +++ b/src/peer/peermanager.cpp @@ -430,6 +430,8 @@ namespace bt delete d->superseeder; d->superseeder = 0; } + + closeAllConnections(); } Peer* PeerManager::findPeer(Uint32 peer_id) @@ -548,6 +550,7 @@ namespace bt void PeerManager::setSuperSeeding(bool on,const BitSet & chunks) { + Q_UNUSED(chunks); if ((d->superseeder && on) || (!d->superseeder && !on)) return; @@ -571,9 +574,8 @@ namespace bt pp.port = addr.port(); pp.local = false; d->potential_peers.insert(std::make_pair(pp.ip,pp)); + p->kill(); } - - closeAllConnections(); } void PeerManager::allowChunk(PeerInterface* peer, Uint32 chunk) diff --git a/src/torrent/torrentcontrol.cpp b/src/torrent/torrentcontrol.cpp index 28368d3..fbb1378 100644 --- a/src/torrent/torrentcontrol.cpp +++ b/src/torrent/torrentcontrol.cpp @@ -496,8 +496,6 @@ namespace bt pman->savePeerList(tordir + "peer_list"); pman->stop(); - pman->closeAllConnections(); - pman->clearDeadPeers(); cman->stop(); stats.running = false; commit ec3824566b0183233d90e29a281f172d6d2afe6f branch 1.1 Author: Joris <joris.guisson@gmail.com> Date: Fri Jan 14 21:19:37 2011 +0100 Merge to 1.1: Fix crash due to not properly cleaning up peers and everything related when switching to superseeding mode. CCBUG: 261529 diff --git a/ChangeLog b/ChangeLog index cebc1cc..90ed190 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ Changes in 1.1rc1: - Fix crash due to manipulating timers in the wrong thread (261903) - Fix compiler warning in TimeEstimator (262618) - Fix crash due to cleaning up timer in the wrong thread (260712) + - Fix crash due to not properly cleaning up Peers and everything related when switching to superseeding mode (261529) Changes in 1.1beta1: - Use UTF-8 as default codec in bt::Value::toString diff --git a/src/peer/peermanager.cpp b/src/peer/peermanager.cpp index fd5084d..42a2138 100644 --- a/src/peer/peermanager.cpp +++ b/src/peer/peermanager.cpp @@ -430,6 +430,8 @@ namespace bt delete d->superseeder; d->superseeder = 0; } + + closeAllConnections(); } Peer* PeerManager::findPeer(Uint32 peer_id) @@ -548,6 +550,7 @@ namespace bt void PeerManager::setSuperSeeding(bool on,const BitSet & chunks) { + Q_UNUSED(chunks); if ((d->superseeder && on) || (!d->superseeder && !on)) return; @@ -571,9 +574,8 @@ namespace bt pp.port = addr.port(); pp.local = false; d->potential_peers.insert(std::make_pair(pp.ip,pp)); + p->kill(); } - - closeAllConnections(); } void PeerManager::allowChunk(PeerInterface* peer, Uint32 chunk) diff --git a/src/torrent/torrentcontrol.cpp b/src/torrent/torrentcontrol.cpp index 36748b6..72981d6 100644 --- a/src/torrent/torrentcontrol.cpp +++ b/src/torrent/torrentcontrol.cpp @@ -496,8 +496,6 @@ namespace bt pman->savePeerList(tordir + "peer_list"); pman->stop(); - pman->closeAllConnections(); - pman->clearDeadPeers(); cman->stop(); stats.running = false; Confirm patched libktorrent works and submitted to openSUSE KDE:Factory:Desktop |