Bug 419726 - trying to change POP3 resource crashes
Summary: trying to change POP3 resource crashes
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: POP3 Resource (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 424114 425629 429697 429773 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-04-06 14:57 UTC by Martin Koller
Modified: 2020-11-28 19:03 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.08.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Koller 2020-04-06 14:57:12 UTC
Application: akonadi_pop3_resource (5.14.0 (20.04.0))

Qt Version: 5.14.1
Frameworks Version: 5.68.0
Operating System: Linux 5.6.0-1-default x86_64
Windowing system: X11
Distribution: "openSUSE Tumbleweed"

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

In kmail configuration dialog -> Accounts I select a POP3 resource and click Modify -> crash

The crash can be reproduced every time.

-- Backtrace:
Application: gmail (akonadi_pop3_resource), signal: Aborted
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f6c0f7c6040 (LWP 12164))]

Thread 10 (Thread 0x7f6bf664a700 (LWP 15177)):
#0  0x00007f6c127e8f59 in syscall () at /lib64/libc.so.6
#1  0x00007f6c12cc4841 in QtLinuxFutex::_q_futex(int*, int, int, unsigned long long, int*, int) (val3=0, addr2=0x0, val2=0, val=<optimized out>, op=0, addr=<optimized out>) at thread/qfutex_p.h:133
#2  0x00007f6c12cc4841 in QtLinuxFutex::futexWait<QBasicAtomicInteger<unsigned int> >(QBasicAtomicInteger<unsigned int>&, QBasicAtomicInteger<unsigned int>::Type) (expectedValue=<optimized out>, futex=...) at thread/qfutex_p.h:135
#3  0x00007f6c12cc4841 in futexSemaphoreTryAcquire_loop<false>(QBasicAtomicInteger<unsigned long long>&, unsigned long long, unsigned long long, int) (timeout=-1, nn=8589934593, curValue=<optimized out>, u=...) at thread/qsemaphore.cpp:219
#4  0x00007f6c12cc4841 in futexSemaphoreTryAcquire<false>(QBasicAtomicInteger<unsigned long long>&, int, int) (timeout=-1, n=<optimized out>, u=...) at thread/qsemaphore.cpp:262
#5  0x00007f6c12cc4841 in QSemaphore::acquire(int) (this=0x7f6c144c95a0, n=<optimized out>) at thread/qsemaphore.cpp:326
#6  0x00007f6c143f69b4 in  () at /usr/lib64/libQt5Network.so.5
#7  0x00007f6c12cc2698 in QThreadPrivate::start(void*) (arg=0x7f6c144c9580) at thread/qthread_unix.cpp:342
#8  0x00007f6c11c94efa in start_thread () at /lib64/libpthread.so.0
#9  0x00007f6c127ee3bf in clone () at /lib64/libc.so.6

Thread 9 (Thread 0x7f6bf6ffd700 (LWP 15011)):
#0  0x00007f6c11c9b795 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f6c050d7c5b in  () at /usr/lib64/dri/i965_dri.so
#2  0x00007f6c050d7ad7 in  () at /usr/lib64/dri/i965_dri.so
#3  0x00007f6c11c94efa in start_thread () at /lib64/libpthread.so.0
#4  0x00007f6c127ee3bf in clone () at /lib64/libc.so.6

Thread 8 (Thread 0x7f6bf77fe700 (LWP 15010)):
#0  0x00007f6c11c9b795 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f6c050d7c5b in  () at /usr/lib64/dri/i965_dri.so
#2  0x00007f6c050d7ad7 in  () at /usr/lib64/dri/i965_dri.so
#3  0x00007f6c11c94efa in start_thread () at /lib64/libpthread.so.0
#4  0x00007f6c127ee3bf in clone () at /lib64/libc.so.6

Thread 7 (Thread 0x7f6bf7fff700 (LWP 15009)):
#0  0x00007f6c11c9b795 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f6c050d7c5b in  () at /usr/lib64/dri/i965_dri.so
#2  0x00007f6c050d7ad7 in  () at /usr/lib64/dri/i965_dri.so
#3  0x00007f6c11c94efa in start_thread () at /lib64/libpthread.so.0
#4  0x00007f6c127ee3bf in clone () at /lib64/libc.so.6

Thread 6 (Thread 0x7f6c04a0b700 (LWP 15008)):
#0  0x00007f6c11c9b795 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f6c050d7c5b in  () at /usr/lib64/dri/i965_dri.so
#2  0x00007f6c050d7ad7 in  () at /usr/lib64/dri/i965_dri.so
#3  0x00007f6c11c94efa in start_thread () at /lib64/libpthread.so.0
#4  0x00007f6c127ee3bf in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7f6c06fd0700 (LWP 12169)):
#0  0x00007f6c10f49644 in g_mutex_unlock () at /usr/lib64/libglib-2.0.so.0
#1  0x00007f6c10efd8bd in g_main_context_prepare () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f6c10efe26b in  () at /usr/lib64/libglib-2.0.so.0
#3  0x00007f6c10efe45f in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#4  0x00007f6c12eeec0b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f6bfc000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5  0x00007f6c12e96b9b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f6c06fcfda0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:136
#6  0x00007f6c12cc15ce in QThread::exec() (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:118
#7  0x00007f6c12cc2698 in QThreadPrivate::start(void*) (arg=0xf27850) at thread/qthread_unix.cpp:342
#8  0x00007f6c11c94efa in start_thread () at /lib64/libpthread.so.0
#9  0x00007f6c127ee3bf in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7f6c077d1700 (LWP 12167)):
#0  0x00007ffd913f1af4 in clock_gettime ()
#1  0x00007f6c127b5cf1 in clock_gettime@GLIBC_2.2.5 () at /lib64/libc.so.6
#2  0x00007f6c12eee511 in qt_clock_gettime (ts=0x7f6c077d0b00, clock=1) at kernel/qelapsedtimer_unix.cpp:175
#3  0x00007f6c12eee511 in do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at kernel/qelapsedtimer_unix.cpp:166
#4  0x00007f6c12eee511 in qt_gettime() () at kernel/qelapsedtimer_unix.cpp:175
#5  0x00007f6c12eece29 in QTimerInfoList::updateCurrentTime() (this=this@entry=0x7f6bf8004950) at kernel/qtimerinfo_unix.cpp:91
#6  0x00007f6c12eed3f5 in QTimerInfoList::timerWait(timespec&) (this=0x7f6bf8004950, tm=...) at kernel/qtimerinfo_unix.cpp:388
#7  0x00007f6c12eee96e in timerSourcePrepareHelper (timeout=0x7f6c077d0bd4, src=<optimized out>) at kernel/qeventdispatcher_glib.cpp:162
#8  0x00007f6c12eee96e in timerSourcePrepare(GSource*, gint*) (source=<optimized out>, timeout=0x7f6c077d0bd4) at kernel/qeventdispatcher_glib.cpp:166
#9  0x00007f6c10efd8ca in g_main_context_prepare () at /usr/lib64/libglib-2.0.so.0
#10 0x00007f6c10efe26b in  () at /usr/lib64/libglib-2.0.so.0
#11 0x00007f6c10efe45f in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#12 0x00007f6c12eeec0b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f6bf8000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#13 0x00007f6c12e96b9b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f6c077d0da0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:136
#14 0x00007f6c12cc15ce in QThread::exec() (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:118
#15 0x00007f6c12cc2698 in QThreadPrivate::start(void*) (arg=0xef2d40) at thread/qthread_unix.cpp:342
#16 0x00007f6c11c94efa in start_thread () at /lib64/libpthread.so.0
#17 0x00007f6c127ee3bf in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7f6c07fff700 (LWP 12166)):
#0  0x00007f6c127e3acf in poll () at /lib64/libc.so.6
#1  0x00007f6c10efe33e in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f6c10efe45f in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#3  0x00007f6c12eeec0b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f6c00000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f6c12e96b9b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f6c07ffed70, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:136
#5  0x00007f6c12cc15ce in QThread::exec() (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:118
#6  0x00007f6c140be507 in  () at /usr/lib64/libQt5DBus.so.5
#7  0x00007f6c12cc2698 in QThreadPrivate::start(void*) (arg=0x7f6c14140da0) at thread/qthread_unix.cpp:342
#8  0x00007f6c11c94efa in start_thread () at /lib64/libpthread.so.0
#9  0x00007f6c127ee3bf in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f6c0d985700 (LWP 12165)):
#0  0x00007f6c127e3acf in poll () at /lib64/libc.so.6
#1  0x00007f6c10cb3772 in  () at /usr/lib64/libxcb.so.1
#2  0x00007f6c10cb443a in xcb_wait_for_event () at /usr/lib64/libxcb.so.1
#3  0x00007f6c0db7cab0 in QXcbEventQueue::run() (this=0xe16e80) at qxcbeventqueue.cpp:228
#4  0x00007f6c12cc2698 in QThreadPrivate::start(void*) (arg=0xe16e80) at thread/qthread_unix.cpp:342
#5  0x00007f6c11c94efa in start_thread () at /lib64/libpthread.so.0
#6  0x00007f6c127ee3bf in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f6c0f7c6040 (LWP 12164)):
[KCrash Handler]
#6  0x00007f6c1272aea1 in raise () at /lib64/libc.so.6
#7  0x00007f6c1271453d in abort () at /lib64/libc.so.6
#8  0x00007f6c12c89aef in qt_message_fatal (context=..., message=<synthetic pointer>...) at global/qlogging.cpp:1894
#9  0x00007f6c12c89aef in QMessageLogger::fatal(char const*, ...) const (this=this@entry=0x7ffd913ac1c0, msg=msg@entry=0x7f6c12f76ea0 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:893
#10 0x00007f6c12c88f2f in qt_assert(char const*, char const*, int) (assertion=<optimized out>, file=<optimized out>, line=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qlogging.h:90
#11 0x00007f6c05d2b82f in Settings::Settings(QExplicitlySharedDataPointer<KSharedConfig> const&) (this=0x7f6c0800b280, config=...) at /home/KDE5/source/kde/pim/kdepim-runtime/resources/pop3/settings.cpp:53
#12 0x00007f6c05d154c8 in Pop3Config::Pop3Config(QExplicitlySharedDataPointer<KSharedConfig> const&, QWidget*, QList<QVariant> const&) (this=0x10c8a00, config=..., parent=0x142ce30, args=...) at /home/KDE5/source/kde/pim/kdepim-runtime/resources/pop3/pop3config.cpp:31
#13 0x00007f6c05d151b2 in Pop3ConfigFactory::create(QExplicitlySharedDataPointer<KSharedConfig> const&, QWidget*, QList<QVariant> const&) const (this=0x10534c0, config=..., parent=0x142ce30, args=...) at /home/KDE5/source/kde/pim/kdepim-runtime/resources/pop3/pop3config.cpp:53
#14 0x00007f6c1261f9e6 in Akonadi::AgentConfigurationWidget::AgentConfigurationWidget(Akonadi::AgentInstance const&, QWidget*) (this=0x142ce30, instance=..., parent=0x1156ae0) at /home/KDE5/source/kde/pim/akonadi/src/widgets/agentconfigurationwidget.cpp:99
#15 0x00007f6c1261c8d9 in Akonadi::AgentConfigurationDialog::AgentConfigurationDialog(Akonadi::AgentInstance const&, QWidget*) (this=0x1156ae0, instance=..., parent=0x0) at /home/KDE5/source/kde/pim/akonadi/src/widgets/agentconfigurationdialog.cpp:74
#16 0x00007f6c14be5d23 in Akonadi::AgentBase::configure(unsigned long long) (this=0x7ffd913ad370, windowId=60819401) at /home/KDE5/source/kde/pim/akonadi/src/agentbase/agentbase.cpp:1096
#17 0x00007f6c14c2a4b9 in Akonadi__ControlAdaptor::configure(long long) (this=0xf03590, windowId=60819401) at controladaptor.cpp:51
#18 0x00007f6c14c2a5be in Akonadi__ControlAdaptor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0xf03590, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7ffd913acb30) at controladaptor.moc:122
#19 0x00007f6c14c2a87d in Akonadi__ControlAdaptor::qt_metacall(QMetaObject::Call, int, void**) (this=0xf03590, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7ffd913acb30) at controladaptor.moc:176
#20 0x00007f6c140ca7db in  () at /usr/lib64/libQt5DBus.so.5
#21 0x00007f6c140cfe1f in  () at /usr/lib64/libQt5DBus.so.5
#22 0x00007f6c140d04ce in  () at /usr/lib64/libQt5DBus.so.5
#23 0x00007f6c140d31f8 in  () at /usr/lib64/libQt5DBus.so.5
#24 0x00007f6c12ec4a19 in QObject::event(QEvent*) (this=0x7ffd913ad370, e=0x7f6c0004a320) at kernel/qobject.cpp:1339
#25 0x00007f6c1399fcaf in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0xdf54e0, receiver=receiver@entry=0x7ffd913ad370, e=e@entry=0x7f6c0004a320) at kernel/qapplication.cpp:3684
#26 0x00007f6c139a8df0 in QApplication::notify(QObject*, QEvent*) (this=0x7ffd913ad460, receiver=0x7ffd913ad370, e=0x7f6c0004a320) at kernel/qapplication.cpp:3430
#27 0x00007f6c12e98002 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x7ffd913ad370, event=0x7f6c0004a320) at ../../include/QtCore/../../src/corelib/kernel/qobject.h:153
#28 0x00007f6c12e9a794 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0xdf2120) at kernel/qcoreapplication.cpp:1832
#29 0x00007f6c12eef573 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0xea6f10) at kernel/qeventdispatcher_glib.cpp:277
#30 0x00007f6c10efe048 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#31 0x00007f6c10efe3d0 in  () at /usr/lib64/libglib-2.0.so.0
#32 0x00007f6c10efe45f in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#33 0x00007f6c12eeebee in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0xec0e60, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#34 0x00007f6c12e96b9b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffd913ad2b0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:136
#35 0x00007f6c12e9e972 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:118
#36 0x00007f6c14c05a0b in Akonadi::ResourceBase::init(Akonadi::ResourceBase&) (r=...) at /home/KDE5/source/kde/pim/akonadi/src/agentbase/resourcebase.cpp:611
#37 0x000000000041f78a in Akonadi::ResourceBase::init<POP3Resource>(int, char**) (argc=3, argv=0x7ffd913ad598) at /home/KDE5/include/KF5/AkonadiAgentBase/resourcebase.h:199
#38 0x000000000041b342 in main(int, char**) (argc=3, argv=0x7ffd913ad598) at /home/KDE5/source/kde/pim/kdepim-runtime/resources/pop3/pop3resource.cpp:1050
[Inferior 1 (process 12164) detached]
Comment 1 Albert Astals Cid 2020-04-06 21:14:55 UTC
Works fine here, can you run under valgrind to see if you get any interesting log?
Comment 2 Daniel Vrátil 2020-04-11 00:09:59 UTC
Git commit 6cdf43de73993cb4615844b3461078e9e1bef467 by Daniel Vrátil.
Committed on 10/04/2020 at 21:58.
Pushed by dvratil into branch 'master'.

POP3: Remove the singleton pattern from Settings

Summary:
It's causing issues with the "new" out-of-process settings
dialog which initializes a new Settings object each time and asserts
when the SettingsHelper Q_GLOBAL_STATIC is already initialized.

Instead just get rid of the singleton pattern and have Settings
object be owned by whomever created it and pass a reference to it
to the classes that need it.

Subscribers: mkoller, kde-pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D28732

M  +58   -57   resources/pop3/accountwidget.cpp
M  +4    -1    resources/pop3/accountwidget.h
M  +10   -9    resources/pop3/jobs.cpp
M  +3    -1    resources/pop3/jobs.h
M  +8    -8    resources/pop3/pop3config.cpp
M  +47   -46   resources/pop3/pop3resource.cpp
M  +4    -0    resources/pop3/pop3resource.h
M  +6    -31   resources/pop3/settings.cpp
M  +10   -2    resources/pop3/settings.h

https://commits.kde.org/kdepim-runtime/6cdf43de73993cb4615844b3461078e9e1bef467
Comment 3 Albert Astals Cid 2020-07-12 10:18:46 UTC
*** Bug 424114 has been marked as a duplicate of this bug. ***
Comment 4 Albert Astals Cid 2020-08-21 10:26:42 UTC
*** Bug 425629 has been marked as a duplicate of this bug. ***
Comment 5 Albert Astals Cid 2020-11-28 19:03:14 UTC
*** Bug 429773 has been marked as a duplicate of this bug. ***
Comment 6 Albert Astals Cid 2020-11-28 19:03:43 UTC
*** Bug 429697 has been marked as a duplicate of this bug. ***