Bug 258765 - Segmentation fault when downloading many torrents simultaneously
Summary: Segmentation fault when downloading many torrents simultaneously
Status: RESOLVED DUPLICATE of bug 247984
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-04 05:47 UTC by drvik
Modified: 2010-12-04 10:55 UTC (History)
0 users

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 drvik 2010-12-04 05:47:40 UTC
Application: ktorrent (4.0.3)
KDE Platform Version: 4.5.1 (KDE 4.5.1)
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:

After a few minutesof letting ktorrent downloads, a seg fault occurs....

I thought this was associated with "Too many open files" errors but I have used ulimit to increase open filles to 16384... maximum TCP connections set to 4000...

Running mythbuntu 10.10 on an SSD, downloads being saved to linux RAID5 formatted with XFS.... 1gb RAM, with 2GB swap....

The crash can be reproduced every time.

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

Thread 7 (Thread 0x7ffaf9d79710 (LWP 2678)):
#0  0x00007ffb052acf7e in ?? () from /lib/libglib-2.0.so.0
#1  0x00007ffb052ad45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#2  0x00007ffb0bf341e6 in QEventDispatcherGlib::processEvents (this=0x267d080, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#3  0x00007ffb0bf06a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#4  0x00007ffb0bf06dec in QEventLoop::exec (this=0x7ffaf9d78db0, flags=) at kernel/qeventloop.cpp:201
#5  0x00007ffb0be112fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#6  0x00007ffb0e48b15e in utp::UTPServerThread::run (this=0x267ba90) at ../../src/utp/utpserverthread.cpp:44
#7  0x00007ffb0be1427e in QThreadPrivate::start (arg=0x267ba90) at thread/qthread_unix.cpp:266
#8  0x00007ffb0bb89971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#9  0x00007ffb0a45e94d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7ffaf9578710 (LWP 2679)):
#0  0x00007ffb0a4572e3 in select () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007ffb0e452212 in dht::RPCServerThread::run (this=0x26d9bd0) at ../../src/dht/rpcserver.cpp:107
#2  0x00007ffb0be1427e in QThreadPrivate::start (arg=0x26d9bd0) at thread/qthread_unix.cpp:266
#3  0x00007ffb0bb89971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#4  0x00007ffb0a45e94d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7ffaf2006710 (LWP 2738)):
#0  0x00007ffb0bb8b665 in __pthread_mutex_lock (mutex=0x5dc22b8) at pthread_mutex_lock.c:61
#1  0x00007ffb052ad131 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007ffb052ad45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007ffb0bf341e6 in QEventDispatcherGlib::processEvents (this=0x52cc920, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#4  0x00007ffb0bf06a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#5  0x00007ffb0bf06dec in QEventLoop::exec (this=0x7ffaf2005db0, flags=) at kernel/qeventloop.cpp:201
#6  0x00007ffb0be112fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#7  0x00007ffb0bee65f8 in QInotifyFileSystemWatcherEngine::run (this=0x53c6a60) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007ffb0be1427e in QThreadPrivate::start (arg=0x53c6a60) at thread/qthread_unix.cpp:266
#9  0x00007ffb0bb89971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#10 0x00007ffb0a45e94d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7ffaf2807710 (LWP 2746)):
#0  net::DownloadThread::update (this=0x255c320) at ../../src/net/downloadthread.cpp:59
#1  0x00007ffb0e3f02c9 in net::NetworkThread::run (this=0x255c320) at ../../src/net/networkthread.cpp:48
#2  0x00007ffb0be1427e in QThreadPrivate::start (arg=0x255c320) at thread/qthread_unix.cpp:266
#3  0x00007ffb0bb89971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#4  0x00007ffb0a45e94d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7ffafa57a710 (LWP 2747)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007ffb0be13533 in QMutexPrivate::wait (this=0x255c2a0, timeout=-1) at thread/qmutex_unix.cpp:84
#2  0x00007ffb0be0eee5 in QMutex::lock (this=0x6d9088) at thread/qmutex.cpp:167
#3  0x00007ffb0e3eec0d in net::UploadThread::waitForSocketsReady (this=0x255c990) at ../../src/net/uploadthread.cpp:112
#4  0x00007ffb0e3eee86 in net::UploadThread::update (this=0x255c2ec) at ../../src/net/uploadthread.cpp:45
#5  0x00007ffb0e3f02c9 in net::NetworkThread::run (this=0x255c990) at ../../src/net/networkthread.cpp:48
#6  0x00007ffb0be1427e in QThreadPrivate::start (arg=0x255c990) at thread/qthread_unix.cpp:266
#7  0x00007ffb0bb89971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#8  0x00007ffb0a45e94d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7ffaf1805710 (LWP 2748)):
#0  0x00007ffb0a452203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=5000) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007ffb05b66383 in send_dg (statp=0x7ffaf1805dc8, buf=<value optimized out>, buflen=<value optimized out>, buf2=0x0, buflen2=<value optimized out>, ansp=<value optimized out>, anssizp=0x7ffaf1803950, terrno=0x7ffaf18038f8, ns=0, v_circuit=0x7ffaf18038f4, gotsomewhere=0x7ffaf18038fc, anscp=0x7ffaf1804400, ansp2=0x0, anssizp2=0x0, resplen2=0x0) at res_send.c:1066
#2  0x00007ffb05b68004 in __libc_res_nsend (statp=0x7ffaf1805dc8, buf=<value optimized out>, buflen=<value optimized out>, buf2=0x0, buflen2=<value optimized out>, ans=0x7ffaf1803b70 "\207\t\201\200", anssiz=1024, ansp=0x7ffaf1804400, ansp2=0x0, nansp2=0x0, resplen2=0x0) at res_send.c:556
#3  0x00007ffb05b64665 in __libc_res_nquery (statp=0x7ffaf1805dc8, name=<value optimized out>, class=<value optimized out>, type=<value optimized out>, answer=0x7ffaf1803b70 "\207\t\201\200", anslen=<value optimized out>, answerp=0x7ffaf1804400, answerp2=0x0, nanswerp2=0x0, resplen2=0x0) at res_query.c:225
#4  0x00007ffaf03ddfd1 in _nss_dns_gethostbyaddr2_r (addr=<value optimized out>, len=<value optimized out>, af=2, result=<value optimized out>, buffer=<value optimized out>, buflen=<value optimized out>, errnop=0x7ffaf1805698, h_errnop=0x7ffaf1804b8c, ttlp=0x0) at nss_dns/dns-host.c:471
#5  0x00007ffaf03de145 in _nss_dns_gethostbyaddr_r (addr=0x7ffaf1803810, len=1, af=5000, result=0xffffffffffffffff, buffer=0x0, buflen=0, errnop=0x7ffaf1805698, h_errnop=0x7ffaf1804b8c) at nss_dns/dns-host.c:530
#6  0x00007ffb0a479598 in __gethostbyaddr_r (addr=0x7ffacc44cd24, len=4, type=<value optimized out>, resbuf=0x7ffaf1804b50, buffer=<value optimized out>, buflen=<value optimized out>, result=0x7ffaf1804b80, h_errnop=0x7ffaf1804b8c) at ../nss/getXXbyYY_r.c:253
#7  0x00007ffb0a47fb8b in getnameinfo (sa=0x7ffacc44cd20, addrlen=<value optimized out>, host=0x7ffaf1804cb0 "", hostlen=199, serv=0x7ffaf1804be0 "", servlen=199, flags=<value optimized out>) at getnameinfo.c:223
#8  0x00007ffb0e3f2f4f in net::ReverseResolver::resolve (this=<value optimized out>, addr=...) at ../../src/net/reverseresolver.cpp:64
#9  0x00007ffb0e3f2ff0 in net::ReverseResolver::run (this=0x7ffaec014100) at ../../src/net/reverseresolver.cpp:73
#10 0x00007ffb0e3f31dd in net::ReverseResolverThread::run (this=0x7ffaeca0d500) at ../../src/net/reverseresolver.cpp:118
#11 0x00007ffb0be1427e in QThreadPrivate::start (arg=0x7ffaeca0d500) at thread/qthread_unix.cpp:266
#12 0x00007ffb0bb89971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#13 0x00007ffb0a45e94d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#14 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ffb0e8d7760 (LWP 2676)):
[KCrash Handler]
#6  memcpy () at ../sysdeps/x86_64/memcpy.S:267
#7  0x00007ffb09e790b6 in QCA::MemoryRegion::MemoryRegion(QByteArray const&) () from /usr/lib/libqca.so.2
#8  0x00007ffb09e8f4c5 in QCA::Hash::update(QByteArray const&) () from /usr/lib/libqca.so.2
#9  0x00007ffb0e3d84ab in bt::SHA1HashGen::update (this=0x9ec2110, data=0x7ffb0e71f000 "\204p\363\334\030\017\070n\372\333\275\367\240", len=16384) at ../../src/util/sha1hashgen.cpp:240
#10 0x00007ffb0e4130e3 in bt::ChunkDownload::updateHash (this=0x9ec2050) at ../../src/download/chunkdownload.cpp:555
#11 0x00007ffb0e4152e8 in bt::ChunkDownload::piece (this=0x9ec2050, p=..., ok=<value optimized out>) at ../../src/download/chunkdownload.cpp:127
#12 0x00007ffb0e41bbde in bt::Downloader::pieceReceived (this=0x3a081b0, p=...) at ../../src/download/downloader.cpp:134
#13 0x00007ffb0e3ff315 in bt::Peer::packetReady (this=0xc776900, packet=0x7ffaf4874bc0 "\a", len=<value optimized out>) at ../../src/peer/peer.cpp:283
#14 0x00007ffb0e40a248 in bt::PacketReader::update (this=0xd3628a0) at ../../src/peer/packetreader.cpp:141
#15 0x00007ffb0e3fe0d5 in bt::Peer::update (this=0xc776900) at ../../src/peer/peer.cpp:538
#16 0x00007ffb0e403995 in bt::PeerManager::update (this=0x39f9850) at ../../src/peer/peermanager.cpp:144
#17 0x00007ffb0e4358a4 in bt::TorrentControl::update (this=0x39bf4c0) at ../../src/torrent/torrentcontrol.cpp:163
#18 0x00000000004289fb in kt::Core::update (this=0x7ffaf4003e70) at ../../ktorrent/core.cpp:1030
#19 0x0000000000431222 in kt::Core::qt_metacall (this=0x7ffaf4003e70, _c=QMetaObject::InvokeMetaMethod, _id=215663064, _a=0x7fff95e37480) at ./core.moc:167
#20 0x00007ffb0bf1fb27 in QMetaObject::activate (sender=0x7ffaf4003e98, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x600) at kernel/qobject.cpp:3280
#21 0x00007ffb0bf198f9 in QObject::event (this=0x7ffaf4003e98, e=0x7ffb0e720000) at kernel/qobject.cpp:1183
#22 0x00007ffb0b051fdc in QApplicationPrivate::notify_helper (this=0x25927e0, receiver=0x7ffaf4003e98, e=0x7fff95e37bb0) at kernel/qapplication.cpp:4396
#23 0x00007ffb0b057aed in QApplication::notify (this=0x7fff95e37ee0, receiver=0x7ffaf4003e98, e=0x7fff95e37bb0) at kernel/qapplication.cpp:4277
#24 0x0000000000437d1a in kt::App::notify (this=0xcdad1d8, receiver=0x7ffb0e720000, event=0x4000) at ../../ktorrent/app.cpp:97
#25 0x00007ffb0bf07cdc in QCoreApplication::notifyInternal (this=0x7fff95e37ee0, receiver=0x7ffaf4003e98, event=0x7fff95e37bb0) at kernel/qcoreapplication.cpp:732
#26 0x00007ffb0bf376f2 in sendEvent (this=0x258b1b0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#27 QTimerInfoList::activateTimers (this=0x258b1b0) at kernel/qeventdispatcher_unix.cpp:602
#28 0x00007ffb0bf344c8 in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:184
#29 idleTimerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:231
#30 0x00007ffb052a9342 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#31 0x00007ffb052ad2a8 in ?? () from /lib/libglib-2.0.so.0
#32 0x00007ffb052ad45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#33 0x00007ffb0bf34193 in QEventDispatcherGlib::processEvents (this=0x255a320, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#34 0x00007ffb0b104a4e in QGuiEventDispatcherGlib::processEvents (this=0xcdad1d8, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#35 0x00007ffb0bf06a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#36 0x00007ffb0bf06dec in QEventLoop::exec (this=0x7fff95e37e50, flags=) at kernel/qeventloop.cpp:201
#37 0x00007ffb0bf0aebb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#38 0x0000000000426a8b in main (argc=<value optimized out>, argv=<value optimized out>) at ../../ktorrent/main.cpp:176

Possible duplicates by query: bug 258248, bug 257314, bug 256822, bug 256348, bug 256345.

Reported using DrKonqi
Comment 1 Joris Guisson 2010-12-04 10:55:25 UTC

*** This bug has been marked as a duplicate of bug 247984 ***