Bug 259715 - Ktorrent random crash
Summary: Ktorrent random crash
Status: RESOLVED DUPLICATE of bug 251117
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-13 12:43 UTC by Amichai Rothman
Modified: 2010-12-14 22:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
valgrind output on two runs that crashed (91.08 KB, text/plain)
2010-12-13 22:57 UTC, Amichai Rothman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Amichai Rothman 2010-12-13 12:43:26 UTC
Application: ktorrent (4.0.3)
KDE Platform Version: 4.5.4 (KDE 4.5.4)
Qt Version: 4.7.0
Operating System: Linux 2.6.35-23-generic x86_64
Distribution: Ubuntu 10.10

-- Information about the crash:
- What I was doing when the application crashed:
There were 3 torrents running. This crash happened 4 times in the past 30 minutes - each time I restarted ktorrent, and within a few minutes it crashed again.
(note this is on Kubuntu 10.10 upgraded to KDE 4.5.4 and KTorrent 4.0.3 from kubuntu PPA)

The crash can be reproduced some of the time.

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

Thread 6 (Thread 0x7fb0baf1b710 (LWP 11381)):
#0  __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:97
#1  0x00007fb0cb13d1dc in _L_lock_12347 () from /lib/libc.so.6
#2  0x00007fb0cb13bc78 in __libc_free (mem=0x7fb0cb43ce40) at malloc.c:3736
#3  0x00007fb0cb158dd9 in tzset_internal (always=<value optimized out>, explicit=<value optimized out>) at tzset.c:435
#4  0x00007fb0cb1590b0 in __tzset () at tzset.c:592
#5  0x00007fb0ccb678e6 in QDateTime::currentDateTime () at tools/qdatetime.cpp:3116
#6  0x00007fb0cf12cf47 in bt::Log::Private::finishLine (this=0x12380a0) at ../../src/util/log.cpp:130
#7  0x00007fb0cf12bf77 in endline (lg=...) at ../../src/util/log.cpp:159
#8  bt::endl (lg=...) at ../../src/util/log.cpp:222
#9  0x00007fb0cf12c12c in operator<< (type=<value optimized out>, msg=0x7fb0b42a84a8 "QSocketNotifier: Invalid socket 16 and type 'Read', disabling...") at ../../src/util/log.h:140
#10 bt::QtMessageOutput (type=<value optimized out>, msg=0x7fb0b42a84a8 "QSocketNotifier: Invalid socket 16 and type 'Read', disabling...") at ../../src/util/log.cpp:297
#11 0x00007fb0ccb5180e in qt_message_output (msgType=QtWarningMsg, buf=0x80 <Address 0x80 out of bounds>) at global/qglobal.cpp:2205
#12 0x00007fb0ccb51a42 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtWarningMsg, msg=0x7fb0ccd120a8 "QSocketNotifier: Invalid socket %d and type '%s', disabling...", ap=0x7fb0baf1aaf0) at global/qglobal.cpp:2305
#13 0x00007fb0ccb51d75 in qWarning (msg=0x80 <Address 0x80 out of bounds>) at global/qglobal.cpp:2387
#14 0x00007fb0ccc7a5f6 in socketNotifierSourceCheck (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:90
#15 0x00007fb0c5ff266a in g_main_context_check () from /lib/libglib-2.0.so.0
#16 0x00007fb0c5ff3023 in ?? () from /lib/libglib-2.0.so.0
#17 0x00007fb0c5ff345c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#18 0x00007fb0ccc7a193 in QEventDispatcherGlib::processEvents (this=0x1266540, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#19 0x00007fb0ccc4ca02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#20 0x00007fb0ccc4cdec in QEventLoop::exec (this=0x7fb0baf1adb0, flags=) at kernel/qeventloop.cpp:201
#21 0x00007fb0ccb572fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#22 0x00007fb0cf1d715e in utp::UTPServerThread::run (this=0x1109d40) at ../../src/utp/utpserverthread.cpp:44
#23 0x00007fb0ccb5a27e in QThreadPrivate::start (arg=0x1109d40) at thread/qthread_unix.cpp:266
#24 0x00007fb0cc8cf971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#25 0x00007fb0cb1a494d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#26 0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7fb0ba71a710 (LWP 11382)):
#0  0x00007fb0cb19d2e3 in select () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007fb0cf19e212 in dht::RPCServerThread::run (this=0x1122290) at ../../src/dht/rpcserver.cpp:107
#2  0x00007fb0ccb5a27e in QThreadPrivate::start (arg=0x1122290) at thread/qthread_unix.cpp:266
#3  0x00007fb0cc8cf971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#4  0x00007fb0cb1a494d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7fb0a57d5710 (LWP 11401)):
#0  0x00007fb0cb198203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fb0cf13f79c in net::Poll::poll (this=0x10e9330, timeout=<value optimized out>) at ../../src/net/poll.cpp:99
#2  0x00007fb0cf13b700 in net::DownloadThread::waitForSocketReady (this=0x10e9320) at ../../src/net/downloadthread.cpp:128
#3  0x00007fb0cf13b7e6 in net::DownloadThread::update (this=0x7fb0a81648d0) at ../../src/net/downloadthread.cpp:48
#4  0x00007fb0cf13c2c9 in net::NetworkThread::run (this=0x10e9320) at ../../src/net/networkthread.cpp:48
#5  0x00007fb0ccb5a27e in QThreadPrivate::start (arg=0x10e9320) at thread/qthread_unix.cpp:266
#6  0x00007fb0cc8cf971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#7  0x00007fb0cb1a494d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#8  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fb0a4fd4710 (LWP 11402)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:212
#1  0x00007fb0ccb59845 in thread_sleep (ti=0x7fb0a4fd3da0) at thread/qthread_unix.cpp:416
#2  0x00007fb0ccb599b0 in QThread::msleep (msecs=<value optimized out>) at thread/qthread_unix.cpp:442
#3  0x00007fb0cf13b07d in net::UploadThread::update (this=0x10e9990) at ../../src/net/uploadthread.cpp:89
#4  0x00007fb0cf13c2c9 in net::NetworkThread::run (this=0x10e9990) at ../../src/net/networkthread.cpp:48
#5  0x00007fb0ccb5a27e in QThreadPrivate::start (arg=0x10e9990) at thread/qthread_unix.cpp:266
#6  0x00007fb0cc8cf971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#7  0x00007fb0cb1a494d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#8  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fb09eeba710 (LWP 11403)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fb0ccb59533 in QMutexPrivate::wait (this=0x1271080, timeout=-1) at thread/qmutex_unix.cpp:84
#2  0x00007fb0ccb54f05 in QMutex::lock (this=0x12380d0) at thread/qmutex.cpp:204
#3  0x00007fb0cf12bcab in bt::Out (arg=19) at ../../src/util/log.cpp:270
#4  0x00007fb0cf12c10a in bt::QtMessageOutput (type=<value optimized out>, msg=0x7fb0a027a208 "QSocketNotifier: Invalid socket 157 and type 'Read', disabling...") at ../../src/util/log.cpp:297
#5  0x00007fb0ccb5180e in qt_message_output (msgType=QtWarningMsg, buf=0x80 <Address 0x80 out of bounds>) at global/qglobal.cpp:2205
#6  0x00007fb0ccb51a42 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtWarningMsg, msg=0x7fb0ccd120a8 "QSocketNotifier: Invalid socket %d and type '%s', disabling...", ap=0x7fb09eeb9af0) at global/qglobal.cpp:2305
#7  0x00007fb0ccb51d75 in qWarning (msg=0x80 <Address 0x80 out of bounds>) at global/qglobal.cpp:2387
#8  0x00007fb0ccc7a5f6 in socketNotifierSourceCheck (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:90
#9  0x00007fb0c5ff266a in g_main_context_check () from /lib/libglib-2.0.so.0
#10 0x00007fb0c5ff3023 in ?? () from /lib/libglib-2.0.so.0
#11 0x00007fb0c5ff345c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#12 0x00007fb0ccc7a193 in QEventDispatcherGlib::processEvents (this=0x12b5f00, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#13 0x00007fb0ccc4ca02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#14 0x00007fb0ccc4cdec in QEventLoop::exec (this=0x7fb09eeb9db0, flags=) at kernel/qeventloop.cpp:201
#15 0x00007fb0ccb572fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#16 0x00007fb0ccc2c5f8 in QInotifyFileSystemWatcherEngine::run (this=0x201bbe0) at io/qfilesystemwatcher_inotify.cpp:248
#17 0x00007fb0ccb5a27e in QThreadPrivate::start (arg=0x201bbe0) at thread/qthread_unix.cpp:266
#18 0x00007fb0cc8cf971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#19 0x00007fb0cb1a494d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#20 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fb0cf61e760 (LWP 11379)):
[KCrash Handler]
#6  _int_malloc (av=0x7fb0cb43ce40, bytes=56) at malloc.c:4628
#7  0x00007fb0cb13a38e in __libc_malloc (bytes=56) at malloc.c:3660
#8  0x00007fb0cb993ded in operator new(unsigned long) () from /usr/lib/libstdc++.so.6
#9  0x00007fb0cf157bab in allocate (this=0x7fffffd6abc0, __x=0x0, __p=0xc751ff3c, __v=...) at /usr/include/c++/4.4/ext/new_allocator.h:89
#10 _M_get_node (this=0x7fffffd6abc0, __x=0x0, __p=0xc751ff3c, __v=...) at /usr/include/c++/4.4/bits/stl_tree.h:359
#11 _M_create_node (this=0x7fffffd6abc0, __x=0x0, __p=0xc751ff3c, __v=...) at /usr/include/c++/4.4/bits/stl_tree.h:369
#12 std::_Rb_tree<unsigned int, std::pair<unsigned int const, net::Address>, std::_Select1st<std::pair<unsigned int const, net::Address> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, net::Address> > >::_M_insert_ (this=0x7fffffd6abc0, __x=0x0, __p=0xc751ff3c, __v=...) at /usr/include/c++/4.4/bits/stl_tree.h:881
#13 0x00007fb0cf15758e in _M_insert_unique (this=0x31749a0) at /usr/include/c++/4.4/bits/stl_tree.h:1182
#14 insert (this=0x31749a0) at /usr/include/c++/4.4/bits/stl_map.h:500
#15 bt::UTPex::update (this=0x31749a0) at ../../src/peer/utpex.cpp:96
#16 0x00007fb0cf14a130 in bt::Peer::update (this=0x7fb0a049be10) at ../../src/peer/peer.cpp:554
#17 0x00007fb0cf14f995 in bt::PeerManager::update (this=0x17a07c0) at ../../src/peer/peermanager.cpp:144
#18 0x00007fb0cf1818a4 in bt::TorrentControl::update (this=0x1798a60) at ../../src/torrent/torrentcontrol.cpp:163
#19 0x00000000004289fb in kt::Core::update (this=0x7fb0b4003cd0) at ../../ktorrent/core.cpp:1030
#20 0x0000000000431222 in kt::Core::qt_metacall (this=0x7fb0b4003cd0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffffd6b0b0) at ./core.moc:167
#21 0x00007fb0ccc65b27 in QMetaObject::activate (sender=0x7fb0b4003cf8, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x20) at kernel/qobject.cpp:3280
#22 0x00007fb0ccc5f8f9 in QObject::event (this=0x7fb0b4003cf8, e=0x0) at kernel/qobject.cpp:1183
#23 0x00007fb0cbd97fdc in QApplicationPrivate::notify_helper (this=0x1123c30, receiver=0x7fb0b4003cf8, e=0x7fffffd6b7e0) at kernel/qapplication.cpp:4396
#24 0x00007fb0cbd9daed in QApplication::notify (this=0x7fffffd6bb10, receiver=0x7fb0b4003cf8, e=0x7fffffd6b7e0) at kernel/qapplication.cpp:4277
#25 0x0000000000437d1a in kt::App::notify (this=0x7fb0cb43ced8, receiver=0x0, event=0xc751ff3c) at ../../ktorrent/app.cpp:97
#26 0x00007fb0ccc4dcdc in QCoreApplication::notifyInternal (this=0x7fffffd6bb10, receiver=0x7fb0b4003cf8, event=0x7fffffd6b7e0) at kernel/qcoreapplication.cpp:732
#27 0x00007fb0ccc7d6f2 in sendEvent (this=0x1119ad0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#28 QTimerInfoList::activateTimers (this=0x1119ad0) at kernel/qeventdispatcher_unix.cpp:602
#29 0x00007fb0ccc7a4c8 in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:184
#30 idleTimerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:231
#31 0x00007fb0c5fef342 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#32 0x00007fb0c5ff32a8 in ?? () from /lib/libglib-2.0.so.0
#33 0x00007fb0c5ff345c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#34 0x00007fb0ccc7a193 in QEventDispatcherGlib::processEvents (this=0x10e7320, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#35 0x00007fb0cbe4aa4e in QGuiEventDispatcherGlib::processEvents (this=0x7fb0cb43ced8, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#36 0x00007fb0ccc4ca02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#37 0x00007fb0ccc4cdec in QEventLoop::exec (this=0x7fffffd6ba80, flags=) at kernel/qeventloop.cpp:201
#38 0x00007fb0ccc50ebb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#39 0x0000000000426a8b in main (argc=<value optimized out>, argv=<value optimized out>) at ../../ktorrent/main.cpp:176

Possible duplicates by query: bug 257193, bug 241165.

Reported using DrKonqi
Comment 1 Joris Guisson 2010-12-13 18:00:28 UTC
Would it be possible to run ktorrent under valgrind until this happens ?
Comment 2 Amichai Rothman 2010-12-13 22:57:42 UTC
Created attachment 54521 [details]
valgrind output on two runs that crashed

I hope the attached valgrind output will be useful.
Comment 3 Joris Guisson 2010-12-14 19:19:59 UTC
This is very useful
Comment 4 Joris Guisson 2010-12-14 19:31:29 UTC
After some investigations, I have come to the conclusion that this bug is caused by the same problem which was fixed in 251117.

Upgrade to 4.0.4, this is fixed in that release.

*** This bug has been marked as a duplicate of bug 251117 ***
Comment 5 Amichai Rothman 2010-12-14 22:54:03 UTC
Thanks for your time in investigating this! I'll have to wait for 4.0.4 to hit the kubuntu ppa/repos, but in the meantime as a workaround I'll try unchecking the uTorrent protocol setting and hope the crashing stops...