This forum has been archived. All content is frozen. Please use KDE Discuss instead.

crashes when torrent completes

Tags: None
(comma "," separated)
agforsyth
Registered Member
Posts
133
Karma
0

crashes when torrent completes

Wed Feb 18, 2009 7:39 am
With a svn trunk build from yesterday, I've had two crashes when one torrent completed and another was started by the QM. Several torrents have completed and had another started without crashes.

Both crashes were segmentation faults. The second crash had a corrupted stack. The first crash (which I accidentally closed the backtrace for) appeared to be in the preallocation thread's finished method. Here is an edited-for-privacy log of the second crash.

I'm now running ktorrent from a terminal so hopefully can catch a backtrace and any info it spits out on the command line if the crash repeats. I have two more torrent queued up so I'd give it a 50/50 chance.

Code: Select all
Wed Feb 18 02:11:45 2009: Doing tracker request to url event=completed
Wed Feb 18 02:11:45 2009: QM Starting: 9
Wed Feb 18 02:11:45 2009: Starting download 9
Wed Feb 18 02:11:45 2009: Pre-allocating diskspace
Wed Feb 18 02:11:45 2009: Preallocating file 9
Wed Feb 18 02:11:45 2009: file_size = 360MB
Wed Feb 18 02:11:45 2009: PreallocationThread has finished
Wed Feb 18 02:11:46 2009: QM Stopping: 6
Wed Feb 18 02:11:46 2009: Doing tracker request to url event=stopped
Wed Feb 18 02:11:46 2009: Saving list of peers to 6
Wed Feb 18 02:11:46 2009: The torrent 9 has stalled longer then 5 minutes, decreasing it's priority
Wed Feb 18 02:11:46 2009: QM Starting: 10
Wed Feb 18 02:11:46 2009: Starting download 10
Wed Feb 18 02:11:46 2009: Pre-allocating diskspace
Wed Feb 18 02:11:46 2009: Preallocating file 10
Wed Feb 18 02:11:46 2009: file_size = 360MB
Wed Feb 18 02:11:46 2009: PreallocationThread has finished
Wed Feb 18 02:11:46 2009: QM Stopping: 9
Wed Feb 18 02:11:46 2009: Saving list of peers to 9
Wed Feb 18 02:11:47 2009: The torrent 10 has stalled longer then 5 minutes, decreasing it's priority
Wed Feb 18 02:11:47 2009: QM Starting: 11
Wed Feb 18 02:11:47 2009: Starting download 11
Wed Feb 18 02:11:47 2009: Pre-allocating diskspace
Wed Feb 18 02:11:47 2009: QM Stopping: 10
Wed Feb 18 02:11:47 2009: Preallocating file 11.file1
Wed Feb 18 02:11:47 2009: file_size = 360MB
Wed Feb 18 02:11:47 2009: Preallocating file 11.file2
Wed Feb 18 02:11:47 2009: file_size = 3KB
Wed Feb 18 02:11:47 2009: PreallocationThread has finished
Wed Feb 18 02:11:47 2009: Saving list of peers to 10
Wed Feb 18 02:11:47 2009: The torrent 11 has stalled longer then 5 minutes, decreasing it's priority
Wed Feb 18 02:11:48 2009: QM Starting: 9
Wed Feb 18 02:11:48 2009: Starting download 9
Wed Feb 18 02:11:48 2009: Pre-allocating diskspace
Wed Feb 18 02:11:48 2009: File 9 already big enough
Wed Feb 18 02:11:48 2009: PreallocationThread has finished
Wed Feb 18 02:11:48 2009: QM Stopping: 11
Wed Feb 18 02:11:48 2009: Saving list of peers to 11 peer list
Wed Feb 18 02:11:48 2009: Loading list of peers from 9 peer list
Wed Feb 18 02:11:48 2009: Doing tracker request to url : event=started


After that were several more "started" tracker requests for several torrents and nothing else.
George
Moderator
Posts
5421
Karma
1

Wed Feb 18, 2009 5:16 pm
I will see if I can reproduce it, if you get a backtrace the next time this happens, post it here.
non7top
Registered Member
Posts
54
Karma
0
OS

Sat Feb 21, 2009 11:39 pm
I've also seen this a couple of times. Not sure when it was really happening but I was also thinking about the moments when some torrents finished. And with rc1 i;ve never seen this.
bw I also have email notifications script enabled
agforsyth
Registered Member
Posts
133
Karma
0

Sat Feb 28, 2009 6:13 pm
I'm a few days behind the latest version, but I had this crash again (preallocation threads go crazy when torrent completes) and caught the backtrace:
Code: Select all
Application: KTorrent (ktorrent), signal SIGSEGV
[Current thread is 0 (LWP 21862)]

Thread 3 (Thread 0xb330eb90 (LWP 21877)):
#0  0xb8016430 in __kernel_vsyscall ()
#1  0xb5e04412 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb6723344 in pthread_cond_timedwait () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7227159 in ?? () from /usr/lib/libQtCore.so.4
#4  0xb722728b in QThread::msleep () from /usr/lib/libQtCore.so.4
#5  0xb7f1f05d in net::DownloadThread::update (this=0x8fda3e0) at /home/adam/sources/ktorrent/libbtcore/net/downloadthread.cpp:108
#6  0xb7f1f908 in net::NetworkThread::run (this=0x8fda3e0) at /home/adam/sources/ktorrent/libbtcore/net/networkthread.cpp:48
#7  0xb722774e in ?? () from /usr/lib/libQtCore.so.4
#8  0xb5e004ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#9  0xb671449e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread 0xb2b0db90 (LWP 21878)):
#0  0xb8016430 in __kernel_vsyscall ()
#1  0xb5e040e5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb67232ed in pthread_cond_wait () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7228792 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#4  0xb7f1e5ae in net::UploadThread::update (this=0x8fda720) at /home/adam/sources/ktorrent/libbtcore/net/uploadthread.cpp:73
#5  0xb7f1f908 in net::NetworkThread::run (this=0x8fda720) at /home/adam/sources/ktorrent/libbtcore/net/networkthread.cpp:48
#6  0xb722774e in ?? () from /usr/lib/libQtCore.so.4
#7  0xb5e004ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#8  0xb671449e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb593bad0 (LWP 21862)):
[KCrash Handler]
#6  0xb722238d in QMutex::lock () from /usr/lib/libQtCore.so.4
#7  0xb7f9d158 in bt::PreallocationThread::errorHappened (this=0x0) at /home/adam/sources/ktorrent/libbtcore/diskio/preallocationthread.cpp:90
#8  0xb7f6c868 in bt::TorrentControl::preallocThreadDone (this=0x945e680) at /home/adam/sources/ktorrent/libbtcore/torrent/torrentcontrol.cpp:1963
#9  0xb7f6c983 in bt::TorrentControl::qt_metacall (this=0x945e680, _c=QMetaObject::InvokeMetaMethod, _id=26, _a=0x97e0758) at /home/adam/sources/ktorrent/build/libbtcore/torrentcontrol.moc:137
#10 0xb7325ddb in QMetaCallEvent::placeMetaCall () from /usr/lib/libQtCore.so.4
#11 0xb7327951 in QObject::event () from /usr/lib/libQtCore.so.4
#12 0xb6a0884c in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#13 0xb6a106ce in QApplication::notify () from /usr/lib/libQtGui.so.4
#14 0xb79f207d in KApplication::notify () from /usr/lib/libkdeui.so.5
#15 0xb7318021 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#16 0xb7318ca5 in QCoreApplicationPrivate::sendPostedEvents () from /usr/lib/libQtCore.so.4
#17 0xb7318e9d in QCoreApplication::sendPostedEvents () from /usr/lib/libQtCore.so.4
#18 0xb7342a0f in ?? () from /usr/lib/libQtCore.so.4
#19 0xb5d44af8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#20 0xb5d4805b in ?? () from /usr/lib/libglib-2.0.so.0
#21 0xb5d481d8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#22 0xb7342658 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#23 0xb6aa2e95 in ?? () from /usr/lib/libQtGui.so.4
#24 0xb73166ea in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#25 0xb73168aa in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#26 0xb7318f65 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#27 0xb6a086c7 in QApplication::exec () from /usr/lib/libQtGui.so.4
#28 0x08065309 in main (argc=1, argv=0xbfc348d4) at /home/adam/sources/ktorrent/ktorrent/main.cpp:171
George
Moderator
Posts
5421
Karma
1

Mon Mar 02, 2009 5:33 pm
OK, this should be fixed now


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar