Bug 233775

Summary: KTorrent crash when deleting seeding torrents
Product: [Applications] ktorrent Reporter: Jon Skanes <jon>
Component: generalAssignee: Joris Guisson <joris.guisson>
Status: RESOLVED FIXED    
Severity: crash CC: alex, cassianoleal, delionkur-lestat, hein, moritz-kdebugs, rdieter, savan2401, Sean.Duggan
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jon Skanes 2010-04-08 21:58:05 UTC
Application: ktorrent (4.0beta2)
KDE Platform Version: 4.4.2 (KDE 4.4.2)
Qt Version: 4.6.2
Operating System: Linux 2.6.31-20-generic-pae i686
Distribution: Ubuntu 9.10

-- Information about the crash:
Occasionally when I delete a seeding torrent I get this crash.

The crash can be reproduced some of the time.

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

Thread 5 (Thread 0xb3924b70 (LWP 9688)):
#0  0xb788d430 in __kernel_vsyscall ()
#1  0xb5d82a71 in select () from /lib/tls/i686/cmov/libc.so.6
#2  0xb77c9eaa in dht::RPCServerThread::run (this=0x866fba0) at ../../libbtcore/dht/rpcserver.cpp:107
#3  0xb6a1a36e in QThreadPrivate::start (arg=0x866fba0) at thread/qthread_unix.cpp:248
#4  0xb575980e in start_thread (arg=0xb3924b70) at pthread_create.c:300
#5  0xb5d898de in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 4 (Thread 0xaa33ab70 (LWP 9718)):
#0  0xb788d430 in __kernel_vsyscall ()
#1  0xb575e142 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:179
#2  0xb5d968d4 in __pthread_cond_timedwait (cond=0xaa33a1f4, mutex=0xaa33a224, abstime=0xaa33a270) at forward.c:152
#3  0xb6a19c5e in thread_sleep (ti=0x1) at thread/qthread_unix.cpp:398
#4  0xb6a19db3 in QThread::msleep (msecs=50) at thread/qthread_unix.cpp:424
#5  0xb77618ca in net::DownloadThread::update (this=0x85a2608) at ../../libbtcore/net/downloadthread.cpp:91
#6  0xb7762138 in net::NetworkThread::run (this=0x85a2608) at ../../libbtcore/net/networkthread.cpp:48
#7  0xb6a1a36e in QThreadPrivate::start (arg=0x85a2608) at thread/qthread_unix.cpp:248
#8  0xb575980e in start_thread (arg=0xaa33ab70) at pthread_create.c:300
#9  0xb5d898de in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xa9b39b70 (LWP 9719)):
#0  0xb788d430 in __kernel_vsyscall ()
#1  0xb575e142 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:179
#2  0xb5d968d4 in __pthread_cond_timedwait (cond=0xa9b391f4, mutex=0xa9b39224, abstime=0xa9b39270) at forward.c:152
#3  0xb6a19c5e in thread_sleep (ti=0x1) at thread/qthread_unix.cpp:398
#4  0xb6a19db3 in QThread::msleep (msecs=39) at thread/qthread_unix.cpp:424
#5  0xb77612ba in net::UploadThread::update (this=0x85a29f0) at ../../libbtcore/net/uploadthread.cpp:88
#6  0xb7762138 in net::NetworkThread::run (this=0x85a29f0) at ../../libbtcore/net/networkthread.cpp:48
#7  0xb6a1a36e in QThreadPrivate::start (arg=0x85a29f0) at thread/qthread_unix.cpp:248
#8  0xb575980e in start_thread (arg=0xa9b39b70) at pthread_create.c:300
#9  0xb5d898de in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xa9338b70 (LWP 9720)):
#0  0xb788d430 in __kernel_vsyscall ()
#1  0xb5d79fbb in read () from /lib/tls/i686/cmov/libc.so.6
#2  0xb5d23edb in _IO_new_file_underflow (fp=0xa4e299b8) at fileops.c:605
#3  0xb5d2576b in _IO_default_uflow (fp=0xa4e299b8) at genops.c:440
#4  0xb5d26b98 in *__GI___uflow (fp=0xa4e299b8) at genops.c:394
#5  0xb5d19cdc in _IO_getline_info (fp=0xa4e299b8, buf=0xa9337698 "-15 Timeout reached\n", n=255, delim=10, extract_delim=1, eof=0x0) at iogetline.c:74
#6  0xb5d19c21 in _IO_getline (fp=0xa4e299b8, buf=0xa9337698 "-15 Timeout reached\n", n=255, delim=10, extract_delim=1) at iogetline.c:42
#7  0xb5d18c7a in _IO_fgets (buf=0xa9337698 "-15 Timeout reached\n", n=256, fp=0xa4e299b8) at iofgets.c:58
#8  0xb3953ca4 in ?? () from /lib/libnss_mdns4.so.2
#9  0xb3954147 in _nss_mdns4_gethostbyaddr_r () from /lib/libnss_mdns4.so.2
#10 0xb5d9fe2b in __gethostbyaddr_r (addr=0xaba1fbc, len=4, type=2, resbuf=0xa9338054, buffer=0xa9337a90 "\377\002", buflen=1024, result=0xa9338084, h_errnop=0xa9338088) at ../nss/getXXbyYY_r.c:253
#11 0xb5da5111 in *__GI_getnameinfo (sa=0xaba1fb8, addrlen=16, host=0xa93381a4 "", hostlen=199, serv=0xa93380dc "", servlen=199, flags=<value optimized out>) at getnameinfo.c:223
#12 0xb776562b in net::ReverseResolver::resolve (this=0x8e6ada8, addr=...) at ../../libbtcore/net/reverseresolver.cpp:64
#13 0xb77656c3 in net::ReverseResolver::run (this=0x8e6ada8) at ../../libbtcore/net/reverseresolver.cpp:73
#14 0xb77657c7 in net::ReverseResolverThread::run (this=0x8d55ac0) at ../../libbtcore/net/reverseresolver.cpp:118
#15 0xb6a1a36e in QThreadPrivate::start (arg=0x8d55ac0) at thread/qthread_unix.cpp:248
#16 0xb575980e in start_thread (arg=0xa9338b70) at pthread_create.c:300
#17 0xb5d898de in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb4f78920 (LWP 9686)):
[KCrash Handler]
#6  QMutex::lock (this=0xc39) at thread/qmutex.cpp:150
#7  0xb6b1c7e4 in QCoreApplication::postEvent (receiver=0xabd04910, event=0x948bd30, priority=0) at kernel/qcoreapplication.cpp:1113
#8  0xb6b1cb5c in QCoreApplication::postEvent (receiver=0xabd04910, event=0x948bd30) at kernel/qcoreapplication.cpp:1066
#9  0xb6b2cae4 in QObject::deleteLater (this=0xabd04910) at kernel/qobject.cpp:2158
#10 0xb7776385 in bt::PeerManager::stop (this=0x8f38538) at ../../libbtcore/peer/peermanager.cpp:545
#11 0xb77aef96 in bt::TorrentControl::stop (this=0x8ef0ac8, wjob=0x0) at ../../libbtcore/torrent/torrentcontrol.cpp:487
#12 0xb76a8cec in kt::QueueManager::stopSafely (this=0x86680b0, tc=0x8ef0ac8, wjob=0x0) at ../../libktcore/torrent/queuemanager.cpp:738
#13 0xb76a902f in kt::QueueManager::stop (this=0x86680b0, tc=0x8ef0ac8) at ../../libktcore/torrent/queuemanager.cpp:197
#14 0x0806d972 in kt::Core::remove (this=0x86710e0, tc=0x8ef0ac8, data_to=false) at ../../ktorrent/core.cpp:752
#15 0x080d0387 in kt::View::removeTorrents (this=0x8c24cf0) at ../../ktorrent/view/view.cpp:230
#16 0x080d9669 in kt::ViewManager::qt_metacall (this=0x869d510, _c=QMetaObject::InvokeMetaMethod, _id=17, _a=0xbf854b88) at ./viewmanager.moc:129
#17 0xb6b21e5a in QMetaObject::metacall (object=0x869d510, cl=2882554128, idx=17, argv=0xbf854b88) at kernel/qmetaobject.cpp:237
#18 0xb6b305f5 in QMetaObject::activate (sender=0x869ebe0, m=0xb6995d58, local_signal_index=1, argv=0xbf854b88) at kernel/qobject.cpp:3293
#19 0xb6067b89 in QAction::triggered (this=0x869ebe0, _t1=false) at .moc/release-shared/moc_qaction.cpp:263
#20 0xb6069d9c in QAction::activate (this=0x869ebe0, event=QAction::Trigger) at kernel/qaction.cpp:1255
#21 0xb606b688 in QAction::event (this=0x4, e=0xa5157658) at kernel/qaction.cpp:1181
#22 0xb70bdf53 in KAction::event (this=0x869ebe0, event=0xbf8550a8) at ../../kdeui/actions/kaction.cpp:129
#23 0xb606e3cc in QApplicationPrivate::notify_helper (this=0x85c5520, receiver=0x869ebe0, e=0xbf8550a8) at kernel/qapplication.cpp:4300
#24 0xb607501e in QApplication::notify (this=0xbf855f64, receiver=0x869ebe0, e=0xbf8550a8) at kernel/qapplication.cpp:3704
#25 0xb71aa5ba in KApplication::notify (this=0xbf855f64, receiver=0x869ebe0, event=0xbf8550a8) at ../../kdeui/kernel/kapplication.cpp:302
#26 0xb6b1cbeb in QCoreApplication::notifyInternal (this=0xbf855f64, receiver=0x869ebe0, event=0xbf8550a8) at kernel/qcoreapplication.cpp:704
#27 0xb60b02fd in QCoreApplication::sendEvent (this=0x85c55cc, e=0xbf855524) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#28 QShortcutMap::dispatchEvent (this=0x85c55cc, e=0xbf855524) at kernel/qshortcutmap.cpp:879
#29 0xb60b20ee in QShortcutMap::tryShortcutEvent (this=0x85c55cc, o=0x8c24cf0, e=0xbf855524) at kernel/qshortcutmap.cpp:364
#30 0xb6076ddd in QApplication::notify (this=0xbf855f64, receiver=0x8c24cf0, e=0xbf855524) at kernel/qapplication.cpp:3746
#31 0xb71aa5ba in KApplication::notify (this=0xbf855f64, receiver=0x8c24cf0, event=0xbf855524) at ../../kdeui/kernel/kapplication.cpp:302
#32 0xb6b1cbeb in QCoreApplication::notifyInternal (this=0xbf855f64, receiver=0x8c24cf0, event=0xbf855524) at kernel/qcoreapplication.cpp:704
#33 0xb606f2ae in QCoreApplication::sendSpontaneousEvent (receiver=0x8c24cf0, event=0x4) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#34 qt_sendSpontaneousEvent (receiver=0x8c24cf0, event=0x4) at kernel/qapplication.cpp:5279
#35 0xb6128800 in QKeyMapper::sendKeyEvent (keyWidget=0x8c24cf0, grab=false, type=QEvent::KeyPress, code=16777223, modifiers=..., text=..., autorepeat=<value optimized out>, 
    count=<value optimized out>, nativeScanCode=119, nativeVirtualKey=65535, nativeModifiers=0) at kernel/qkeymapper_x11.cpp:1861
#36 0xb612ad49 in QKeyMapperPrivate::translateKeyEvent (this=0x85f7648, keyWidget=0x8c24cf0, event=0xbf855bdc, grab=88) at kernel/qkeymapper_x11.cpp:1831
#37 0xb60fe477 in QApplication::x11ProcessEvent (this=0xbf855f64, event=0xbf855bdc) at kernel/qapplication_x11.cpp:3394
#38 0xb612e00a in x11EventSourceDispatch (s=0x85cfc00, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#39 0xb5370e88 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#40 0xb5374730 in ?? () from /lib/libglib-2.0.so.0
#41 0xb5374863 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#42 0xb6b48805 in QEventDispatcherGlib::processEvents (this=0x85a1488, flags=...) at kernel/qeventdispatcher_glib.cpp:412
#43 0xb612db35 in QGuiEventDispatcherGlib::processEvents (this=0x85a1488, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#44 0xb6b1b209 in QEventLoop::processEvents (this=0xbf855ed4, flags=) at kernel/qeventloop.cpp:149
#45 0xb6b1b65a in QEventLoop::exec (this=0xbf855ed4, flags=...) at kernel/qeventloop.cpp:201
#46 0xb6b1f84f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#47 0xb606e467 in QApplication::exec () at kernel/qapplication.cpp:3579
#48 0x08068d41 in main (argc=6, argv=0xbf856364) at ../../ktorrent/main.cpp:173

Possible duplicates by query: bug 232313, bug 225225, bug 225208, bug 225190, bug 225186.

Reported using DrKonqi
Comment 1 Joris Guisson 2010-04-11 11:13:49 UTC
*** Bug 234016 has been marked as a duplicate of this bug. ***
Comment 2 Joris Guisson 2010-04-11 11:14:21 UTC
*** Bug 234004 has been marked as a duplicate of this bug. ***
Comment 3 Joris Guisson 2010-04-12 17:49:09 UTC
*** Bug 234157 has been marked as a duplicate of this bug. ***
Comment 4 Joris Guisson 2010-04-12 18:13:46 UTC
SVN commit 1114050 by guisson:

Fix crash in PeerConnector destruction 

BUG: 233775

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


WebSVN link: http://websvn.kde.org/?view=rev&revision=1114050
Comment 5 Joris Guisson 2010-04-13 07:55:51 UTC
*** Bug 234230 has been marked as a duplicate of this bug. ***
Comment 6 Joris Guisson 2010-04-13 16:06:18 UTC
*** Bug 234252 has been marked as a duplicate of this bug. ***
Comment 7 Joris Guisson 2010-04-16 11:13:52 UTC
*** Bug 234499 has been marked as a duplicate of this bug. ***
Comment 8 Joris Guisson 2010-04-17 10:32:08 UTC
*** Bug 234592 has been marked as a duplicate of this bug. ***
Comment 9 Joris Guisson 2010-04-17 19:09:03 UTC
*** Bug 234625 has been marked as a duplicate of this bug. ***
Comment 10 Joris Guisson 2010-04-25 12:12:13 UTC
*** Bug 234593 has been marked as a duplicate of this bug. ***
Comment 11 Joris Guisson 2010-04-25 12:13:13 UTC
*** Bug 234231 has been marked as a duplicate of this bug. ***
Comment 12 Jonathan Thomas 2010-04-30 15:16:34 UTC
*** Bug 235815 has been marked as a duplicate of this bug. ***
Comment 13 Joris Guisson 2010-05-02 11:24:41 UTC
*** Bug 235955 has been marked as a duplicate of this bug. ***
Comment 14 Joris Guisson 2010-05-27 18:26:05 UTC
*** Bug 238956 has been marked as a duplicate of this bug. ***