Bug 246835 - KTorrent crashed right after kicking some peers.
Summary: KTorrent crashed right after kicking some peers.
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:
: 267096 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-05 21:07 UTC by Martin Walch
Modified: 2011-02-24 21:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Walch 2010-08-05 21:07:30 UTC
Application: ktorrent (4.1dev)
KDE Platform Version: 4.4.5 (KDE 4.4.5) (Compiled from sources)
Qt Version: 4.6.2
Operating System: Linux 2.6.34-gentoo-r1 x86_64
Distribution: "Gentoo Base System release 2.0.1"

-- Information about the crash:
Loaded plugins: infowidget, zeroconf

KTorrent crashed right after I kicked some peers on the "Peers" tab from the infowidget. They shared the same IP address with other peers (most of them had a score of -50 and none of them downloaded anything).

 -- Backtrace:
Application: KTorrent (ktorrent), signal: Aborted
The current source language is "auto; currently asm".
[Current thread is 1 (Thread 0x7fa60ddeb760 (LWP 2519))]

Thread 4 (Thread 0x7fa600ccb710 (LWP 2530)):
#0  0x00007fa60d95bb4d in QBasicAtomicInt::ref (this=0xb1c210) at /usr/include/qt4/QtCore/qatomic_x86_64.h:121
#1  QtSharedPointer::ExternalRefCount<net::Socket>::ref (this=0xb1c210) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:325
#2  ExternalRefCount (this=0xb1c210) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:376
#3  QSharedPointer (this=0xb1c210) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:453
#4  dht::RPCServer::Private::run (this=0xb1c210) at /var/tmp/portage/net-libs/libktorrent-9999/work/libktorrent-9999/src/dht/rpcserver.cpp:97
#5  0x00007fa60b2ca3ec in QThreadPrivate::start (arg=0xb1c210) at thread/qthread_unix.cpp:248
#6  0x00007fa60b037900 in start_thread (arg=<value optimized out>) at pthread_create.c:297
#7  0x00007fa60963efed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 3 (Thread 0x7fa5f5073710 (LWP 2874)):
#0  net::Socket::ready (this=0xffeb10, p=0x8281e0, mode=net::Poll::INPUT) at /var/tmp/portage/net-libs/libktorrent-9999/work/libktorrent-9999/src/net/socket.cpp:460
#1  0x00007fa60d8f2172 in net::DownloadThread::update (this=0x8281d0) at /var/tmp/portage/net-libs/libktorrent-9999/work/libktorrent-9999/src/net/downloadthread.cpp:65
#2  0x00007fa60d8f2be1 in net::NetworkThread::run (this=0x8281d0) at /var/tmp/portage/net-libs/libktorrent-9999/work/libktorrent-9999/src/net/networkthread.cpp:48
#3  0x00007fa60b2ca3ec in QThreadPrivate::start (arg=0x8281d0) at thread/qthread_unix.cpp:248
#4  0x00007fa60b037900 in start_thread (arg=<value optimized out>) at pthread_create.c:297
#5  0x00007fa60963efed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
The current source language is "auto; currently c++".

Thread 2 (Thread 0x7fa5f4872710 (LWP 2875)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:211
#1  0x00007fa60b2c9d19 in thread_sleep (ti=0x7fa5f4871d90) at thread/qthread_unix.cpp:398
#2  0x00007fa60b2c9e61 in QThread::msleep (msecs=<value optimized out>) at thread/qthread_unix.cpp:424
#3  0x00007fa60d8f18cd in net::UploadThread::update (this=0x828820) at /var/tmp/portage/net-libs/libktorrent-9999/work/libktorrent-9999/src/net/uploadthread.cpp:89
#4  0x00007fa60d8f2be1 in net::NetworkThread::run (this=0x828820) at /var/tmp/portage/net-libs/libktorrent-9999/work/libktorrent-9999/src/net/networkthread.cpp:48
#5  0x00007fa60b2ca3ec in QThreadPrivate::start (arg=0x828820) at thread/qthread_unix.cpp:248
#6  0x00007fa60b037900 in start_thread (arg=<value optimized out>) at pthread_create.c:297
#7  0x00007fa60963efed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7fa60ddeb760 (LWP 2519)):
[KCrash Handler]
#5  0x00007fa60959e129 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#6  0x00007fa60959f58d in *__GI_abort () at abort.c:92
#7  0x00007fa60d8e3621 in QtMessageOutput (type=<value optimized out>, 
    msg=0x2e3a128 "ASSERT failure in QPersistentModelIndex::~QPersistentModelIndex: \"persistent model indexes corrupted\", file kernel/qabstractitemmodel.cpp, line 544")
    at /var/tmp/portage/net-libs/libktorrent-9999/work/libktorrent-9999/src/util/log.cpp:305
#8  0x00007fa60b2c0c41 in qt_message_output (msgType=QtFatalMsg, buf=0x9d7 <Address 0x9d7 out of bounds>) at global/qglobal.cpp:2196
#9  0x00007fa60b2c0e1d in qt_message (msgType=QtFatalMsg, msg=0x7fa60b438518 "ASSERT failure in %s: \"%s\", file %s, line %d", ap=0x7fff3366d8f0) at global/qglobal.cpp:2296
#10 0x00007fa60b2c0fca in qFatal (msg=0x9d7 <Address 0x9d7 out of bounds>) at global/qglobal.cpp:2479
#11 0x00007fa60b3c10af in QAbstractItemModelPrivate::removePersistentIndexData (this=0x3232d80, data=0x337ca80) at kernel/qabstractitemmodel.cpp:543
#12 0x00007fa60b3c153c in QPersistentModelIndexData::destroy (data=0x337ca80) at kernel/qabstractitemmodel.cpp:83
#13 0x00007fa60b3c1640 in QPersistentModelIndex::operator= (this=0x3236638, other=...) at kernel/qabstractitemmodel.cpp:225
#14 0x00007fa60a80d9f2 in QItemSelectionModelPrivate::_q_rowsAboutToBeRemoved (this=<value optimized out>, parent=..., start=<value optimized out>, end=<value optimized out>)
    at itemviews/qitemselectionmodel.cpp:583
#15 0x00007fa60a80e13f in QItemSelectionModel::qt_metacall (this=0x3153fd0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff3366e0b0)
    at .moc/debug-shared/moc_qitemselectionmodel.cpp:136
#16 0x00007fa60d616afa in kt::ItemSelectionModel::qt_metacall (this=0x9d7, _c=2519, _id=6, _a=0xffffffffffffffff)
    at /var/tmp/portage/net-p2p/ktorrent-9999/work/ktorrent-9999_build/libktcore/moc_itemselectionmodel.cpp:67
#17 0x00007fa60b3e39e6 in QMetaObject::activate (sender=0x3232a70, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3285
#18 0x00007fa60b434baf in QAbstractItemModel::rowsAboutToBeRemoved (this=0x9d7, _t1=<value optimized out>, _t2=3, _t3=3) at .moc/debug-shared/moc_qabstractitemmodel.cpp:188
#19 0x00007fa60b3c46df in QAbstractItemModel::beginRemoveRows (this=0x3232a70, parent=..., first=3, last=3) at kernel/qabstractitemmodel.cpp:2447
#20 0x00007fa5fafe9190 in kt::PeerViewModel::removeRows (this=0x3232a70, row=3, count=1) at /var/tmp/portage/net-p2p/ktorrent-9999/work/ktorrent-9999/plugins/infowidget/peerviewmodel.cpp:369
#21 0x00007fa5fafe9a74 in kt::PeerViewModel::peerRemoved (this=<value optimized out>, peer=0x15c5990)
    at /var/tmp/portage/net-p2p/ktorrent-9999/work/ktorrent-9999/plugins/infowidget/peerviewmodel.cpp:241
#22 0x00007fa60d93a0f1 in bt::TorrentControl::qt_metacall (this=0x7fa5fec8e580, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff3366e380)
    at /var/tmp/portage/net-libs/libktorrent-9999/work/libktorrent-9999_build/src/torrentcontrol.moc:127
#23 0x00007fa60b3e39e6 in QMetaObject::activate (sender=0x7fa5fec91dc0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3285
#24 0x00007fa60d903f11 in bt::PeerManager::peerKilled (this=0x9d7, _t1=0x15c5980) at /var/tmp/portage/net-libs/libktorrent-9999/work/libktorrent-9999_build/src/peermanager.moc:103
#25 0x00007fa60d9067a3 in bt::PeerManager::update (this=0x7fa5fec91dc0) at /var/tmp/portage/net-libs/libktorrent-9999/work/libktorrent-9999/src/peer/peermanager.cpp:143
#26 0x00007fa60d93a99e in bt::TorrentControl::update (this=0x7fa5fec8e580) at /var/tmp/portage/net-libs/libktorrent-9999/work/libktorrent-9999/src/torrent/torrentcontrol.cpp:164
#27 0x000000000042e6d3 in kt::Core::update (this=0x9414a0) at /var/tmp/portage/net-p2p/ktorrent-9999/work/ktorrent-9999/ktorrent/core.cpp:1030
#28 0x000000000043242d in kt::Core::qt_metacall (this=0x9414a0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff3366e700)
    at /var/tmp/portage/net-p2p/ktorrent-9999/work/ktorrent-9999_build/ktorrent/core.moc:157
#29 0x00007fa60b3e39e6 in QMetaObject::activate (sender=0x9414c8, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3285
#30 0x00007fa60b3dedc6 in QObject::event (this=0x9414c8, e=0x9d7) at kernel/qobject.cpp:1204
#31 0x00007fa60a236375 in QApplicationPrivate::notify_helper (this=0x8541c0, receiver=0x9414c8, e=0x7fff3366ee70) at kernel/qapplication.cpp:4300
#32 0x00007fa60a23eadf in QApplication::notify (this=0x7fff3366f1d0, receiver=<value optimized out>, e=0x7fff3366ee70) at kernel/qapplication.cpp:4183
#33 0x000000000043c3d8 in kt::App::notify (this=0x7fff3366f1d0, receiver=0x9414c8, event=0x7fff3366ee70) at /var/tmp/portage/net-p2p/ktorrent-9999/work/ktorrent-9999/ktorrent/app.cpp:97
#34 0x00007fa60b3cd84c in QCoreApplication::notifyInternal (this=0x7fff3366f1d0, receiver=0x9414c8, event=0x7fff3366ee70) at kernel/qcoreapplication.cpp:704
#35 0x00007fa60b3fe643 in QCoreApplication::sendEvent (this=0x85c980) at kernel/qcoreapplication.h:215
#36 QTimerInfoList::activateTimers (this=0x85c980) at kernel/qeventdispatcher_unix.cpp:603
#37 0x00007fa60b3faed8 in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:184
#38 idleTimerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:231
#39 0x00007fa60588723e in g_main_dispatch (context=<value optimized out>) at gmain.c:1960
#40 IA__g_main_context_dispatch (context=<value optimized out>) at gmain.c:2513
#41 0x00007fa60588b050 in g_main_context_iterate (context=0x85bd20, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2591
#42 0x00007fa60588b1f0 in IA__g_main_context_iteration (context=0x85bd20, may_block=1) at gmain.c:2654
#43 0x00007fa60b3faba5 in QEventDispatcherGlib::processEvents (this=0x826190, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#44 0x00007fa60a2f1102 in QGuiEventDispatcherGlib::processEvents (this=0x9d7, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#45 0x00007fa60b3cbfb8 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#46 0x00007fa60b3cc3c5 in QEventLoop::exec (this=0x7fff3366f140, flags=) at kernel/qeventloop.cpp:201
#47 0x00007fa60b3cea15 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#48 0x000000000042bb94 in main (argc=<value optimized out>, argv=<value optimized out>) at /var/tmp/portage/net-p2p/ktorrent-9999/work/ktorrent-9999/ktorrent/main.cpp:176
The current source language is "auto; currently asm".

Reported using DrKonqi
Comment 1 Martin Walch 2010-08-05 21:09:42 UTC
I totally forgot to mention: the snapshot of KTorrent I use is from yesterday (2010-08-04).
Comment 2 Joris Guisson 2010-08-07 15:06:26 UTC
SVN commit 1160234 by guisson:

Make ChunkDownloadView and PeerView use a QSortFilterProxyModel, should also fix a crash

BUG: 246835

 M  +1 -0      ChangeLog  
 M  +31 -66    plugins/infowidget/chunkdownloadmodel.cpp  
 M  +7 -11     plugins/infowidget/chunkdownloadmodel.h  
 M  +6 -5      plugins/infowidget/chunkdownloadview.cpp  
 M  +4 -1      plugins/infowidget/chunkdownloadview.h  
 M  +8 -8      plugins/infowidget/peerview.cpp  
 M  +3 -1      plugins/infowidget/peerview.h  
 M  +44 -118   plugins/infowidget/peerviewmodel.cpp  
 M  +7 -12     plugins/infowidget/peerviewmodel.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1160234
Comment 3 Joris Guisson 2011-02-24 21:52:02 UTC
*** Bug 267096 has been marked as a duplicate of this bug. ***