Bug 295872

Summary: Kmail 4.8.1 crashes when reading email GMail IMAP folder
Product: [Applications] kmail2 Reporter: Stephan Diestelhorst <stephan.diestelhorst>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: crash CC: jlp, robert
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Stephan Diestelhorst 2012-03-12 21:39:28 UTC
Application: kmail (4.8.0)
KDE Platform Version: 4.8.1 (4.8.1)
Qt Version: 4.8.0
Operating System: Linux 3.1.4-030104-generic x86_64
Distribution: Ubuntu 11.10

-- Information about the crash:
- What I was doing when the application crashed:

I was reading the KDE PIM mailing list in my GMail account, while also compiling KDE PIM from GIT (with make -j4).  Mentioning this, since the current behaviour may be a data race triggered by timing caused by excessive system load.

Happened pretty reliably when opening the folder in my (large) GMail online IMAP folder. Once I have finished compiling KDE PIM from source, I can also test from there and / or patches.

The crash can be reproduced every time.

-- Backtrace:
Application: KMail (kmail), signal: Segmentation fault
__lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:97
	in ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
[Current thread is 1 (Thread 0x7f40c4e397c0 (LWP 3976))]

Thread 5 (Thread 0x7f40a37db700 (LWP 4005)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f40b7255c2c in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#2  0x00007f40b7255d59 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#3  0x00007f40bfd43efc in start_thread (arg=0x7f40a37db700) at pthread_create.c:304
#4  0x00007f40c21ae59d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f40a2eda700 (LWP 4006)):
#0  0x00007f40c21a2473 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f40bab3df68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f40bab3e429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f40c2b32c06 in QEventDispatcherGlib::processEvents (this=0x7f409c0008b0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f40c2b023e2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f40c2b02637 in QEventLoop::exec (this=0x7f40a2ed9dc0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f40c2a02067 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f40c2a0508b in QThreadPrivate::start (arg=0x19ff3d0) at thread/qthread_unix.cpp:298
#8  0x00007f40bfd43efc in start_thread (arg=0x7f40a2eda700) at pthread_create.c:304
#9  0x00007f40c21ae59d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f405bb7c700 (LWP 4029)):
#0  0x00007f40c21a2473 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f40bab3df68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f40bab3e429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f40c2b32c06 in QEventDispatcherGlib::processEvents (this=0x1ed35b0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f40c2b023e2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f40c2b02637 in QEventLoop::exec (this=0x7f405bb7bd90, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f40c2a02067 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f40c2ae217f in QInotifyFileSystemWatcherEngine::run (this=0x1dd1d10) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f40c2a0508b in QThreadPrivate::start (arg=0x1dd1d10) at thread/qthread_unix.cpp:298
#9  0x00007f40bfd43efc in start_thread (arg=0x7f405bb7c700) at pthread_create.c:304
#10 0x00007f40c21ae59d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f405b16c700 (LWP 4145)):
[KCrash Handler]
#6  0x00007f40c2145a14 in malloc_consolidate (av=0x7f409c000020) at malloc.c:5161
#7  0x00007f40c2146a4f in malloc_consolidate (av=0x7f409c000020) at malloc.c:5115
#8  _int_malloc (av=0x7f409c000020, bytes=65536) at malloc.c:4373
#9  0x00007f40c21493cd in __GI___libc_malloc (bytes=65536) at malloc.c:3660
#10 0x00007f40c2a07088 in QByteArray::realloc (this=0x7f409c0029a8, alloc=65504) at tools/qbytearray.cpp:1452
#11 0x00007f40c2a071a9 in QByteArray::resize (this=0x7f409c0029a8, size=32768) at tools/qbytearray.cpp:1420
#12 0x00007f40c1209a06 in reserve (bytes=2, this=0x7f409c0024d0) at ../../include/QtCore/private/../../../src/corelib/tools/qringbuffer_p.h:158
#13 QAbstractSocket::writeData (this=<optimized out>, data=0x7f405b16b5ec "\021", size=2) at socket/qabstractsocket.cpp:2315
#14 0x00007f40c2a964af in QIODevice::write (this=0x7f409c002970, data=0x7f405b16b5ec "\021", maxSize=<optimized out>) at io/qiodevice.cpp:1370
#15 0x00007f40b4785095 in ?? () from /usr/lib/libsopranoclient.so.1
#16 0x00007f40b478b28a in ?? () from /usr/lib/libsopranoclient.so.1
#17 0x00007f40b478ca03 in ?? () from /usr/lib/libsopranoclient.so.1
#18 0x00007f40bb57f0b2 in Nepomuk::MainModel::executeQuery (this=0x1987000, query=..., language=Soprano::Query::QueryLanguageSparql, userQueryLanguage=...) at ../../nepomuk/core/nepomukmainmodel.cpp:212
#19 0x00007f40bb56f083 in Nepomuk::ResourceData::load (this=0x7f409c012b10) at ../../nepomuk/core/resourcedata.cpp:417
#20 0x00007f40bb56f95c in Nepomuk::ResourceData::property (this=0x7f409c012b10, uri=...) at ../../nepomuk/core/resourcedata.cpp:265
#21 0x00007f40bb583893 in Nepomuk::Resource::property (this=0x7f405b16bcc0, uri=...) at ../../nepomuk/core/resource.cpp:301
#22 0x00007f40be8e27da in ?? () from /usr/lib/libmessagecore.so.4
#23 0x00007f40c29f85b2 in QThreadPoolThread::run (this=0x19487c0) at concurrent/qthreadpool.cpp:107
#24 0x00007f40c2a0508b in QThreadPrivate::start (arg=0x19487c0) at thread/qthread_unix.cpp:298
#25 0x00007f40bfd43efc in start_thread (arg=0x7f405b16c700) at pthread_create.c:304
#26 0x00007f40c21ae59d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#27 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f40c4e397c0 (LWP 3976)):
#0  __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:97
#1  0x00007f40c214b62f in _L_lock_10501 () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007f40c21499c1 in __GI___libc_free (mem=0x7f409c000020) at malloc.c:3736
#3  0x00007f40c2b14023 in QMetaCallEvent::~QMetaCallEvent (this=0x7f409c01b900, __in_chrg=<optimized out>) at kernel/qobject.cpp:511
#4  0x00007f40c2b14069 in QMetaCallEvent::~QMetaCallEvent (this=0x7f409c01b900, __in_chrg=<optimized out>) at kernel/qobject.cpp:518
#5  0x00007f40c2b073d3 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1254220) at kernel/qcoreapplication.cpp:1516
#6  0x00007f40c2b32773 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#7  postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:279
#8  0x00007f40bab3da5d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007f40bab3e258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007f40bab3e429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007f40c2b32b9f in QEventDispatcherGlib::processEvents (this=0x1255b00, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#12 0x00007f40c30cb21e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#13 0x00007f40c2b023e2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#14 0x00007f40c2b02637 in QEventLoop::exec (this=0x7fff3362c130, flags=...) at kernel/qeventloop.cpp:204
#15 0x00007f40c2b076c7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#16 0x0000000000402bd3 in ?? ()
#17 0x00007f40c20ec30d in __libc_start_main (main=0x4021a0, argc=3, ubp_av=0x7fff3362c6a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff3362c698) at libc-start.c:226
#18 0x00000000004030b5 in _start ()

This bug may be a duplicate of or related to bug 295474.

Possible duplicates by query: bug 295846, bug 295725, bug 294698, bug 293075, bug 284552.

Reported using DrKonqi
Comment 1 Stephan Diestelhorst 2012-03-12 22:01:12 UTC
Getting strange segfaults during the compilation, too. Might be that my HW platform is bogus. Will narrow that down first, and then report back here.
Comment 2 Robert Riemann 2012-03-13 08:23:03 UTC
Created attachment 69567 [details]
New crash information added by DrKonqi

kmail (4.8.0) on KDE Platform 4.8.1 (4.8.1) "release 478" using Qt 4.8.0

- What I was doing when the application crashed:

When the application crashed, I was just reading my gmail account. I also have big folders (inbox, kde mailinglist, etc.).

-- Backtrace (Reduced):
#13 0x00007f267721c558 in QByteArray::realloc (this=0x7f26040203e8, alloc=65504) at tools/qbytearray.cpp:1452
#14 0x00007f267721c679 in QByteArray::resize (this=0x7f26040203e8, size=32768) at tools/qbytearray.cpp:1420
#15 0x00007f2674d0f986 in reserve (bytes=2, this=0x7f2604002d70) at ../../src/corelib/tools/qringbuffer_p.h:158
#16 QAbstractSocket::writeData (this=<optimized out>, data=0x7f26130ee62c "\021", size=2) at socket/qabstractsocket.cpp:2315
#17 0x00007f26772aa82f in QIODevice::write (this=0x7f26040180c0, data=0x7f26130ee62c "\021", maxSize=<optimized out>) at io/qiodevice.cpp:1370
Comment 3 Christophe Marin 2012-03-31 23:05:09 UTC

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