Bug 170376 - crash on connect | (KNetwork::KBufferedSocket::slotWriteActivity)
Summary: crash on connect | (KNetwork::KBufferedSocket::slotWriteActivity)
Status: RESOLVED WORKSFORME
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: knetwork (show other bugs)
Version: 4.1
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Thiago Macieira
URL:
Keywords:
: 170684 171216 172227 172381 174770 176256 176906 177222 181457 185424 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-04 12:29 UTC by Daniel Dumitrache
Modified: 2010-02-26 03:03 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
valgrind-Trace of kopete crash (89.60 KB, text/plain)
2008-11-08 14:35 UTC, Markus Brueckner
Details
Valgrind backtrace as requested. (32.58 KB, text/plain)
2008-11-17 17:56 UTC, Roland Wolters
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Dumitrache 2008-09-04 12:29:19 UTC
Version:            (using KDE 4.1.1)
OS:                Linux
Installed from:    Ubuntu Packages

Kopete crashes when connecting to my yahoo account. No special config, just added the account, and Kopete crashes while trying to connect.

Here's the backtrace:
Application: Kopete (kopete), signal SIGSEGV
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb595d940 (LWP 18258)]
(no debugging symbols found)
[KCrash handler]
#6  0xb64149bc in memcpy () from /lib/tls/i686/cmov/libc.so.6
#7  0xb77f765a in ?? () from /usr/lib/kde4/lib/libkdecore.so.5
#8  0xb77e3689 in KNetwork::KBufferedSocket::slotWriteActivity ()
   from /usr/lib/kde4/lib/libkdecore.so.5
#9  0xb77e346b in KNetwork::KBufferedSocket::qt_metacall ()
   from /usr/lib/kde4/lib/libkdecore.so.5
#10 0xb755ff79 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#11 0xb7560642 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#12 0xb759d6b3 in QSocketNotifier::activated () from /usr/lib/libQtCore.so.4
#13 0xb756660f in QSocketNotifier::event () from /usr/lib/libQtCore.so.4
#14 0xb6a21f9c in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#15 0xb6a26bf9 in QApplication::notify () from /usr/lib/libQtGui.so.4
#16 0xb7a3f1c3 in KApplication::notify () from /usr/lib/kde4/lib/libkdeui.so.5
#17 0xb754b0b9 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#18 0xb7576883 in ?? () from /usr/lib/libQtCore.so.4
#19 0xb5f35dd6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#20 0xb5f39193 in ?? () from /usr/lib/libglib-2.0.so.0
#21 0xb5f3974e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#22 0xb75769f8 in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#23 0xb6ab5a25 in ?? () from /usr/lib/libQtGui.so.4
#24 0xb754a33d in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#25 0xb754a4cd in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#26 0xb754c74d in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#27 0xb6a21897 in QApplication::exec () from /usr/lib/libQtGui.so.4
#28 0x08087efb in ?? ()
#29 0xb63b7450 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#30 0x080644b1 in _start ()
#0  0xb7efa410 in __kernel_vsyscall ()
Comment 1 Markus Brueckner 2008-11-05 11:11:50 UTC
Looks like the same crash I am getting when trying to globally connect (one Jabber account, one ICQ account. The missing part in #7 seems to be KSocketBuffer::sendTo. There are only two memcpy-calls in there, but I am not sure which one is responsible. Please see the backtrace. OS is Ubuntu 8.10, KDE is installed from the Ubuntu packages.

Anwendung: Kopete (kopete), Signal SIGSEGV
[Thread debugging using libthread_db enabled]
[New Thread 0xb59066c0 (LWP 5594)]
[New Thread 0xb1eb4b90 (LWP 5602)]
[New Thread 0xb29f3b90 (LWP 5601)]
[KCrash handler]
#6  0xb644eb56 in memcpy () from /lib/tls/i686/cmov/libc.so.6
#7  0x09fccf78 in ?? ()
#8  0xb78262c0 in KNetwork::KBufferedSocket::slotWriteActivity (
    this=0xa029ad4)
    at /build/buildd/kde4libs-4.1.2/kdecore/network/k3bufferedsocket.cpp:349
#9  0xb78260f0 in KNetwork::KBufferedSocket::qt_metacall (this=0x9e68230,
    _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xbf84bbfc)
    at /build/buildd/kde4libs-4.1.2/obj-i486-linux-gnu/kdecore/k3bufferedsocket.moc:68
#10 0xb7592a60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#11 0xb75937e2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#12 0xb75cd633 in QSocketNotifier::activated () from /usr/lib/libQtCore.so.4
#13 0xb7598637 in QSocketNotifier::event () from /usr/lib/libQtCore.so.4
#14 0xb6a5f8ec in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#15 0xb6a6776e in QApplication::notify () from /usr/lib/libQtGui.so.4
#16 0xb7abd72d in KApplication::notify (this=0xbf84c22c, receiver=0x9e1efb0,
    event=0xbf84bfc0)
    at /build/buildd/kde4libs-4.1.2/kdeui/kernel/kapplication.cpp:311
#17 0xb757de61 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#18 0xb75a870a in ?? () from /usr/lib/libQtCore.so.4
#19 0xb5f5f6f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#20 0xb5f62da3 in ?? () from /usr/lib/libglib-2.0.so.0
#21 0xb5f62f61 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#22 0xb75a8478 in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#23 0xb6af9ee5 in ?? () from /usr/lib/libQtGui.so.4
#24 0xb757c52a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#25 0xb757c6ea in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#26 0xb757eda5 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#27 0xb6a5f767 in QApplication::exec () from /usr/lib/libQtGui.so.4
#28 0x0808aa6f in main (argc=1, argv=0xbf84c614)
    at /build/buildd/kdenetwork-4.1.2/kopete/kopete/main.cpp:102
#0  0xb804d430 in __kernel_vsyscall ()
Comment 2 Dominik Tritscher 2008-11-05 12:52:18 UTC
I can confirm this issue using the KDE4.1.2 packages frum OpenSuSE 11.1beta.
But as this seems to be related to KBufferedSocket, this should be assigned to kdelibs instead of kopete.
Comment 3 Markus Brueckner 2008-11-07 23:40:23 UTC
After an update to 4.1.3 (using package from Kubuntu backports) it still crashes but at least with a "better" backtrace. Hooray progress! ;-)
So the crash is indeed in KSocketBuffer::sendTo.

Anwendung: Kopete (kopete), Signal SIGSEGV
[Thread debugging using libthread_db enabled]
[New Thread 0xb581e6c0 (LWP 30473)]
[New Thread 0xb172ab90 (LWP 30486)]
[New Thread 0xb272cb90 (LWP 30480)]
[KCrash handler]
#6  0xb6366b71 in memcpy () from /lib/tls/i686/cmov/libc.so.6
#7  0xb77543f0 in KNetwork::Internal::KSocketBuffer::sendTo (this=0x9ed3dc8, 
    dev=0x9f010c0, len=-1) at /usr/include/bits/string3.h:52
#8  0xb773e350 in KNetwork::KBufferedSocket::slotWriteActivity (
    this=0xa654e00)
    at /build/buildd/kde4libs-4.1.3/kdecore/network/k3bufferedsocket.cpp:349
#9  0xb773e180 in KNetwork::KBufferedSocket::qt_metacall (this=0xa654e00, 
    _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xbfc67c3c)
    at /build/buildd/kde4libs-4.1.3/obj-i486-linux-gnu/kdecore/k3bufferedsocket.moc:68
#10 0xb74aaa60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#11 0xb74ab7e2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#12 0xb74e5633 in QSocketNotifier::activated () from /usr/lib/libQtCore.so.4
#13 0xb74b0637 in QSocketNotifier::event () from /usr/lib/libQtCore.so.4
#14 0xb69778ec in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#15 0xb697f76e in QApplication::notify () from /usr/lib/libQtGui.so.4
#16 0xb79d5b2d in KApplication::notify (this=0xbfc6826c, receiver=0xa335890, 
    event=0xbfc68000)
    at /build/buildd/kde4libs-4.1.3/kdeui/kernel/kapplication.cpp:311
#17 0xb7495e61 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#18 0xb74c070a in ?? () from /usr/lib/libQtCore.so.4
#19 0xb5e776f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#20 0xb5e7ada3 in ?? () from /usr/lib/libglib-2.0.so.0
#21 0xb5e7af61 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#22 0xb74c0478 in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#23 0xb6a11ee5 in ?? () from /usr/lib/libQtGui.so.4
#24 0xb749452a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#25 0xb74946ea in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#26 0xb7496da5 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#27 0xb6977767 in QApplication::exec () from /usr/lib/libQtGui.so.4
#28 0x0808aa6f in main (argc=3, argv=0xbfc68654)
    at /build/buildd/kdenetwork-4.1.3/kopete/kopete/main.cpp:102
#0  0xb7f68430 in __kernel_vsyscall ()
Comment 4 Dominik Tritscher 2008-11-08 08:29:37 UTC
Moved to kdelibs, as this is caused by KNetwork.
Comment 5 Thiago Macieira 2008-11-08 12:01:37 UTC
Can someone paste/attach a valgrind trace of the crash?
Comment 6 Markus Brueckner 2008-11-08 14:35:42 UTC
Created attachment 28412 [details]
valgrind-Trace of kopete crash

Here you go: the valgrind trace of the crash.
Comment 7 Thiago Macieira 2008-11-08 15:10:10 UTC
Thank you, but the trace is showing something impossible: the socket classes and QImage share no memory.

Also, the line number is somewhere in string3.h, which is not a KDE file. That indicates inlined functions. Can someone reproduce this problem on a debug build?
Comment 8 Roman Jarosz 2008-11-08 20:51:16 UTC
*** Bug 172381 has been marked as a duplicate of this bug. ***
Comment 9 Roman Jarosz 2008-11-08 20:52:28 UTC
*** Bug 170684 has been marked as a duplicate of this bug. ***
Comment 10 Roman Jarosz 2008-11-08 20:53:45 UTC
*** Bug 172227 has been marked as a duplicate of this bug. ***
Comment 11 Roman Jarosz 2008-11-08 20:54:21 UTC
*** Bug 171216 has been marked as a duplicate of this bug. ***
Comment 12 Christophe Marin 2008-11-10 15:20:28 UTC
*** Bug 174770 has been marked as a duplicate of this bug. ***
Comment 13 Roland Wolters 2008-11-17 17:56:17 UTC
Created attachment 28640 [details]
Valgrind backtrace as requested.

Here is a valgrind backtrace as requested. Unfortunately, there is also a
VALGRIND INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) - exiting
inside this backtrace, so I'm not sure if that is helpful.

The crash occurs when logging into a jabber account with some 200 users.

The command to start valgrind was
valgrind --log-file=KopeteLog kopete
, the valgrind version is
valgrind-3.3.1-Debian
(Kubuntu packages).

The according gdb backtrace is:
#0  0x00007f9371aa03eb in memcpy () from /lib/libc.so.6
#1  0x00007f937431c926 in KNetwork::Internal::KSocketBuffer::sendTo (this=0x1f73c10, dev=0x1916a00, len=-1) at /usr/include/bits/string3.h:52
#2  0x00007f93743092be in KNetwork::KBufferedSocket::slotWriteActivity (this=0x19b1fb0) at /build/buildd/kde4libs-4.1.3/kdecore/network/k3bufferedsocket.cpp:349
#3  0x00007f9374309167 in KNetwork::KBufferedSocket::qt_metacall (this=0x19b1fb0, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=<value optimized out>)
    at /build/buildd/kde4libs-4.1.3/obj-x86_64-linux-gnu/kdecore/k3bufferedsocket.moc:68
#4  0x00007f9373ecf134 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#5  0x00007f9373f057de in QSocketNotifier::activated () from /usr/lib/libQtCore.so.4
#6  0x00007f9373ed4c43 in QSocketNotifier::event () from /usr/lib/libQtCore.so.4
#7  0x00007f9372793c3d in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#8  0x00007f937279b9ea in QApplication::notify () from /usr/lib/libQtGui.so.4
#9  0x00007f9374aa1fcb in KApplication::notify (this=0x7fff7ded5930, receiver=0x7f935c000a30, event=0x7fff7ded5640) at /build/buildd/kde4libs-4.1.3/kdeui/kernel/kapplication.cpp:311
#10 0x00007f9373ebad61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#11 0x00007f9373ee33d9 in ?? () from /usr/lib/libQtCore.so.4
#12 0x00007f936eb0dd3b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#13 0x00007f936eb1150d in ?? () from /usr/lib/libglib-2.0.so.0
#14 0x00007f936eb116cb in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#15 0x00007f9373ee315f in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#16 0x00007f9372825a9f in ?? () from /usr/lib/libQtGui.so.4
#17 0x00007f9373eb9682 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#18 0x00007f9373eb980d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#19 0x00007f9373ebbcbd in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#20 0x0000000000448ddc in main (argc=2, argv=0x7fff7ded66e8) at /build/buildd/kdenetwork-4.1.3/kopete/kopete/main.cpp:102
Comment 14 Thiago Macieira 2008-11-17 19:40:40 UTC
Thank you, but this valgrind trace doesn't help in finding out what the problem is. It is saying that the memory was freed by QAbstractFileEngine, which makes no sense at all.
Comment 15 Daniel Quinn 2008-12-04 19:53:04 UTC
*** Bug 176906 has been marked as a duplicate of this bug. ***
Comment 16 Dario Andres 2008-12-05 20:49:53 UTC
*** Bug 176256 has been marked as a duplicate of this bug. ***
Comment 17 Dario Andres 2008-12-08 21:57:32 UTC
*** Bug 177222 has been marked as a duplicate of this bug. ***
Comment 18 Markus Brueckner 2009-01-27 00:04:30 UTC
Has been quiet for some time now, so I thought I'd share positive news. KDE 4.2RC seems to be fixing the problem under Kubuntu at least. It's been about a week now without crashes on connect.
Comment 19 Dario Andres 2009-01-29 23:47:57 UTC
*** Bug 181457 has been marked as a duplicate of this bug. ***
Comment 20 Dario Andres 2009-02-24 23:20:56 UTC
*** Bug 185424 has been marked as a duplicate of this bug. ***
Comment 21 Dario Andres 2009-05-20 21:31:52 UTC
Any news on this? Does anyone have experienced this crash again ? Seems to be fixed on 4.2+
Regards
Comment 22 Vladimir Korenev 2009-05-20 22:04:52 UTC
I have never got this crash in 4.2. In 4.1.x that happened very often.
I think this bug can be closed as fixed.
Comment 23 Dario Andres 2010-02-26 03:03:15 UTC
It seems that this bug reappeared on recent KDE SC versions (and specially on 4.4.0): we are tracking the reports at bug 200536 (just a reference). Regards