Bug 260240

Summary: Crash when seeding many torrents.
Product: [Applications] ktorrent Reporter: thordn
Component: generalAssignee: Joris Guisson <joris.guisson>
Status: RESOLVED DUPLICATE    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Slackware   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description thordn 2010-12-16 00:59:43 UTC
Application: ktorrent (4.0.4)
KDE Platform Version: 4.4.3 (KDE 4.4.3)
Qt Version: 4.6.2
Operating System: Linux 2.6.33.4 x86_64
Distribution (Platform): Slackware Packages

-- Information about the crash:
I have about 1700 torrents in the list, seeding 500 of them. (also have about 100 allowed downloads) Ktorrent normally crashes within 15 minutes after start. Not more than about 10 torrents are upploading simoultaneously.

Messages on console:
========================================================

GLib-ERROR **: Cannot create pipe main loop wake-up: Too many open files

aborting...
KCrash: Application 'ktorrent' crashing...
sock_file=/home/tn/.kde/socket-hex/kdeinit4_localhost_16
kdeinit4: preparing to launch /usr/lib64/kde4/libexec/drkonqi
Warning: QSocketNotifier: Invalid socket 202 and type 'Write', disabling...
 Warning: QSocketNotifier: Invalid socket 31 and type 'Write', disabling..

<snip - a few 100 similar lines more - >
 
Warning: QSocketNotifier: Invalid socket 424 and type 'Write', disabling...
Warning: QSocketNotifier: Invalid socket 26 and type 'Write', disabling...

warning: the debug information found in "/usr/lib64/libqca.so.2.0.2.debug" does 
not match "/usr/lib64/libqca.so.2" (CRC mismatch).

Warning: ktorrent: Fatal IO error: client killed
Unable to start Dr. Konqi

warning: the debug information found in "/usr/lib64/qt/plugins/crypto/libqca-cyr
us-sasl.so.debug" does not match "/usr/lib64/qt/plugins/crypto/libqca-cyrus-sasl
.so" (CRC mismatch).

warning: the debug information found in "/usr/lib64/qt/plugins/crypto/libqca-gnu
pg.so.debug" does not match "/usr/lib64/qt/plugins/crypto/libqca-gnupg.so" (CRC 
mismatch).

warning: the debug information found in "/usr/lib64/qt/plugins/crypto/libqca-oss
l.so.debug" does not match "/usr/lib64/qt/plugins/crypto/libqca-ossl.so" (CRC mi
smatch).

kdeinit4: preparing to launch /usr/lib64/kde4/kio_http.so
kdeinit4: preparing to launch /usr/lib64/kde4/kio_http.so
knotify(30111) KNotify::event: 3881  ref= 0
knotify(30111) KNotify::event: 3882  ref= 0

==============================================================



The crash can be reproduced every time.

 -- Backtrace:
Application: KTorrent (ktorrent), signal: Aborted
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.2200.5-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
[Current thread is 1 (Thread 0x7f353c590760 (LWP 2693))]

Thread 6 (Thread 0x7f351abb1710 (LWP 2705)):
#0  0x00007f3539885a49 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f3539b1a195 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00007f3539b1a2f0 in QThread::msleep(unsigned long) () from /usr/lib64/libQtCore.so.4
#3  0x00007f353c0aa87d in net::DownloadThread::update (this=0x6e1ae0) at /thome/tn/sw/x/libktorrent-1.0.4/src/net/downloadthread.cpp:91
#4  0x00007f353c0ab169 in net::NetworkThread::run (this=0x6e1ae0) at /thome/tn/sw/x/libktorrent-1.0.4/src/net/networkthread.cpp:48
#5  0x00007f3539b1a815 in ?? () from /usr/lib64/libQtCore.so.4
#6  0x00007f3539880980 in start_thread () from /lib64/libpthread.so.0
#7  0x00007f353817557d in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f351a3b0710 (LWP 2706)):
#0  0x00007f3539885a49 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f3539b1a195 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00007f3539b1a2f0 in QThread::msleep(unsigned long) () from /usr/lib64/libQtCore.so.4
#3  0x00007f353c0a9f2d in net::UploadThread::update (this=0x6e2130) at /thome/tn/sw/x/libktorrent-1.0.4/src/net/uploadthread.cpp:89
#4  0x00007f353c0ab169 in net::NetworkThread::run (this=0x6e2130) at /thome/tn/sw/x/libktorrent-1.0.4/src/net/networkthread.cpp:48
#5  0x00007f3539b1a815 in ?? () from /usr/lib64/libQtCore.so.4
#6  0x00007f3539880980 in start_thread () from /lib64/libpthread.so.0
#7  0x00007f353817557d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f351b3b2710 (LWP 2740)):
#0  0x00007f3539885a49 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f3539b1b742 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f3539b10c19 in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00007f3539b1a815 in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f3539880980 in start_thread () from /lib64/libpthread.so.0
#5  0x00007f353817557d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f35192e4710 (LWP 2741)):
#0  0x00007f353816bec3 in poll () from /lib64/libc.so.6
#1  0x00007f3534227383 in send_dg () from /lib64/libresolv.so.2
#2  0x00007f3534229004 in __libc_res_nsend () from /lib64/libresolv.so.2
#3  0x00007f3534225635 in __libc_res_nquery () from /lib64/libresolv.so.2
#4  0x00007f3534225bf1 in __libc_res_nquerydomain () from /lib64/libresolv.so.2
#5  0x00007f3534226604 in __libc_res_nsearch () from /lib64/libresolv.so.2
#6  0x00007f351c3b82c8 in _nss_dns_gethostbyname3_r () from /lib64/libnss_dns.so.2
#7  0x00007f351c3b8584 in _nss_dns_gethostbyname2_r () from /lib64/libnss_dns.so.2
#8  0x00007f353815db23 in gaih_inet () from /lib64/libc.so.6
#9  0x00007f353815f712 in getaddrinfo () from /lib64/libc.so.6
#10 0x00007f353a918ba3 in ?? () from /usr/lib64/libQtNetwork.so.4
#11 0x00007f353a90e73c in ?? () from /usr/lib64/libQtNetwork.so.4
#12 0x00007f3539b10b89 in ?? () from /usr/lib64/libQtCore.so.4
#13 0x00007f3539b1a815 in ?? () from /usr/lib64/libQtCore.so.4
#14 0x00007f3539880980 in start_thread () from /lib64/libpthread.so.0
#15 0x00007f353817557d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f351cde2710 (LWP 2742)):
[KCrash Handler]
#5  0x00007f35380c45a5 in raise () from /lib64/libc.so.6
#6  0x00007f35380c5db0 in abort () from /lib64/libc.so.6
#7  0x00007f35339700da in g_logv () from /usr/lib64/libglib-2.0.so.0
#8  0x00007f3533970163 in g_log () from /usr/lib64/libglib-2.0.so.0
#9  0x00007f3533966b40 in ?? () from /usr/lib64/libglib-2.0.so.0
#10 0x00007f3533966bf5 in g_main_context_new () from /usr/lib64/libglib-2.0.so.0
#11 0x00007f3539c389f5 in QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(_GMainContext*) () from /usr/lib64/libQtCore.so.4
#12 0x00007f3539c38c50 in QEventDispatcherGlib::QEventDispatcherGlib(QObject*) () from /usr/lib64/libQtCore.so.4
#13 0x00007f3539b1a68f in ?? () from /usr/lib64/libQtCore.so.4
#14 0x00007f3539b1a7f5 in ?? () from /usr/lib64/libQtCore.so.4
#15 0x00007f3539880980 in start_thread () from /lib64/libpthread.so.0
#16 0x00007f353817557d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f353c590760 (LWP 2693)):
#0  0x00007f353816bec3 in poll () from /lib64/libc.so.6
#1  0x00007f353396973c in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f3533969a80 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f3539c38306 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007f3538e4077e in ?? () from /usr/lib64/libQtGui.so.4
#5  0x00007f3539c0d742 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007f3539c0db1c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#7  0x00007f3539c1185b in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#8  0x000000000042852b in main (argc=<value optimized out>, argv=<value optimized out>) at /thome/tn/sw/x/ktorrent-4.0.4/ktorrent/main.cpp:176

Possible duplicates by query: bug 238451, bug 230056, bug 228163.

Reported using DrKonqi
Comment 1 Joris Guisson 2010-12-16 18:09:34 UTC
This is a known issue, which will be addressed in 4.2

You are hitting the maximum open file limit. Seeing that you are running an extreme amount of torrents, I suggest you increase it.

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