Bug 363723

Summary: Kmail crashes when "Server supports sieve" enabled
Product: [Applications] kmail2 Reporter: Mike Goodwin <mike>
Component: sieveAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WORKSFORME    
Severity: crash CC: bugs, carmelo.piccione, montel, shtetldik, tom, tommy.lehmann, wouter
Priority: NOR Keywords: drkonqi
Version: 5.1.3   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: sieve scripts and config that crashes kmail

Description Mike Goodwin 2016-05-30 23:07:54 UTC
Application: kmail (5.1.3)

Qt Version: 5.6.0
Frameworks Version: 5.22.0
Operating System: Linux 4.5.5-300.fc24.x86_64 x86_64
Distribution (Platform): Fedora RPMs

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

Starting kmail from the launcher

- Unusual behavior I noticed:

Kmail and kontact seem to be segfaulting on launch

OS is upgraded Fedora KDE 23 to 24 beta

The crash can be reproduced sometimes.

-- Backtrace:
Application: KMail (kmail), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f920f4a2940 (LWP 31793))]

Thread 22 (Thread 0x7f9167fff700 (LWP 31835)):
#0  0x00007f92236b3f69 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f922eba6276 in QWaitCondition::wait(QMutex*, unsigned long) () from /lib64/libQt5Core.so.5
#2  0x00007f922eba1922 in QThreadPoolThread::run() () from /lib64/libQt5Core.so.5
#3  0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#4  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#5  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 21 (Thread 0x7f917d202700 (LWP 31832)):
#0  0x00007f92226c6b64 in g_mutex_unlock () from /lib64/libglib-2.0.so.0
#1  0x00007f9222681f70 in g_main_context_prepare () from /lib64/libglib-2.0.so.0
#2  0x00007f922268296b in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#3  0x00007f9222682b5c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#4  0x00007f922edd369b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f922ed7a8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#6  0x00007f922eba03f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#7  0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#8  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#9  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 20 (Thread 0x7f917ebfd700 (LWP 31830)):
#0  0x00007f922df84c4d in poll () from /lib64/libc.so.6
#1  0x00007f9222682a46 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f9222682b5c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f922edd369b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f922ed7a8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f922eba03f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#7  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#8  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 19 (Thread 0x7f917f3fe700 (LWP 31820)):
#0  0x00007f92226c6b49 in g_mutex_lock () from /lib64/libglib-2.0.so.0
#1  0x00007f922268247c in g_main_context_check () from /lib64/libglib-2.0.so.0
#2  0x00007f92226829e4 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#3  0x00007f9222682b5c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#4  0x00007f922edd369b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f922ed7a8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#6  0x00007f922eba03f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#7  0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#8  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#9  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 18 (Thread 0x7f917ffff700 (LWP 31819)):
#0  0x00007f92236b3bc0 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f92277b48a3 in JSC::GCThread::gcThreadMain() () from /lib64/libQt5WebKit.so.5
#2  0x00007f9227af0934 in WTF::wtfThreadEntryPoint(void*) () from /lib64/libQt5WebKit.so.5
#3  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#4  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 17 (Thread 0x7f9194bc6700 (LWP 31818)):
#0  0x00007f92236b3bc0 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f92277b48a3 in JSC::GCThread::gcThreadMain() () from /lib64/libQt5WebKit.so.5
#2  0x00007f9227af0934 in WTF::wtfThreadEntryPoint(void*) () from /lib64/libQt5WebKit.so.5
#3  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#4  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 16 (Thread 0x7f91953c7700 (LWP 31817)):
#0  0x00007f92236b3bc0 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f92277b48a3 in JSC::GCThread::gcThreadMain() () from /lib64/libQt5WebKit.so.5
#2  0x00007f9227af0934 in WTF::wtfThreadEntryPoint(void*) () from /lib64/libQt5WebKit.so.5
#3  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#4  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 15 (Thread 0x7f9195bc8700 (LWP 31816)):
#0  0x00007f92236b3bc0 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f92277b3751 in JSC::BlockAllocator::blockFreeingThreadMain() () from /lib64/libQt5WebKit.so.5
#2  0x00007f9227af0934 in WTF::wtfThreadEntryPoint(void*) () from /lib64/libQt5WebKit.so.5
#3  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#4  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 14 (Thread 0x7f9196ffb700 (LWP 31814)):
#0  0x00007f922df84c4d in poll () from /lib64/libc.so.6
#1  0x00007f9222682a46 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f9222682b5c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f922edd369b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f922ed7a8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f922eba03f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#7  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#8  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 13 (Thread 0x7f91977fc700 (LWP 31812)):
#0  0x00007f92226824cd in g_main_context_check () from /lib64/libglib-2.0.so.0
#1  0x00007f92226829e4 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f9222682b5c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f922edd369b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f922ed7a8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f922eba03f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#7  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#8  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 12 (Thread 0x7f9197ffd700 (LWP 31810)):
#0  0x00007f92226822cc in g_main_context_check () from /lib64/libglib-2.0.so.0
#1  0x00007f92226829e4 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f9222682b5c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f922edd369b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f922ed7a8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f922eba03f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#7  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#8  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 11 (Thread 0x7f91e37fe700 (LWP 31809)):
#0  0x00007f92236b3bc0 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f9227abfc3b in WTF::TCMalloc_PageHeap::scavengerThread() () from /lib64/libQt5WebKit.so.5
#2  0x00007f9227abfc79 in WTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /lib64/libQt5WebKit.so.5
#3  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#4  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 10 (Thread 0x7f91e3fff700 (LWP 31807)):
#0  0x00007f922df84c4d in poll () from /lib64/libc.so.6
#1  0x00007f9222682a46 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f9222682b5c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f922edd369b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f922ed7a8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f922eba03f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#7  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#8  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 9 (Thread 0x7f91fcdea700 (LWP 31805)):
#0  0x00007f92226823b0 in g_main_context_check () from /lib64/libglib-2.0.so.0
#1  0x00007f92226829e4 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f9222682b5c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f922edd369b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f922ed7a8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f922eba03f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#7  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#8  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7f91fd5eb700 (LWP 31803)):
#0  0x00007f922df84c4d in poll () from /lib64/libc.so.6
#1  0x00007f9222682a46 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f9222682b5c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f922edd369b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f922ed7a8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f922eba03f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#7  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#8  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7f91fddec700 (LWP 31801)):
#0  0x00007f922df84c4d in poll () from /lib64/libc.so.6
#1  0x00007f9222682a46 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f9222682b5c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f922edd369b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f922ed7a8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f922eba03f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#7  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#8  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f91fe5ed700 (LWP 31799)):
#0  0x00007f9222653128 in ?? () from /lib64/libglib-2.0.so.0
#1  0x00007f9222682a46 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f9222682b5c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f922edd369b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#4  0x00007f922ed7a8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f922eba03f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#6  0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#7  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#8  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f91fedee700 (LWP 31797)):
#0  0x00007f922df9ed85 in clock_gettime () from /lib64/libc.so.6
#1  0x00007f922ec51306 in qt_gettime() () from /lib64/libQt5Core.so.5
#2  0x00007f922edd1249 in QTimerInfoList::updateCurrentTime() () from /lib64/libQt5Core.so.5
#3  0x00007f922edd17f5 in QTimerInfoList::timerWait(timespec&) () from /lib64/libQt5Core.so.5
#4  0x00007f922edd2b8e in timerSourcePrepare(_GSource*, int*) () from /lib64/libQt5Core.so.5
#5  0x00007f9222681f7d in g_main_context_prepare () from /lib64/libglib-2.0.so.0
#6  0x00007f922268296b in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#7  0x00007f9222682b5c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#8  0x00007f922edd369b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#9  0x00007f922ed7a8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#10 0x00007f922eba03f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#11 0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#12 0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#13 0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f91ff5ef700 (LWP 31796)):
#0  0x00007f922267faa1 in g_source_iter_next () from /lib64/libglib-2.0.so.0
#1  0x00007f9222681f1b in g_main_context_prepare () from /lib64/libglib-2.0.so.0
#2  0x00007f922268296b in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#3  0x00007f9222682b5c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#4  0x00007f922edd369b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#5  0x00007f922ed7a8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#6  0x00007f922eba03f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#7  0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#8  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#9  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f9204f29700 (LWP 31795)):
#0  0x00007f922eb9cfb0 in QMutex::lock() () from /lib64/libQt5Core.so.5
#1  0x00007f922edd2d2f in postEventSourcePrepare(_GSource*, int*) () from /lib64/libQt5Core.so.5
#2  0x00007f9222681f7d in g_main_context_prepare () from /lib64/libglib-2.0.so.0
#3  0x00007f922268296b in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#4  0x00007f9222682b5c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#5  0x00007f922edd369b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#6  0x00007f922ed7a8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#7  0x00007f922eba03f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#8  0x00007f922f5713b9 in QDBusConnectionManager::run() () from /lib64/libQt5DBus.so.5
#9  0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#10 0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#11 0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f9206282700 (LWP 31794)):
#0  0x00007f922df84c4d in poll () from /lib64/libc.so.6
#1  0x00007f921e446f80 in _xcb_conn_wait () from /lib64/libxcb.so.1
#2  0x00007f921e448b79 in xcb_wait_for_event () from /lib64/libxcb.so.1
#3  0x00007f920815f0f9 in QXcbEventReader::run() () from /lib64/libQt5XcbQpa.so.5
#4  0x00007f922eba543f in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#5  0x00007f92236ae5ba in start_thread () from /lib64/libpthread.so.0
#6  0x00007f922df907cd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f920f4a2940 (LWP 31793)):
[KCrash Handler]
#5  0x00007f922ec3215e in QString::append(QString const&) () from /lib64/libQt5Core.so.5
#6  0x00007f922ce2b9dd in KSieveUi::VacationCheckJob::getNextScript() () from /lib64/libKF5KSieveUi.so.5
#7  0x00007f922ce2ba88 in KSieveUi::VacationCheckJob::getNextScript() () from /lib64/libKF5KSieveUi.so.5
#8  0x00007f922ce2c23c in KSieveUi::VacationCheckJob::slotGetResult(KManageSieve::SieveJob*, bool, QString const&, bool) () from /lib64/libKF5KSieveUi.so.5
#9  0x00007f922edaa94e in QMetaObject::activate(QObject*, int, int, void**) () from /lib64/libQt5Core.so.5
#10 0x00007f9228a36b0b in KManageSieve::SieveJob::gotScript(KManageSieve::SieveJob*, bool, QString const&, bool) () from /lib64/libKF5KManageSieve.so.5
#11 0x00007f9228a34c2d in KManageSieve::SieveJob::Private::handleResponse(KManageSieve::Response const&, QByteArray const&) () from /lib64/libKF5KManageSieve.so.5
#12 0x00007f9228a2b7e1 in KManageSieve::Session::processResponse(KManageSieve::Response const&, QByteArray const&) () from /lib64/libKF5KManageSieve.so.5
#13 0x00007f922edab41c in QObject::event(QEvent*) () from /lib64/libQt5Core.so.5
#14 0x00007f923014e31f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#15 0x00007f923015355f in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#16 0x00007f922ed7cb98 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#17 0x00007f922ed7eb62 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQt5Core.so.5
#18 0x00007f922edd3273 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQt5Core.so.5
#19 0x00007f9222682703 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#20 0x00007f9222682ab0 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#21 0x00007f9222682b5c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#22 0x00007f922edd367f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#23 0x00007f922ed7a8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#24 0x00007f922ed8328c in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#25 0x00005583613e1321 in main ()

Reported using DrKonqi
Comment 1 Mike Goodwin 2016-05-31 04:13:00 UTC
*** Bug 363722 has been marked as a duplicate of this bug. ***
Comment 2 Mike Goodwin 2016-05-31 04:17:58 UTC
Noticing the sieve remarks in the last thread, I turned off sieve support for my kolab server account and have not been able to reproduce the bug again. I restarted kontact and kmail ten times each to confirm. 

After enabling sieve again, both crash 1-2 seconds after the main window renders. 

Changing something from my initial report, it does not *ALWAYS* crash, but does so 90% of the time. Every once in a while it starts normally and functions properly...
Comment 3 Laurent Montel 2016-05-31 05:03:55 UTC
Do you have script in sieve server or not ?
Regards
Comment 4 Mike Goodwin 2016-05-31 05:08:55 UTC
Yes I do.

Two separate scripts. One named "roundcube" (because that is the default created by kolab/roundcube on setup" and a separate one I named "Default" that I currently use. 

Default mostly contains stuff like:

# rule:[kde-lists-fpo]
if header :contains "list-id" "kde.lists.fedoraproject.org"
{
	fileinto "Mailing Lists/Fedora/kde";
	stop;
}

While roundcube empty (but contains a header comment)

I see where this is going so I'll try and do some more sleuthing with regard to a specific rule, or maybe the empty file and report back if I find anything.
Comment 5 Mike Goodwin 2016-05-31 05:24:11 UTC
Some findings:

1. Neither script causes the problem when enabled separately/individually. 
2. When both are enabled is when the crash happens, only then. 
3. Related problem: 
     a. When using the checkbox action to disable/enable scripts, selecting or unselecting either one results in the message "Sieve operation failed The server responded: script errors:" 
     b. After clicking ok, the circular refreshing icon is perpetually present. You must restart the client for that to go away
     c. Checking the result of the action with roundcube separately, you can see that it actually carried the enable/disable action before erroring out (i.e. the script that was unchecked/checked is enabled/disabled)

I do not believe there to be errors in the scripts as they were generated with roundcube. If you know of a way to syntax check or lint sieve scripts, that would be useful.
Comment 6 Mike Goodwin 2016-05-31 05:27:34 UTC
I see that the built-in kmail sieve script editor has a syntax checker (now that I can get to it), and it is reporting "No errors found" for both scripts.
Comment 7 Laurent Montel 2016-05-31 06:00:53 UTC
How are you able to activate both ?
in kmail or roundcube ?
Comment 8 Mike Goodwin 2016-05-31 06:01:54 UTC
I can enable both in roundcube
Comment 9 Laurent Montel 2016-05-31 06:12:37 UTC
I activated two sieve script in roundcube+kolab too but I can't have crash.
What is your kdepim version ? kmail version ? see in about dialogbox please.

5.1.x ? 5.2.x ?
Comment 10 Mike Goodwin 2016-05-31 06:16:09 UTC
Version 5.1.3
Using:
  KDE Frameworks 5.22.0
  Qt 5.6.0 (built against 5.6.0)
  The xcb windowing system

$ rpm -qa | egrep "kmail|kdepim"
kdepim-libs-15.12.3-1.fc24.x86_64
kdepimlibs-kxmlrpcclient-4.14.10-13.fc24.x86_64
kmail-15.12.3-1.fc24.x86_64
kdepimlibs-akonadi-4.14.10-13.fc24.x86_64
kdepim-runtime-15.12.3-1.fc24.x86_64
kdepimlibs-4.14.10-13.fc24.x86_64
kmail-libs-15.12.3-1.fc24.x86_64
kdepim-runtime-libs-15.12.3-1.fc24.x86_64
kdepim-common-15.12.3-1.fc24.x86_64
kf5-kmailtransport-15.12.3-1.fc24.x86_64
kdepimlibs-gpgme-4.14.10-13.fc24.x86_64
Comment 11 Mike Goodwin 2016-05-31 06:36:10 UTC
Created attachment 99280 [details]
sieve scripts and config that crashes kmail

Hmm, I did some more testing. This is turning out to seem like a very specific edge case.

I made a new blank script called "test". So now I have 

1. Default (has real scripts) - enabled
2. roundcube (blank) - disabled
3. test (blank) - enabled

This combination doesn't crash.  Nor does 1-disabled, 2-enabled, 3-enabled; or 1-enabled, 2-disabled, 3-disabled. 

Only 1-enabled, 2-enabled, 3-(n/a or disabled) crashes.

The literal contents of the sieve scripts are attached. I confirmed that it crashed kmail before I tarred them directly from my kolab server. Hopefully that helps. 

I only noticed this because I upgraded from F23 to F24 today. I didn't see this crash in 4.x version of kmail
Comment 12 Mike Goodwin 2016-05-31 06:58:27 UTC
... And it gets even stranger. There are lots of possibilities here so as I try them all I try to report back here.

ONLY "Default' also crashes, so:

1. "Default" - crashes

2. "Default" + "roundcube" (Literal contents are '/* empty script */') with roundcube enabled crashes. 

3. "Default" + "~roundcube~" ( same as above but roundcube is now disabled ) does not crash. 

In other words, it seems like the problem is more or less "Default script crashes unless a second AND disabled script is present"
Comment 13 Wouter Haffmans 2016-06-05 15:27:19 UTC
*** Bug 363987 has been marked as a duplicate of this bug. ***
Comment 14 Wouter Haffmans 2016-06-05 15:34:01 UTC
I have a similar crash (Arch Linux, see bug 363987 - already marked as dupe). My setup has 4 different Kolab mailboxes and one GMail without Sieve support.

Account 1: a "Filters" enabled script, and a disabled "roundcube" script
Account 2: one disabled "Filters" script.
NOTE: The syntax checker of KMail succeeds, but trying to enable this one from KMail results in an error: "Sieve operation failed. The server responded: script errors:" (no further details)
Account 3: an enabled "Filters" script
Account 4: an enabled "roundcube" script

All scripts were edited through Roundcube.
Comment 15 Justin T. Frisch 2016-06-06 19:00:24 UTC
this bug hit me after i installed a new imap account (without custom sieve filters)
i had another imap account installed that uses a sieve script
Comment 16 Justin T. Frisch 2016-06-06 19:22:55 UTC
Adding the section

[siever]
SieveSupport=false

to the newly created akonadi_imap_resource_5rc file in ~/.config solved the problem.
Apparently the creation of a new imap resource missed adding this necessary section.
Comment 17 Wouter Haffmans 2017-03-22 00:08:50 UTC
I still experience this crash with the current (2017-03-21) source build.

Digging through the code and the stack trace, it seems the problem is in libksieve's VacationCheckJob::getNextScript() method.

This code does a range of mScriptPos check on a list mAvailableScripts (through isLastScript()), but then doesn't return. This causes "mAvailableScripts[mScriptPos]" (line 185 in vacationcheckjob.cpp) to be out of range and triggers the crash.

It seems to me that adding a return statement if the last script is reached will solve the crash, but I haven't confirmed that yet.
Comment 18 Laurent Montel 2017-03-22 08:11:14 UTC
Git commit 45beafbe61cee226aa9083abdf24f1f2ed7c0269 by Montel Laurent.
Committed on 22/03/2017 at 08:10.
Pushed by mlaurent into branch 'Applications/17.04'.

We need a return here.

Thanks to Wouter Haffmans to investigate it.

M  +1    -0    src/ksieveui/vacation/vacationcheckjob.cpp

https://commits.kde.org/libksieve/45beafbe61cee226aa9083abdf24f1f2ed7c0269
Comment 19 Wouter Haffmans 2017-04-21 20:14:51 UTC
I haven't seen this crash anymore since applying the fix. As far as I'm concerned I think this can be closed.
Comment 20 Christoph Feck 2017-05-12 21:01:59 UTC
*** Bug 379573 has been marked as a duplicate of this bug. ***
Comment 21 Shmerl 2017-09-08 03:37:31 UTC
I was bitten by this because Debian testing is still using Kmail 16.04.3. I can confirm, that setting SieveSupport=false manually in config file for the corresponding resource helped to work around it.
Comment 22 Christoph Feck 2017-09-17 21:54:29 UTC
*** Bug 384227 has been marked as a duplicate of this bug. ***
Comment 23 Christoph Feck 2017-09-17 21:55:13 UTC
*** Bug 372379 has been marked as a duplicate of this bug. ***
Comment 24 Justin Zobel 2020-12-17 05:31:18 UTC
Thank you for the crash report.

As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved.

I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved/worksforme" when you respond, thank you.
Comment 25 Bug Janitor Service 2021-01-01 04:35:35 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 26 Bug Janitor Service 2021-01-16 04:34:45 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!