Bug 245796

Summary: KTorrent regular crash
Product: [Applications] ktorrent Reporter: Alexey Shildyakov <ashl1future>
Component: generalAssignee: Joris Guisson <joris.guisson>
Status: RESOLVED FIXED    
Severity: crash CC: EssL.main, graham, kde
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Another backtrace

Description Alexey Shildyakov 2010-07-26 16:45:02 UTC
Application: ktorrent (4.0.2)
KDE Platform Version: 4.4.5 (KDE 4.4.5) (Compiled from sources)
Qt Version: 4.6.3
Operating System: Linux 2.6.33-gentoo x86_64
Distribution (Platform): Gentoo Packages

-- Information about the crash:
KTorrent crashed sometimes

The crash can be reproduced some of the time.

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

Thread 9 (Thread 0x7f1c79211710 (LWP 19109)):
#0  0x00007f1c804e5d83 in g_main_context_iterate (context=0x22a11c0, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2573
#1  0x00007f1c804e62e2 in IA__g_main_context_iteration (context=0x22a11c0, may_block=1) at gmain.c:2654
#2  0x00007f1c85f7141e in QEventDispatcherGlib::processEvents (this=0x228ed10, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#3  0x00007f1c85f467f2 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#4  0x00007f1c85f46bbd in QEventLoop::exec (this=0x7f1c79210dd0, flags=) at kernel/qeventloop.cpp:201
#5  0x00007f1c85e579db in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:487
#6  0x00007f1c8851e028 in utp::UTPServerThread::run (this=0x23334a0) at /var/tmp/portage/net-libs/libktorrent-1.0.2/work/libktorrent-1.0.2/src/utp/utpserverthread.cpp:44
#7  0x00007f1c85e5a0b5 in QThreadPrivate::start (arg=0x23334a0) at thread/qthread_unix.cpp:248
#8  0x00007f1c85bca944 in start_thread (arg=<value optimized out>) at pthread_create.c:297
#9  0x00007f1c844d61dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 8 (Thread 0x7f1c79a12710 (LWP 19114)):
#0  0x00007f1c844cf913 in select () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007f1c884e8602 in dht::RPCServerThread::run (this=0x235b420) at /var/tmp/portage/net-libs/libktorrent-1.0.2/work/libktorrent-1.0.2/src/dht/rpcserver.cpp:107
#2  0x00007f1c85e5a0b5 in QThreadPrivate::start (arg=0x235b420) at thread/qthread_unix.cpp:248
#3  0x00007f1c85bca944 in start_thread (arg=<value optimized out>) at pthread_create.c:297
#4  0x00007f1c844d61dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 7 (Thread 0x7f1c6a6e1710 (LWP 19174)):
#0  pthread_cond_timedwait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:211
#1  0x00007f1c85e59a3a in thread_sleep (ti=0x7f1c6a6e0da0) at thread/qthread_unix.cpp:398
#2  0x00007f1c85e59b90 in QThread::msleep (msecs=<value optimized out>) at thread/qthread_unix.cpp:424
#3  0x00007f1c8847b1ed in net::DownloadThread::update (this=0x226b160) at /var/tmp/portage/net-libs/libktorrent-1.0.2/work/libktorrent-1.0.2/src/net/downloadthread.cpp:91
#4  0x00007f1c8847bae9 in net::NetworkThread::run (this=0x226b160) at /var/tmp/portage/net-libs/libktorrent-1.0.2/work/libktorrent-1.0.2/src/net/networkthread.cpp:48
#5  0x00007f1c85e5a0b5 in QThreadPrivate::start (arg=0x226b160) at thread/qthread_unix.cpp:248
#6  0x00007f1c85bca944 in start_thread (arg=<value optimized out>) at pthread_create.c:297
#7  0x00007f1c844d61dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 6 (Thread 0x7f1c69ee0710 (LWP 19175)):
#0  pthread_cond_timedwait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:211
#1  0x00007f1c85e59a3a in thread_sleep (ti=0x7f1c69edfda0) at thread/qthread_unix.cpp:398
#2  0x00007f1c85e59b90 in QThread::msleep (msecs=<value optimized out>) at thread/qthread_unix.cpp:424
#3  0x00007f1c8847a115 in net::UploadThread::update (this=0x226b7b0) at /var/tmp/portage/net-libs/libktorrent-1.0.2/work/libktorrent-1.0.2/src/net/uploadthread.cpp:89
#4  0x00007f1c8847bae9 in net::NetworkThread::run (this=0x226b7b0) at /var/tmp/portage/net-libs/libktorrent-1.0.2/work/libktorrent-1.0.2/src/net/networkthread.cpp:48
#5  0x00007f1c85e5a0b5 in QThreadPrivate::start (arg=0x226b7b0) at thread/qthread_unix.cpp:248
#6  0x00007f1c85bca944 in start_thread (arg=<value optimized out>) at pthread_create.c:297
#7  0x00007f1c844d61dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 5 (Thread 0x7f1c696df710 (LWP 19176)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f1c85e5b0ab in QWaitConditionPrivate::wait (this=<value optimized out>, mutex=0x7f1c741c3580, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:87
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x7f1c741c3580, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:159
#3  0x00007f1c8847f372 in net::ReverseResolverThread::run (this=0x7f1c741c3570) at /var/tmp/portage/net-libs/libktorrent-1.0.2/work/libktorrent-1.0.2/src/net/reverseresolver.cpp:123
#4  0x00007f1c85e5a0b5 in QThreadPrivate::start (arg=0x7f1c741c3570) at thread/qthread_unix.cpp:248
#5  0x00007f1c85bca944 in start_thread (arg=<value optimized out>) at pthread_create.c:297
#6  0x00007f1c844d61dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 4 (Thread 0x7f1c6b0e8710 (LWP 20432)):
#0  pthread_cond_timedwait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:211
#1  0x00007f1c85e5b03d in QWaitConditionPrivate::wait (this=<value optimized out>, mutex=0x5981250, time=30000) at thread/qwaitcondition_unix.cpp:85
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x5981250, time=30000) at thread/qwaitcondition_unix.cpp:159
#3  0x00007f1c85e500a8 in QThreadPoolThread::run (this=0x4b80c90) at concurrent/qthreadpool.cpp:140
#4  0x00007f1c85e5a0b5 in QThreadPrivate::start (arg=0x4b80c90) at thread/qthread_unix.cpp:248
#5  0x00007f1c85bca944 in start_thread (arg=<value optimized out>) at pthread_create.c:297
#6  0x00007f1c844d61dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 3 (Thread 0x7f1c6c8eb710 (LWP 20433)):
#0  pthread_cond_timedwait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:211
#1  0x00007f1c85e5b03d in QWaitConditionPrivate::wait (this=<value optimized out>, mutex=0x5981250, time=30000) at thread/qwaitcondition_unix.cpp:85
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x5981250, time=30000) at thread/qwaitcondition_unix.cpp:159
#3  0x00007f1c85e500a8 in QThreadPoolThread::run (this=0x590bdb0) at concurrent/qthreadpool.cpp:140
#4  0x00007f1c85e5a0b5 in QThreadPrivate::start (arg=0x590bdb0) at thread/qthread_unix.cpp:248
#5  0x00007f1c85bca944 in start_thread (arg=<value optimized out>) at pthread_create.c:297
#6  0x00007f1c844d61dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 2 (Thread 0x7f1c6c0ea710 (LWP 20434)):
#0  pthread_cond_timedwait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:211
#1  0x00007f1c85e5b03d in QWaitConditionPrivate::wait (this=<value optimized out>, mutex=0x5981250, time=30000) at thread/qwaitcondition_unix.cpp:85
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x5981250, time=30000) at thread/qwaitcondition_unix.cpp:159
#3  0x00007f1c85e500a8 in QThreadPoolThread::run (this=0x5914530) at concurrent/qthreadpool.cpp:140
#4  0x00007f1c85e5a0b5 in QThreadPrivate::start (arg=0x5914530) at thread/qthread_unix.cpp:248
#5  0x00007f1c85bca944 in start_thread (arg=<value optimized out>) at pthread_create.c:297
#6  0x00007f1c844d61dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7f1c8898b760 (LWP 19105)):
[KCrash Handler]
#5  0x00007f1c8625b380 in typeinfo for QObjectData () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007f1c884a06eb in ~PeerConnector (this=0x5918010, __in_chrg=<value optimized out>) at /var/tmp/portage/net-libs/libktorrent-1.0.2/work/libktorrent-1.0.2/src/peer/peerconnector.cpp:42
#7  0x00007f1c88490b05 in bt::PeerManager::stop (this=0x2d3ed70) at /var/tmp/portage/net-libs/libktorrent-1.0.2/work/libktorrent-1.0.2/src/peer/peermanager.cpp:546
#8  0x00007f1c884cbfcb in bt::TorrentControl::stop (this=0x2d29ab0, wjob=0x0) at /var/tmp/portage/net-libs/libktorrent-1.0.2/work/libktorrent-1.0.2/src/torrent/torrentcontrol.cpp:486
#9  0x00007f1c881599ba in kt::QueueManager::stopSafely (this=<value optimized out>, tc=0x2d29ab0, wjob=0xffffffffffffffb0)
    at /var/tmp/portage/net-p2p/ktorrent-4.0.2/work/ktorrent-4.0.2/libktcore/torrent/queuemanager.cpp:752
#10 0x00007f1c8815b580 in kt::QueueManager::orderQueue (this=0x7f1c74003d40) at /var/tmp/portage/net-p2p/ktorrent-4.0.2/work/ktorrent-4.0.2/libktcore/torrent/queuemanager.cpp:630
#11 0x00007f1c8815ba80 in kt::QueueManager::checkStalledTorrents (this=<value optimized out>, now=<value optimized out>, min_stall_time=<value optimized out>)
    at /var/tmp/portage/net-p2p/ktorrent-4.0.2/work/ktorrent-4.0.2/libktcore/torrent/queuemanager.cpp:819
#12 0x000000000042d58a in kt::Core::update (this=0x7f1c74003b50) at /var/tmp/portage/net-p2p/ktorrent-4.0.2/work/ktorrent-4.0.2/ktorrent/core.cpp:1045
#13 0x0000000000430f79 in kt::Core::qt_metacall (this=0x7f1c74003b50, _c=QMetaObject::InvokeMetaMethod, _id=-2044349568, _a=0x7fff61ddcfe0)
    at /var/tmp/portage/net-p2p/ktorrent-4.0.2/work/ktorrent-4.0.2_build/ktorrent/core.moc:167
#14 0x00007f1c85f5b166 in QMetaObject::activate (sender=0x7f1c74003b78, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x4b80c70) at kernel/qobject.cpp:3287
#15 0x00007f1c85f579b6 in QObject::event (this=0x7f1c74003b78, e=0x0) at kernel/qobject.cpp:1204
#16 0x00007f1c850cbeac in QApplicationPrivate::notify_helper (this=0x2296950, receiver=0x7f1c74003b78, e=0x7fff61ddd720) at kernel/qapplication.cpp:4302
#17 0x00007f1c850d238b in QApplication::notify (this=0x7fff61ddda70, receiver=0x7f1c74003b78, e=0x7fff61ddd720) at kernel/qapplication.cpp:4185
#18 0x000000000043b28c in kt::App::notify (this=0x7fff61ddda70, receiver=0x7f1c74003b78, event=0x7fff61ddd720) at /var/tmp/portage/net-p2p/ktorrent-4.0.2/work/ktorrent-4.0.2/ktorrent/app.cpp:97
#19 0x00007f1c85f47ecb in QCoreApplication::notifyInternal (this=0x7fff61ddda70, receiver=0x7f1c74003b78, event=0x7fff61ddd720) at kernel/qcoreapplication.cpp:726
#20 0x00007f1c85f749da in QCoreApplication::sendEvent (this=0x22a3760) at kernel/qcoreapplication.h:215
#21 QTimerInfoList::activateTimers (this=0x22a3760) at kernel/qeventdispatcher_unix.cpp:603
#22 0x00007f1c85f71778 in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:184
#23 idleTimerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:231
#24 0x00007f1c804e2399 in g_main_dispatch (context=0x22a2180) at gmain.c:1960
#25 IA__g_main_context_dispatch (context=0x22a2180) at gmain.c:2513
#26 0x00007f1c804e6140 in g_main_context_iterate (context=0x22a2180, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2591
#27 0x00007f1c804e62e2 in IA__g_main_context_iteration (context=0x22a2180, may_block=1) at gmain.c:2654
#28 0x00007f1c85f7141e in QEventDispatcherGlib::processEvents (this=0x22924a0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#29 0x00007f1c8517aea6 in QGuiEventDispatcherGlib::processEvents (this=0x4b78bb0, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#30 0x00007f1c85f467f2 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#31 0x00007f1c85f46bbd in QEventLoop::exec (this=0x7fff61ddd9d0, flags=) at kernel/qeventloop.cpp:201
#32 0x00007f1c85f4b7fb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1003
#33 0x000000000042a732 in main (argc=<value optimized out>, argv=<value optimized out>) at /var/tmp/portage/net-p2p/ktorrent-4.0.2/work/ktorrent-4.0.2/ktorrent/main.cpp:176

Reported using DrKonqi
Comment 1 Alexey Shildyakov 2010-07-26 16:46:07 UTC
Tail of log:
Mon Jul 26 18:36:23 2010: Saving 0 chunk downloads
Mon Jul 26 18:36:23 2010: Saving list of peers to /home/ashl1/.kde4/share/apps/ktorrent/tor127/peer_list
Mon Jul 26 18:36:23 2010: Authentication to 95.67.174.207 : failure
Mon Jul 26 18:36:23 2010: Authentication to 95.25.39.151 : failure
Mon Jul 26 18:36:23 2010: Authentication to 195.19.33.140 : failure
Mon Jul 26 18:36:23 2010: WakeUpPipe: read failed
Comment 2 Alexey Shildyakov 2010-07-26 16:48:22 UTC
Created attachment 49491 [details]
Another backtrace
Comment 3 Joris Guisson 2010-07-27 11:28:06 UTC
SVN commit 1155405 by guisson:

Fix crash when cleaning up PeerConnectors

BUG: 245796

 M  +1 -0      ChangeLog  
 M  +14 -1     src/peer/peerconnector.cpp  
 M  +3 -0      src/peer/peerconnector.h  
 M  +7 -4      src/peer/peermanager.cpp  
 M  +0 -1      src/peer/peermanager.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1155405
Comment 4 Joris Guisson 2010-07-27 11:38:56 UTC
SVN commit 1155407 by guisson:

Backport PeerConnector crash fixes to stable 

CCBUG: 245796


 M  +1 -0      ChangeLog  
 M  +14 -1     src/peer/peerconnector.cpp  
 M  +3 -0      src/peer/peerconnector.h  
 M  +7 -4      src/peer/peermanager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1155407
Comment 5 Joris Guisson 2010-08-10 20:03:28 UTC
*** Bug 247207 has been marked as a duplicate of this bug. ***
Comment 6 Joris Guisson 2010-08-14 09:53:02 UTC
*** Bug 247669 has been marked as a duplicate of this bug. ***
Comment 7 Christoph Feck 2010-09-01 20:26:06 UTC
*** Bug 249766 has been marked as a duplicate of this bug. ***
Comment 8 Joris Guisson 2010-09-08 18:11:38 UTC
*** Bug 250500 has been marked as a duplicate of this bug. ***