Bug 232971 - Crash while downloading + seeding
Summary: Crash while downloading + seeding
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-01 15:57 UTC by Thomas Zander
Modified: 2010-04-03 16:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Zander 2010-04-01 15:57:59 UTC
I started downloading a torrent for the arch linux usb image and am seeding some prior downloaded torrents and without any user interaction (app window was hidden even) ktorrent crashes. Repeatedly.

First time this happens I only have it in a konsole;
Warning: Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
Warning: Calling appendChild() on a null node does nothing.

Warning: QSocketNotifier: Invalid socket 14 and type 'Read', disabling...
Warning: QSocketNotifier: Invalid socket 16 and type 'Read', disabling...
Warning: ktorrent: Fatal IO error: client killed
KCrash: Application 'ktorrent' crashing...
sock_file=/home/zander/.kde/socket-mac/kdeinit4__0
Fatal Error: Accessed global static 'Log *global_log()' after destruction. Defined at /home/zander/work/kde/network/ktorrent/libbtcore/util/log.cpp:262
Unable to start Dr. Konqi


second time (after an update to svn rev 1109744) I start it in gdb and get the following backtrace

Program received signal SIGSEGV, Segmentation fault.
memcpy () at ../sysdeps/x86_64/memcpy.S:267
267     ../sysdeps/x86_64/memcpy.S: No such file or directory.
        in ../sysdeps/x86_64/memcpy.S
Current language:  auto
The current source language is "auto; currently asm".
(gdb) bt
#0  memcpy () at ../sysdeps/x86_64/memcpy.S:267
#1  0x00007ffff7af60c1 in bt::WebSeed::handleData(QByteArray const&) ()
   from /home/zander/work/kde/build-trunk-nodebug/installed/lib/libbtcore.so.13
#2  0x00007ffff7af6275 in bt::WebSeed::readData() ()
   from /home/zander/work/kde/build-trunk-nodebug/installed/lib/libbtcore.so.13
#3  0x00007ffff7af7cd8 in bt::WebSeed::update() ()
   from /home/zander/work/kde/build-trunk-nodebug/installed/lib/libbtcore.so.13
#4  0x00007ffff7aff945 in bt::Downloader::update() ()
   from /home/zander/work/kde/build-trunk-nodebug/installed/lib/libbtcore.so.13
#5  0x00007ffff7b1dfbc in bt::TorrentControl::update() ()
   from /home/zander/work/kde/build-trunk-nodebug/installed/lib/libbtcore.so.13
#6  0x000000000042b08b in kt::Core::update() ()
#7  0x0000000000432062 in kt::Core::qt_metacall(QMetaObject::Call, int, void**) ()
#8  0x00007ffff561d1df in QMetaObject::activate (sender=0x7fffe0003fe8, m=<value optimized out>, 
    local_signal_index=<value optimized out>, argv=0xb5)
    at /home/zander/work/qt46/src/corelib/kernel/qobject.cpp:3285
#9  0x00007ffff5619e33 in QObject::event (this=0x7fffe0003fe8, e=0x7fffffffd2c0)
    at /home/zander/work/qt46/src/corelib/kernel/qobject.cpp:1204
#10 0x00007ffff47b4abc in QApplicationPrivate::notify_helper (this=0x714700, 
    receiver=0x7fffe0003fe8, e=0x7fffffffd2c0)
    at /home/zander/work/qt46/src/gui/kernel/qapplication.cpp:4300
#11 0x00007ffff47bb0ab in QApplication::notify (this=0x7fffffffd5f0, receiver=0x7fffe0003fe8, 
    e=0x7fffffffd2c0) at /home/zander/work/qt46/src/gui/kernel/qapplication.cpp:4183
#12 0x00007ffff6c5fac6 in KApplication::notify(QObject*, QEvent*) ()
   from /home/zander/work/kde/build-trunk-nodebug/installed/lib/libkdeui.so.5
#13 0x00007ffff560a3fc in QCoreApplication::notifyInternal (this=0x7fffffffd5f0, 
    receiver=0x7fffe0003fe8, event=0x7fffffffd2c0)
    at /home/zander/work/qt46/src/corelib/kernel/qcoreapplication.cpp:704
#14 0x00007ffff5637032 in QCoreApplication::sendEvent (this=0x71ce20)
    at ../../include/QtCore/../../../../../qt46/src/corelib/kernel/qcoreapplication.h:215
#15 QTimerInfoList::activateTimers (this=0x71ce20)
    at /home/zander/work/qt46/src/corelib/kernel/qeventdispatcher_unix.cpp:603
#16 0x00007ffff5633c38 in timerSourceDispatch (source=<value optimized out>)
    at /home/zander/work/qt46/src/corelib/kernel/qeventdispatcher_glib.cpp:184
#17 idleTimerSourceDispatch (source=<value optimized out>)
    at /home/zander/work/qt46/src/corelib/kernel/qeventdispatcher_glib.cpp:231
#18 0x00007fffef7a3bbe in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#19 0x00007fffef7a7588 in ?? () from /lib/libglib-2.0.so.0
#20 0x00007fffef7a76b0 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#21 0x00007ffff5633903 in QEventDispatcherGlib::processEvents (this=0x6e3980, 
    flags=<value optimized out>)
    at /home/zander/work/qt46/src/corelib/kernel/qeventdispatcher_glib.cpp:412
#22 0x00007ffff486342e in QGuiEventDispatcherGlib::processEvents (this=0x0, 
    flags=<value optimized out>)
    at /home/zander/work/qt46/src/gui/kernel/qguieventdispatcher_glib.cpp:204
#23 0x00007ffff5608d22 in QEventLoop::processEvents (this=<value optimized out>, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
)
    at /home/zander/work/qt46/src/corelib/kernel/qeventloop.cpp:149
#24 0x00007ffff56090fc in QEventLoop::exec (this=0x7fffffffd560, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
)
    at /home/zander/work/qt46/src/corelib/kernel/qeventloop.cpp:201
#25 0x00007ffff560ce3b in QCoreApplication::exec ()
    at /home/zander/work/qt46/src/corelib/kernel/qcoreapplication.cpp:981
#26 0x0000000000428d94 in main ()
Comment 1 Joris Guisson 2010-04-01 18:04:59 UTC
Which version are you running ?
Comment 2 Thomas Zander 2010-04-01 18:38:21 UTC
running latest svn  (rev 1109744)
Comment 3 Joris Guisson 2010-04-01 18:56:08 UTC
Can you send me that torrent ? Lets see if I can reproduce it.
Comment 4 Thomas Zander 2010-04-01 19:21:48 UTC
I think this one is guilty;
ftp://ftp.archlinux.org/iso/2009.08/archlinux-2009.08-netinstall-i686.img.torrent
Comment 5 Joris Guisson 2010-04-03 16:46:14 UTC
SVN commit 1110536 by guisson:

Fix crash in webseed downloading code

BUG: 232971

 M  +1 -0      ChangeLog  
 M  +1 -1      ktorrent/main.cpp  
 M  +3 -1      libbtcore/diskio/cachefile.cpp  
 M  +8 -4      libbtcore/download/webseed.cpp  
 M  +5 -1      libbtcore/utp/connection.cpp  
 M  +1 -4      libbtcore/utp/connection.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1110536