Bug 277076

Summary: KTorrent crashes while uploading on background.
Product: [Applications] ktorrent Reporter: jussi.kivilinna
Component: generalAssignee: Joris Guisson <joris.guisson>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description jussi.kivilinna 2011-07-04 15:39:15 UTC
Application: ktorrent (4.1.1)
KDE Platform Version: 4.5.5 (KDE 4.5.5)
Qt Version: 4.7.0
Operating System: Linux 2.6.39.2-jk1-ureadahead x86_64
Distribution: Ubuntu 10.10

-- Information about the crash:
- What I was doing when the application crashed:

KTorrent seeding/uploading on background. Same crash triggered average once per day.

-- Backtrace:
Application: KTorrent (ktorrent), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fc70ec01760 (LWP 8174))]

Thread 7 (Thread 0x7fc6ff94b700 (LWP 8175)):
#0  0x00007fc709e3f203 in poll () from /lib/libc.so.6
#1  0x00007fc704fbc009 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007fc704fbc7b5 in g_main_loop_run () from /lib/libglib-2.0.so.0
#3  0x00007fc7000823c4 in ?? () from /usr/lib/libgio-2.0.so.0
#4  0x00007fc704fe17e4 in ?? () from /lib/libglib-2.0.so.0
#5  0x00007fc70b7f1971 in start_thread () from /lib/libpthread.so.0
#6  0x00007fc709e4b92d in clone () from /lib/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7fc6ee3b1700 (LWP 8177)):
#0  0x00007fc70b7f6ad0 in pthread_getspecific () from /lib/libpthread.so.0
#1  0x00007fc704fe10f9 in g_thread_self () from /lib/libglib-2.0.so.0
#2  0x00007fc704fbc449 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007fc70bb9c1e6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007fc70bb6ea02 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007fc70bb6edec in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007fc70ba792fd in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007fc70e76b58a in utp::UTPServerThread::run() () from /usr/lib/libktorrent.so.3
#8  0x00007fc70ba7c27e in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007fc70b7f1971 in start_thread () from /lib/libpthread.so.0
#10 0x00007fc709e4b92d in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7fc6edbb0700 (LWP 8178)):
#0  0x00007fc709e3f203 in poll () from /lib/libc.so.6
#1  0x00007fc70e67db9a in net::Poll::poll(int) () from /usr/lib/libktorrent.so.3
#2  0x00007fc70e71a7b9 in dht::RPCServer::Private::run() () from /usr/lib/libktorrent.so.3
#3  0x00007fc70ba7c27e in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007fc70b7f1971 in start_thread () from /lib/libpthread.so.0
#5  0x00007fc709e4b92d in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7fc6e4c25700 (LWP 8206)):
#0  0x00007fc70b7f5a9c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fc70ba7b533 in ?? () from /usr/lib/libQtCore.so.4
#2  0x00007fc70ba76ee5 in QMutex::lock() () from /usr/lib/libQtCore.so.4
#3  0x00007fc70e673cba in net::SocketMonitor::lock() () from /usr/lib/libktorrent.so.3
#4  0x00007fc70e676e44 in net::DownloadThread::update() () from /usr/lib/libktorrent.so.3
#5  0x00007fc70e67777b in net::NetworkThread::run() () from /usr/lib/libktorrent.so.3
#6  0x00007fc70ba7c27e in ?? () from /usr/lib/libQtCore.so.4
#7  0x00007fc70b7f1971 in start_thread () from /lib/libpthread.so.0
#8  0x00007fc709e4b92d in clone () from /lib/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fc6e4424700 (LWP 8207)):
[KCrash Handler]
#6  0x00007fc70ba76dd9 in QMutex::lock() () from /usr/lib/libQtCore.so.4
#7  0x00007fc70e67434a in QMutexLocker::QMutexLocker(QMutex*) () from /usr/lib/libktorrent.so.3
#8  0x00007fc70e6a53f8 in bt::PacketWriter::hasBytesToWrite() const () from /usr/lib/libktorrent.so.3
#9  0x00007fc70e6833f2 in mse::StreamSocket::hasBytesToWrite() const () from /usr/lib/libktorrent.so.3
#10 0x00007fc70e6760f7 in net::BufferedSocket::bytesReadyToWrite() const () from /usr/lib/libktorrent.so.3
#11 0x00007fc70e675ded in net::UploadThread::waitForSocketsReady() () from /usr/lib/libktorrent.so.3
#12 0x00007fc70e675a5b in net::UploadThread::update() () from /usr/lib/libktorrent.so.3
#13 0x00007fc70e67777b in net::NetworkThread::run() () from /usr/lib/libktorrent.so.3
#14 0x00007fc70ba7c27e in ?? () from /usr/lib/libQtCore.so.4
#15 0x00007fc70b7f1971 in start_thread () from /lib/libpthread.so.0
#16 0x00007fc709e4b92d in clone () from /lib/libc.so.6
#17 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fc6e3c23700 (LWP 8208)):
#0  0x00007fc709e3d72d in read () from /lib/libc.so.6
#1  0x00007fc709dd8278 in _IO_file_underflow () from /lib/libc.so.6
#2  0x00007fc709dd9dfe in _IO_default_uflow () from /lib/libc.so.6
#3  0x00007fc709dce32e in _IO_getline_info () from /lib/libc.so.6
#4  0x00007fc709dcd209 in fgets () from /lib/libc.so.6
#5  0x00007fc6e3220fcb in ?? () from /lib/libnss_mdns4.so.2
#6  0x00007fc6e3221435 in _nss_mdns4_gethostbyaddr_r () from /lib/libnss_mdns4.so.2
#7  0x00007fc709e66578 in gethostbyaddr_r () from /lib/libc.so.6
#8  0x00007fc709e6cb6b in getnameinfo () from /lib/libc.so.6
#9  0x00007fc70e67c3f7 in net::ReverseResolver::resolve(net::Address const&) () from /usr/lib/libktorrent.so.3
#10 0x00007fc70e67c472 in net::ReverseResolver::run() () from /usr/lib/libktorrent.so.3
#11 0x00007fc70e67c9f6 in net::ReverseResolverThread::run() () from /usr/lib/libktorrent.so.3
#12 0x00007fc70ba7c27e in ?? () from /usr/lib/libQtCore.so.4
#13 0x00007fc70b7f1971 in start_thread () from /lib/libpthread.so.0
#14 0x00007fc709e4b92d in clone () from /lib/libc.so.6
#15 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fc70ec01760 (LWP 8174)):
#0  0x00007fc70b7f5a9c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fc70ba7b533 in ?? () from /usr/lib/libQtCore.so.4
#2  0x00007fc70ba76ee5 in QMutex::lock() () from /usr/lib/libQtCore.so.4
#3  0x00007fc70e67434a in QMutexLocker::QMutexLocker(QMutex*) () from /usr/lib/libktorrent.so.3
#4  0x00007fc70e673edf in net::SocketMonitor::remove(net::BufferedSocket*) () from /usr/lib/libktorrent.so.3
#5  0x00007fc70e6829f7 in mse::StreamSocket::stopMonitoring() () from /usr/lib/libktorrent.so.3
#6  0x00007fc70e693189 in bt::Peer::~Peer() () from /usr/lib/libktorrent.so.3
#7  0x00007fc70e69df42 in void qDeleteAll<QList<bt::Peer*>::const_iterator>(QList<bt::Peer*>::const_iterator, QList<bt::Peer*>::const_iterator) () from /usr/lib/libktorrent.so.3
#8  0x00007fc70e69ce7b in void qDeleteAll<QList<bt::Peer*> >(QList<bt::Peer*> const&) () from /usr/lib/libktorrent.so.3
#9  0x00007fc70e698a65 in bt::PeerManager::clearDeadPeers() () from /usr/lib/libktorrent.so.3
#10 0x00007fc70e6e7d6a in bt::TorrentControl::update() () from /usr/lib/libktorrent.so.3
#11 0x0000000000433e12 in _start ()

Possible duplicates by query: bug 270127, bug 270109, bug 259046.

Reported using DrKonqi
Comment 1 Joris Guisson 2011-07-11 08:29:51 UTC
Git commit bda1e6623169bf2224da02d0e08f232007cf72af by Joris Guisson.
Committed on 11/07/2011 at 10:29.
Pushed by guisson into branch 'master'.

Fix crash when cleaning up mse::StreamSocket

BUG: 277076

M  +1    -0    ChangeLog     
M  +2    -2    src/mse/streamsocket.cpp     

http://commits.kde.org/libktorrent/bda1e6623169bf2224da02d0e08f232007cf72af
Comment 2 Joris Guisson 2011-07-11 08:31:14 UTC
Git commit cd05ea66b59a2f90022db67dbcc5e14b3b950d35 by Joris Guisson.
Committed on 11/07/2011 at 10:29.
Pushed by guisson into branch '1.1'.

Backport to 1.1: Fix crash when cleaning up mse::StreamSocket

CCBUG: 277076

M  +1    -0    ChangeLog     
M  +2    -2    src/mse/streamsocket.cpp     

http://commits.kde.org/libktorrent/cd05ea66b59a2f90022db67dbcc5e14b3b950d35