Bug 261788 - akonadi_agent_launcher segfaults when stopping the Akonadi server
Summary: akonadi_agent_launcher segfaults when stopping the Akonadi server
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 4.6
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 265049 274760 278479 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-01 15:14 UTC by Daniel Eklöf
Modified: 2012-05-31 17:29 UTC (History)
17 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
.xsession-errors when stopping akonadi-server (41.21 KB, text/plain)
2011-08-03 08:11 UTC, Franz Trischberger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Eklöf 2011-01-01 15:14:37 UTC
Version:           unspecified (using KDE 4.5.90) 
OS:                Linux

After upgrading from KDE 4.5.4 to KDE 4.6 beta1 (and still happening in 4.6 RC1), login out from KDE takes a *long* time. I see this in dmesg:

akonadi_agent_l[6063]: segfault at 7fd6c8e82610 ip 00007fd6d96cbe48 sp 00007fff6c956598 error 4 in libQtGui.so.4.7.1[7fd6d92d4000+abc000]
akonadi_agent_l[6065]: segfault at 7fc829949610 ip 00007fc83a194e48 sp 00007fffc0148168 error 4 in libQtGui.so.4.7.1[7fc839d9d000+abc000]
akonadi_agent_l[6074]: segfault at 7f555d9d2610 ip 00007f556e215e48 sp 00007fff7b83cf68 error 4 in libQtGui.so.4.7.1[7f556de1e000+abc000]

The (perhaps not too useful) traceback:

#0  0x00007f772c5f6ec8 in ?? () from /usr/lib64/libQtGui.so.4
#1  0x00007f772bdceeab in QThreadStorageData::set(void*) () from /usr/lib64/libQtCore.so.4
#2  0x00007f772c43c3da in ?? () from /usr/lib64/libQtGui.so.4
#3  0x00007f772c3c3950 in QApplication::~QApplication() () from /usr/lib64/libQtGui.so.4
#4  0x000000000040eeee in main ()

This happens on three different systems (all with KDE compiled from source).

Reproducible: Didn't try




QT 4.7.1
Akonadi 1.4.90
KDE 4.6 RC1
Comment 1 Christophe Marin 2011-01-02 13:39:39 UTC
Program received signal SIGSEGV, Segmentation fault.
0x00007fa29e263078 in QThreadStorage<QFontCache*>::deleteData (x=0x76fa80) at ../../src/corelib/thread/qthreadstorage.h:133

Some of the processes don't hang it seems (the akonadi_ical_resource didn't, the akonotes and maildir ones did)
Comment 2 Jakub Schmidtke 2011-01-16 18:55:17 UTC
The same here. It doesn't have to be KDE logout, it is sufficient to run:
akonadictl stop
And immediately those kernel log entries appear:
Jan 16 12:52:24 localhost kernel: akonadi_agent_l[27778]: segfault at 7fe7630a3630 ip 00007fe76dbb1a78 sp 00007fff27885408 error 4 in libQtGui.so.4.7.1[7fe76d7e1000+a4b000]
Jan 16 12:52:24 localhost kernel: akonadi_agent_l[27787]: segfault at 7effa3ec3630 ip 00007effae9cea78 sp 00007fff303709b8 error 4 in libQtGui.so.4.7.1[7effae5fe000+a4b000]
Jan 16 12:52:24 localhost kernel: akonadi_agent_l[27777]: segfault at 7f1e9ec54630 ip 00007f1ea9759a78 sp 00007fffcd60ae58 error 4 in libQtGui.so.4.7.1[7f1ea9389000+a4b000]
Jan 16 12:52:24 localhost kernel: akonadi_agent_l[27776]: segfault at 7f63bb107630 ip 00007f63c5c09a78 sp 00007fff8c9397e8 error 4 in libQtGui.so.4.7.1[7f63c5839000+a4b000]
Comment 3 Jakub Schmidtke 2011-01-16 18:57:29 UTC
Forgot about software versions:
akonadi 1.4.95
KDE 4.5.95
KDE PIM (for some reason in Arch it is in a different version?): 4.5.94
Comment 4 mangus 2011-01-24 10:43:33 UTC
Same here..very annoying..
akonadi 1.5.0
KDE 4.5.95
KDE PIM (for some reason in Arch it is in a different version?): 4.5.94
(the last beta release I think)

Some other input...I start kde with startx (exec ck-launch-session startkde in .xinitrc)
logout hangs 10-15 seconds until akonadi_agent crash and exit

just a question: are the reporters here all using archlinux?
Comment 5 mangus 2011-01-24 10:46:40 UTC
I'll add QT version 4.7.1 as seems mentioned in the crash
Comment 6 Daniel Eklöf 2011-01-24 18:23:29 UTC
(In reply to comment #4)
> just a question: are the reporters here all using archlinux?

No. I'm a LFS user.

I'm still seeing this issue with:

akonadi 1.5.0
QT 4.7.1
KDE 4.6.0
KDE PIM 4.5.94
Comment 7 Christophe Marin 2011-02-01 10:28:15 UTC
from bug 265049:

==18802== Invalid read of size 8
==18802==    at 0x53178AE: QThreadStorage<QFontCache*>::deleteData(void*) (in
/data/installation/qt/qt-4.7/lib/libQtGui.so.4.7.1)
==18802==    by 0x5E8F8CF: QThreadStorageData::set(void*)
(qthreadstorage.cpp:165)
==18802==    by 0x5317940: void
qThreadStorage_setLocalData<QFontCache>(QThreadStorageData&, QFontCache**)
(qthreadstorage.h:92)
==18802==    by 0x53165BA:
QThreadStorage<QFontCache*>::setLocalData(QFontCache*) (qthreadstorage.h:148)
==18802==    by 0x531407A: QFontCache::cleanup() (qfont.cpp:2632)
==18802==    by 0x5406536: QFont::cleanup() (qfont_x11.cpp:182)
==18802==    by 0x5104E35: qt_cleanup() (qapplication_x11.cpp:2647)
==18802==    by 0x50603B2: QApplication::~QApplication()
(qapplication.cpp:1172)
==18802==    by 0x41B1F6: main (agentlauncher.cpp:28)
==18802==  Address 0x11a090b0 is not stack'd, malloc'd or (recently) free'd
==18802== 
==18802== 
==18802== Process terminating with default action of signal 11 (SIGSEGV):
dumping core
==18802==  Access not within mapped region at address 0x11A090B0
==18802==    at 0x53178AE: QThreadStorage<QFontCache*>::deleteData(void*) (in
/data/installation/qt/qt-4.7/lib/libQtGui.so.4.7.1)
==18802==    by 0x5E8F8CF: QThreadStorageData::set(void*)
(qthreadstorage.cpp:165)
==18802==    by 0x5317940: void
qThreadStorage_setLocalData<QFontCache>(QThreadStorageData&, QFontCache**)
(qthreadstorage.h:92)
==18802==    by 0x53165BA:
QThreadStorage<QFontCache*>::setLocalData(QFontCache*) (qthreadstorage.h:148)
==18802==    by 0x531407A: QFontCache::cleanup() (qfont.cpp:2632)
==18802==    by 0x5406536: QFont::cleanup() (qfont_x11.cpp:182)
==18802==    by 0x5104E35: qt_cleanup() (qapplication_x11.cpp:2647)
==18802==    by 0x50603B2: QApplication::~QApplication()
(qapplication.cpp:1172)
==18802==    by 0x41B1F6: main (agentlauncher.cpp:28)


Reproducible: Always

Steps to Reproduce:
1. start akonadiserver.
2. restart it if you can't reproduce with the first step.
Comment 8 Christophe Marin 2011-02-01 10:28:22 UTC
*** Bug 265049 has been marked as a duplicate of this bug. ***
Comment 9 mangus 2011-02-06 18:01:47 UTC
bump , this is so annoying... any word from a dev here?
Comment 10 Daniel Eklöf 2011-04-09 13:44:04 UTC
Since nothing's happening here... let's try to narrow it down a bit.

To me, it seems this is related to the akonadi resources from the kdepim(-runtime) 4.6 beta/rc packages. I.e. I don't have any issues with akonadi on *any* of my systems that still uses kdepim-4.4. On the other hand, I'm seeing it on *all* systems with kdepim 4.6beta/rc. Same akonadi version on all systems.

Specifically, the two resources I'm having issues with is the "notes" resource, and the "imap" resource.

The notes resource will trigger a long delay when shutting down akonadi (with akonadictl stop), before finally crashing. When this happens, I see this in akonadi's console output: "QProcess: Destroyed while process is still running"

Removing all "notes" resources completely fixes the issue for me on the systems where I don't have any imap resources.

For imap, there doesn't appear to be any issues if stopping akonadi *before* connecting to the imap servers. For example, when stopping akonadi before starting kmail. If a connection has been established, the imap resource is *always* causing a delay when stopping akonadi (and then crashes).

Furthermore, it's always the *same* imap account (I have multiple imap accounts on all my systems). Not sure if it's something specific to the account, or if it's because it's not the first imap resource (i.e. the problematic account has the highest resource number on all systems).

Is there anyone having issues with *other* resources? Or are these the only two? Anything else that can help narrow this down will help...
Comment 11 Daniel Eklöf 2011-04-09 13:47:07 UTC
Btw, current versions:

QT 4.7.2
KDE 4.6.2
Akonadi 1.5.2
PIM 4.5.94.1, and latest git (2011-04-09)
Comment 12 Daniel Eklöf 2011-04-09 14:55:37 UTC
Yet some more info... even though I remove all problematic resources (and thus making akonadi stop without any delays), logging out from KDE still takes a long time.

This turns out to be akonadi not being shutdown automatically when logging out. Instead, ksmserver waits until it hits it's timeout, which I believe is 10s, before continuing shutting down KDE.

It shutdowns fast again if I manually stop akonadi before logging out. But this (including scripting and adding shortcuts to the desktop or similar) is only a temporary workaround.

Note that adding a script to $HOME/.kde/shutdown doesn't help, since those scripts are executed *after* logging out from KDE, while akonadi needs to be stopped *before*.
Comment 13 Sergio Martins 2011-04-09 15:09:23 UTC
(In reply to comment #10)
> Specifically, the two resources I'm having issues with is the "notes" resource,
> and the "imap" resource.

the imap resource doesn't use the akonadi_launcher_agent afaik
Comment 14 Daniel Eklöf 2011-04-09 15:37:58 UTC
(In reply to comment #13)
> the imap resource doesn't use the akonadi_launcher_agent afaik

Hmm, yes, you're right. So it may be a completely different problem. Or it may not, as it's still related to stopping akonadi.
Comment 15 Christophe Marin 2011-05-01 18:44:09 UTC
Looks fixed for me, I don't see new coredumps when restarting the server.

Does anyone still see these crashes with Akonadi 1.5.2 and kdepim >= 4.6beta5 ?
Comment 16 Sergio Martins 2011-05-01 18:55:01 UTC
(In reply to comment #15)
> Looks fixed for me, I don't see new coredumps when restarting the server.
> 
> Does anyone still see these crashes with Akonadi 1.5.2 and kdepim >= 4.6beta5 ?

Working fine now indeed.
Comment 17 Daniel Eklöf 2011-05-01 18:59:41 UTC
(In reply to comment #15)
> Looks fixed for me, I don't see new coredumps when restarting the server.
> 
> Does anyone still see these crashes with Akonadi 1.5.2 and kdepim >= 4.6beta5 ?

Yes, I do.

"akonadictl stop" now stops all resources immediately, but there's still a crash (visible in dmesg).

Furthermore, I still have the, related or not, problem with akonadi delaying logout from KDE, *if* I have unconnected imap resources. If I at some point during the session started kmail, logging out is not delayed by akonadi, regardless of whether kmail is still running or not.

kdepimlibs 4.6.2
kdepim{-runtime} 4.6beta5
Comment 18 Christophe Marin 2011-05-01 19:09:51 UTC
what does akonadictl --version return ?
Comment 19 Daniel Eklöf 2011-05-01 19:11:26 UTC
(In reply to comment #17)
> Furthermore, I still have the, related or not, problem with akonadi delaying
> logout from KDE, *if* I have unconnected imap resources. If I at some point
> during the session started kmail, logging out is not delayed by akonadi,
> regardless of whether kmail is still running or not.

Probably related: if I start (and quit) kmail before running "akonadictl stop",
then I *don't* see any segfaults.(In reply to comment #18)

> what does akonadictl --version return ?

akonadictl --version
Akonadi 1.5.2 (revision: 4997976)
Comment 20 Daniel Eklöf 2011-05-15 10:36:11 UTC
Still seeing the exact same problems with 4.6rc1; akonadi agent launcher segfaults, log-out hangs for ~30s if imap (that never connected, i.e. kmail was never started) resources exists.

akonadi-1.5.3
kde-*-4.6.3
kdepim-4.6rc1
kdepim-runtime-4.6rc1
Comment 21 Daniel Eklöf 2011-06-02 11:26:49 UTC
Problems still present in kdepim-4.6rc2.
Comment 22 Jim Jones 2011-06-02 21:29:35 UTC
still happens with kde 4.6.80 and akonadi-1.5.80
Comment 23 Daniel Eklöf 2011-06-11 14:57:25 UTC
Problems still there in kde 4.6.4, akonadi 1.5.3 and kdepim-4.6.0
Comment 24 Antonis K 2011-06-12 14:46:22 UTC
This also happens to me on archlinux x86_64, with kde 4.6.4, akonadi 1.5.3, kdepim 4.6. What's interesting is that it happens on a new user account too, with no imap or any other resource configured.
Comment 25 Antonis K 2011-06-14 18:00:24 UTC
...also, if an email has been sent (outgoing mail is sent through smtp and is also stored on "sent" local folder) since it's last restart, akonadi exits properly and kde is logging out instantly.
Comment 26 mangus 2011-06-30 18:24:11 UTC
no news here? bug still present in last versions of kde rc and akonadi :(
Comment 27 Eric Thiele 2011-07-06 09:41:34 UTC
same here on Gentoo

Akonadi 1.5.3
QT 4.7.3
KDE 4.6.4 (libs)
Comment 28 mathias.anselmann 2011-07-08 23:25:39 UTC
Same here on arch x86_64, KDE 4.6.5, akonadi 1.5.3
Comment 29 hamelg 2011-07-11 21:14:54 UTC
Same here on arch x86, KDE 4.6.5, akonadi 1.5.3. It crashes here :

#0  0xb6f75e60 in QThreadStorage<QFontCache*>::deleteData (x=0x8c06e50) at ../../include/QtCore/../../src/corelib/thread/qthreadstorage.h:133
#1  0xb69b87e0 in QThreadStorageData::set (this=0x8b80f98, p=0x0) at thread/qthreadstorage.cpp:165
#2  0xb6f71141 in qThreadStorage_setLocalData<QFontCache> () at ../../include/QtCore/../../src/corelib/thread/qthreadstorage.h:92
#3  setLocalData () at ../../include/QtCore/../../src/corelib/thread/qthreadstorage.h:148
#4  QFontCache::cleanup () at text/qfont.cpp:2632
#5  0xb7050294 in QFont::cleanup () at text/qfont_x11.cpp:182
#6  0xb6da8965 in qt_cleanup () at kernel/qapplication_x11.cpp:2647
#7  0xb6d257af in QApplication::~QApplication (this=0xbfbb79a0, __in_chrg=<value optimized out>) at kernel/qapplication.cpp:1172
#8  0x0804ca5e in main (argc=Cannot access memory at address 0x1
) at /BUILD/ARCH/akonadi/src/akonadi-1.5.3/agentserver/agentlauncher.cpp:28
Comment 30 Daniel Eklöf 2011-07-12 12:07:36 UTC
Here's what I see with KDE (incl. PIM) 4.7 rc2 and akonadi-1.6.0:

* No more segfaults, at least not in the logs
* Logging out no longer pauses for ~30s, regardless of the state of my imap resources.
* Akonadi stops (akonadictl stop) instantaneously *if* the imap-resources hasn't connected to the imap-servers.
* Akonadi does *not* stop immediately (~10-30s delay) if the imap-resources has connected.

Note that in the last case, the akonadi log output says the imap resource process crashed, but there's no segfault logged to syslog.
Comment 31 Christophe Marin 2011-07-13 09:23:33 UTC
The KDE version doesn't matter much for this report. For the people still seeing this crash, please report :
- the Akonadi server version (using 'akonadictl --version')
- the KDEPIM version (using eg 'kontact --version |grep Kontact')

As already commented and confirmed in comment #16 and #30, we don't see this crash with recent versions (Even with 11 resources using the agent_launcher, I don't see anything here).
Comment 32 Antonis K 2011-07-13 10:35:03 UTC
I see this with Akonadi 1.6.0 and kdepim 4.6.1. Note that the akonadi_agent_launcher proccess that crashes is the one associated with akonadi_maildir_resource.
Comment 33 mangus 2011-07-13 12:17:12 UTC
Akonadi 1.6.0
kdepim 4.6.95
Kontact: 4.7 rc2

Here's a log from startx with the crash in the end
http://pastebin.com/0JcCAprE
I start the session, open kontact, and close session. The logout took at least 10-15 sec probably due to akonadi-launcher crash or try to restart.
In the syslog I see also this:
13/7/2011 14:01:03	localhost	kernel	[  517.604838] akonadi_agent_l[7767]: segfault at 7f86e7a7c190 ip 00007f86f26ff418 sp 00007fff51c455a8 error 4 in libQtGui.so.4.7.3[7f86f2336000+a37000]

I never use kdm, I always start KDE from startx, ending in a console when I'm done and logout.
Hope this help
Comment 34 Daniel Eklöf 2011-07-19 07:54:01 UTC
(In reply to comment #30)
> Here's what I see with KDE (incl. PIM) 4.7 rc2 and akonadi-1.6.0:
> 
> * No more segfaults, at least not in the logs

After adding a new imap resource, the akonadi_agent_launcher crashes are back, and so is the delay when logging out.

akonadi-1.6.0
kdepim-4.6.95
Comment 35 Frédéric COIFFIER 2011-07-22 13:22:02 UTC
I don't use imap but I get many crashes (KDE 4.7rc2 with Akonadi 1.6.0) :

Jul 19 22:39:39 myhost kernel: akonadi_agent_l[26795]: segfault at 0 ip 00007f5fdd1cc539 sp 00007fffa2c931c0 error 4 in libQtCore.so.4.7.3[7f5fdd03e000+294000]
Jul 20 08:53:02 myhost kernel: akonadi_agent_l[11441]: segfault at 7f7919ed5dd0 ip 00007f7924b74a78 sp 00007fffccd17048 error 4 in libQtGui.so.4.7.3[7f7924772000+a6e000]
Jul 20 18:12:51 myhost kernel: akonadi_agent_l[1263]: segfault at 7f91e75b0dd0 ip 00007f91f2253a78 sp 00007fff4acb2088 error 4 in libQtGui.so.4.7.3[7f91f1e51000+a6e000]
Jul 20 18:12:51 myhost kernel: akonadi_agent_l[1247]: segfault at 7f8a80136dd0 ip 00007f8a8add5a78 sp 00007fff4bd33508 error 4 in libQtGui.so.4.7.3[7f8a8a9d3000+a6e000]
Jul 20 18:12:51 myhost kernel: akonadi_agent_l[1252]: segfault at 7fd5f156fdd0 ip 00007fd5fc20da78 sp 00007fff4f9a22e8 error 4 in libQtGui.so.4.7.3[7fd5fbe0b000+a6e000]
Jul 20 18:12:51 myhost kernel: akonadi_agent_l[1251]: segfault at 7f387c444dd0 ip 00007f38870eba78 sp 00007fffffc4b978 error 4 in libQtGui.so.4.7.3[7f3886ce9000+a6e000]
Jul 20 18:57:26 myhost kernel: akonadi_agent_l[31590]: segfault at 7fb885277dd0 ip 00007fb88ff15a78 sp 00007fffa8c00528 error 4 in libQtGui.so.4.7.3[7fb88fb13000+a6e000]
Jul 20 18:57:26 myhost kernel: akonadi_agent_l[31585]: segfault at 7fa7537f0dd0 ip 00007fa75e48fa78 sp 00007fff96199ad8 error 4 in libQtGui.so.4.7.3[7fa75e08d000+a6e000]
Jul 20 18:57:28 myhost kernel: akonadi_agent_l[31604]: segfault at 7f13b4b67dd0 ip 00007f13bf80aa78 sp 00007fff04a1d2f8 error 4 in libQtGui.so.4.7.3[7f13bf408000+a6e000]
Jul 20 18:57:28 myhost kernel: akonadi_agent_l[31589]: segfault at 7fbf43f6edd0 ip 00007fbf4ec15a78 sp 00007fff6c730798 error 4 in libQtGui.so.4.7.3[7fbf4e813000+a6e000]
Jul 20 22:47:21 myhost kernel: akonadi_agent_l[24946]: segfault at 7f41a4e96dd0 ip 00007f41afb35a78 sp 00007fffa3bc1258 error 4 in libQtGui.so.4.7.3[7f41af733000+a6e000]
Jul 20 22:47:22 myhost kernel: akonadi_agent_l[24962]: segfault at 7feeea9cfdd0 ip 00007feef5672a78 sp 00007fff87b85d08 error 4 in libQtGui.so.4.7.3[7feef5270000+a6e000]
Jul 20 22:47:22 myhost kernel: akonadi_agent_l[24961]: segfault at 7fc47941cdd0 ip 00007fc4840bfa78 sp 00007fffedc68268 error 4 in libQtGui.so.4.7.3[7fc483cbd000+a6e000]
Jul 20 22:47:25 myhost kernel: akonadi_agent_l[24950]: segfault at 7fa37e48ddd0 ip 00007fa389134a78 sp 00007fff00507f68 error 4 in libQtGui.so.4.7.3[7fa388d32000+a6e000]
Jul 21 18:24:29 myhost kernel: akonadi_agent_l[7756]: segfault at 7f4851359dd0 ip 00007f485bff8a78 sp 00007fffdee9daa8 error 4 in libQtGui.so.4.7.3[7f485bbf6000+a6e000]
Jul 22 00:15:44 myhost kernel: akonadi_agent_l[23895]: segfault at 7fc4f0fd7dd0 ip 00007fc4fbc7aa78 sp 00007fffa7c20318 error 4 in libQtGui.so.4.7.3[7fc4fb878000+a6e000]
Jul 22 00:15:44 myhost kernel: akonadi_agent_l[23879]: segfault at 7f4e7f031dd0 ip 00007f4e89cd0a78 sp 00007fff768251b8 error 4 in libQtGui.so.4.7.3[7f4e898ce000+a6e000]
Jul 22 00:15:45 myhost kernel: akonadi_agent_l[23883]: segfault at 7f2ffac28dd0 ip 00007f30058cfa78 sp 00007fffd12cc3e8 error 4 in libQtGui.so.4.7.3[7f30054cd000+a6e000]

Is there a way to get valid backtrace as the crash isn't detected by KDE and no core file are generated ?
Comment 36 Christophe Marin 2011-07-25 15:54:22 UTC
*** Bug 278479 has been marked as a duplicate of this bug. ***
Comment 37 Dave Brain 2011-07-26 08:58:49 UTC
Based on comment #31 
I see this error using; 

KDE 4.6.5
KMail 2.1.1
Akonadi 1.5.3 
Archlinux packages i686


akonadi_agent_l[5224]: segfault at b4134e38 ip b7010f50 sp bfb1ac90 error 4 in libQtGui.so.4.7.3[b6ca1000+a5f000]
akonadi_agent_l[5229]: segfault at b41a0e38 ip b707cf50 sp bfcab860 error 4 in libQtGui.so.4.7.3[b6d0d000+a5f000]
akonadi_agent_l[5260]: segfault at b4144e38 ip b7020f50 sp bfa38670 error 4 in libQtGui.so.4.7.3[b6cb1000+a5f000]
Comment 38 Daniel Eklöf 2011-08-01 07:08:09 UTC
Still seeing this with:

KDEPIM-4.7.0
Akonadi 1.6.0 (revision: 51d21d7)
Comment 39 Franz Trischberger 2011-08-03 08:11:23 UTC
Created attachment 62495 [details]
.xsession-errors when stopping akonadi-server
Comment 40 Franz Trischberger 2011-08-03 08:21:28 UTC
The same happens here.
kde-logout (and of course akonadictl stop) takes quite some time (10-20 seconds). There is no need to start kmail, to trigger this behaviour.

dmesg reports

[10709.356266] akonadi_agent_l[2381]: segfault at 7fe23cff6dd0 ip 00007fe24781b8c8 sp 00007fffb0a3fcc8 error 4 in libQtGui.so.4.7.3[7fe247412000+a8b000]
[10709.369792] akonadi_agent_l[2359]: segfault at 7f815341bdd0 ip 00007f815dc3c8c8 sp 00007fff2c0e2758 error 4 in libQtGui.so.4.7.3[7f815d833000+a8b000]
[10709.433483] akonadi_agent_l[2365]: segfault at 7fd6d7684dd0 ip 00007fd6e1ea48c8 sp 00007fff80865108 error 4 in libQtGui.so.4.7.3[7fd6e1a9b000+a8b000]
[10709.433514] akonadi_agent_l[2358]: segfault at 7f0b02e25dd0 ip 00007f0b0d6468c8 sp 00007ffffe826ba8 error 4 in libQtGui.so.4.7.3[7f0b0d23d000+a8b000]

Running
Akonadi 1.6.0
Kontact: 4.7.0

But is present since quite some time with kmail2 (can't say exactly if it was present with early betas...).
Comment 41 Daniel Eklöf 2011-09-08 06:04:10 UTC
Still there in 4.7.1.

akonadi-1.6.0
kdepim{,-runtime}-4.7.1
Comment 42 Sergio Martins 2011-09-12 12:11:25 UTC
Git commit c8e45b10c32679bf070af5b7ad9a22b91eb9a02c by Sergio Martins.
Committed on 12/09/2011 at 14:48.
Pushed by smartins into branch '1.6'.

Fix crash on agent_launcher exit.

Don't unload plugins here. They will be unloaded on application exit,
so it's redundant.

Seems they are being unloaded too early, before QThreadStorage
cleanup occurs:

==18802== Invalid read of size 8
==18802==    at 0x53178AE: QThreadStorage<QFontCache*>::deleteData(void*) (in
/data/installation/qt/qt-4.7/lib/libQtGui.so.4.7.1)
==18802==    by 0x5E8F8CF: QThreadStorageData::set(void*)
(qthreadstorage.cpp:165)
==18802==    by 0x5317940: void
qThreadStorage_setLocalData<QFontCache>(QThreadStorageData&, QFontCache**)
(qthreadstorage.h:92)
==18802==    by 0x53165BA:
QThreadStorage<QFontCache*>::setLocalData(QFontCache*) (qthreadstorage.h:148)
==18802==    by 0x531407A: QFontCache::cleanup() (qfont.cpp:2632)
==18802==    by 0x5406536: QFont::cleanup() (qfont_x11.cpp:182)
==18802==    by 0x5104E35: qt_cleanup() (qapplication_x11.cpp:2647)
==18802==    by 0x50603B2: QApplication::~QApplication()
(qapplication.cpp:1172)
==18802==    by 0x41B1F6: main (agentlauncher.cpp:28)
==18802==  Address 0x11a090b0 is not stack'd, malloc'd or (recently) free'd

CCBUG: 261788

M  +1    -6    agentserver/agentpluginloader.cpp
M  +1    -1    agentserver/agentpluginloader.h

http://commits.kde.org/akonadi/c8e45b10c32679bf070af5b7ad9a22b91eb9a02c
Comment 43 Sergio Martins 2011-09-12 12:14:56 UTC
Fixed for me.

Can anyone else test master or 1.6 branch ?
Comment 44 mangus 2011-09-12 15:44:10 UTC
seems to work here too.
test performed: fresh start , opened kmail , done some stuff , logout.
Shutdown is now very quick and the crash is gone.
Thank you, thank you very much indeed , this one was so old and annoying!
Comment 45 Sergio Martins 2011-09-12 15:53:06 UTC
Same here. Closing then.
Comment 46 Daniel Eklöf 2011-09-12 15:56:59 UTC
Tried a few akonadictl stop/start + logouts here too, and it does indeed seems to be fixed; no crashes, and logout is finally fast again.

Will try this as soon as possible on my remaining two systems.

> Thank you, thank you very much indeed , this one was so old and annoying!

Cannot agree more. Thank you!
Comment 47 Jekyll Wu 2012-05-30 12:19:42 UTC
*** Bug 274760 has been marked as a duplicate of this bug. ***