Summary: | akonadi_archivemail_agent (akonadi_archivemail_agent), signal: Segmentation fault - Akonadi::EntityTreeModel::modelIndexForCollection (model=<optimized out>, collection=...) | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Akonadi | Reporter: | Don Curtis <bugrprt21882> |
Component: | Archive Mail Agent | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | a.samirh78, bugrprt21882 |
Priority: | NOR | Keywords: | drkonqi |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/pim/kmail/commit/0922a95a692f6424773cd28f21a83237a60d226f | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
New crash information added by DrKonqi
New crash information added by DrKonqi New crash information added by DrKonqi |
Description
Don Curtis
2020-08-25 16:06:28 UTC
Created attachment 131171 [details]
New crash information added by DrKonqi
akonadi_archivemail_agent (5.14.2 (20.04.2)) using Qt 5.12.7
- What I was doing when the application crashed:
Adding a second Folder to be archived - the sent-mail ...
-- Backtrace (Reduced):
#9 0x000055f3ddbbe1a5 in ArchiveJob::~ArchiveJob (this=0x55f3df59d740, __in_chrg=<optimized out>) at /usr/src/debug/kmail-20.04.2-lp152.1.1.x86_64/agents/archivemailagent/job/archivejob.cpp:44
#10 0x000055f3ddbbe209 in ArchiveJob::~ArchiveJob (this=0x55f3df59d740, __in_chrg=<optimized out>) at /usr/src/debug/kmail-20.04.2-lp152.1.1.x86_64/agents/archivemailagent/job/archivejob.cpp:45
#11 0x00007f6a80fd87c0 in QObject::event (this=0x55f3df59d740, e=<optimized out>) at kernel/qobject.cpp:1252
#12 0x00007f6a81863a0c in QApplicationPrivate::notify_helper (this=this@entry=0x55f3df0652c0, receiver=receiver@entry=0x55f3df59d740, e=e@entry=0x55f3dfcb3d00) at kernel/qapplication.cpp:3701
#13 0x00007f6a8186b020 in QApplication::notify (this=0x7ffd2a412b90, receiver=0x55f3df59d740, e=0x55f3dfcb3d00) at kernel/qapplication.cpp:3447
Created attachment 131192 [details]
New crash information added by DrKonqi
akonadi_archivemail_agent (5.14.2 (20.04.2)) using Qt 5.12.7
- What I was doing when the application crashed:
Adding a MailDir to be archived - entered the parameters and saved them, left the automatic Archive setup and waited a minute or so.
* The crash occurred when the newly configured automatic Archive began running for the first time.
-- Backtrace (Reduced):
#6 0x00007fa31a05eaef in qobject_cast<QAbstractProxyModel const*> (object=0x55aa4302fd70) at /usr/include/qt5/QtCore/qobject.h:513
#7 proxiesAndModel (model=0x55aa4302fd70) at /usr/src/debug/akonadi-server-20.04.2-lp152.1.1.x86_64/src/core/models/entitytreemodel.cpp:1147
#8 0x00007fa31a05ebf0 in Akonadi::EntityTreeModel::modelIndexForCollection (model=<optimized out>, collection=...) at /usr/src/debug/akonadi-server-20.04.2-lp152.1.1.x86_64/src/core/models/entitytreemodel.cpp:1171
#9 0x00007fa31a82dc00 in MailCommon::Util::fullCollectionPath (collection=..., addAccountName=<optimized out>) at /usr/src/debug/mailcommon-20.04.2-lp152.1.1.x86_64/src/util/mailutil.cpp:114
#10 0x000055aa427a028b in ArchiveJob::execute (this=0x55aa437432e0) at /usr/src/debug/kmail-20.04.2-lp152.1.1.x86_64/agents/archivemailagent/job/archivejob.cpp:51
Created attachment 131212 [details]
New crash information added by DrKonqi
akonadi_archivemail_agent (5.14.2 (20.04.2)) using Qt 5.12.7
- What I was doing when the application crashed:
Before the automatic archiving began, I took a look at the settings. When the 1st planned automatic archiving started, it crashed ...
-- Backtrace (Reduced):
#5 0x00007efe83d2daef in qobject_cast<QAbstractProxyModel const*> (object=0x55a2bcf94cb0) at /usr/include/qt5/QtCore/qobject.h:513
#6 proxiesAndModel (model=0x55a2bcf94cb0) at /usr/src/debug/akonadi-server-20.04.2-lp152.1.1.x86_64/src/core/models/entitytreemodel.cpp:1147
#7 0x00007efe83d2dbf0 in Akonadi::EntityTreeModel::modelIndexForCollection (model=<optimized out>, collection=...) at /usr/src/debug/akonadi-server-20.04.2-lp152.1.1.x86_64/src/core/models/entitytreemodel.cpp:1171
#8 0x00007efe844fcc00 in MailCommon::Util::fullCollectionPath (collection=..., addAccountName=<optimized out>) at /usr/src/debug/mailcommon-20.04.2-lp152.1.1.x86_64/src/util/mailutil.cpp:114
#9 0x000055a2bc39528b in ArchiveJob::execute (this=0x55a2bcf1a100) at /usr/src/debug/kmail-20.04.2-lp152.1.1.x86_64/agents/archivemailagent/job/archivejob.cpp:51
The backtraces are not all the identical, e.g. the one in the original post and the one in comment#2, are missing some debug symbols: 0x000055aa430c6170 in ?? () the backtraces from comment#1 and #3 are slightly different. (In reply to Ahmad Samir from comment #4) > The backtraces are not all the identical, Hardly surprising: * The first Segmentation Fault occurred when adding the first periodic Archive. * The second when the second periodic Archive. * The third when an automatic Archive began running for the first time. * The fourth when I took a look at the settings. ------------------------------------------------------------ A segmentation fault or access violation is a fault, or failure condition, raised by hardware with memory protection, notifying an operating system (OS) that, the software has attempted to access a restricted area of memory (a memory access violation). What I found out so far, the stack trace in comment #1 is a different issue than the other ones, that one is caused by deleting mInfo in the ArchiveJob dtor, it looks like a race issue caused by that objected (allocated with new) having already been deleted in the dtor of ArchiveMailManager, I think this can be fixed by using shared_ptr to manage ArchiveMailInfo objects which are passed from ArchiveMailManager too ArchiveJob. The other stacktraces, are a crash in QObject::metaObject(); proxiesAndModel from EntityTreeModel, calls qobject_cast which calls QMetaObject::cast: const QObject *QMetaObject::cast(const QObject *obj) const { return (obj && obj->metaObject()->inherits(this)) ? obj : nullptr; } the crash happens in obj->metaObject(), I haven't been able to figure out why exactly that happens. Steps to reproduce that crash: - KMail -> Settings -> Configure automatic archiving - Attach gdb to the running akonadi_archivemail_agent - Create a new archiving job, OK/Apply - Wait a while for the scheduled job to fire - Crash Git commit 0922a95a692f6424773cd28f21a83237a60d226f by Laurent Montel. Committed on 16/09/2020 at 16:51. Pushed by mlaurent into branch 'release/20.08'. Fix Bug 426596 - Application: "akonadi_archivemail_agent" crashed after closing "Configure automatic archving..."-Dialog Related: bug 426596, bug 424232 M +6 -0 agents/archivemailagent/archivemailkernel.cpp M +2 -0 agents/archivemailagent/archivemailkernel.h M +1 -1 agents/archivemailagent/archivemailmanager.cpp M +1 -2 agents/archivemailagent/archivemailwidget.cpp https://invent.kde.org/pim/kmail/commit/0922a95a692f6424773cd28f21a83237a60d226f |