By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 2235 - kontact crashes upon exit
Summary: kontact crashes upon exit
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdepim (show other bugs)
Version: R14.0.0 [Trinity]
Hardware: Other Linux
: P5 normal
Assignee: Timothy Pearson
URL:
Depends on:
Blocks: 2014
  Show dependency treegraph
 
Reported: 2014-12-05 14:21 CST by Werner Joss
Modified: 2014-12-06 23:39 CST (History)
3 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
crash dump from drkonqi (5.66 KB, application/x-gzip)
2014-12-05 14:21 CST, Werner Joss
Details
Forcibly enable KLibLoader destructor debugging (1.25 KB, patch)
2014-12-05 14:54 CST, Timothy Pearson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Werner Joss 2014-12-05 14:21:13 CST
Created attachment 2381 [details]
crash dump from drkonqi

kontact crashes upon exit, when new feeds have been fetched before in akregator.
this is reproducible.
a sample dump can be found here:
https://paste.kde.org/pvrbpvonl
as this has a limited lifetime, I attach the conent as a file.
Comment 1 Timothy Pearson 2014-12-05 14:54:17 CST
Created attachment 2382 [details]
Forcibly enable KLibLoader destructor debugging

Poking around in the source it looks like we could get further debug information that would greatly help in tracking this down to its source, but you would need to recompile/reinstall tdelibs with the attached patch, log out/log in, then cause the crash and post the relevant lines from your ~/.xsession_errors file.

Is this something you would be willing to do?

Thanks!
Comment 2 Timothy Pearson 2014-12-05 14:58:02 CST
I think I am able to reproduce the bug, which would mean you don't need to do anything.  Was Kontact crashing with SIGSEGV or SIGABRT for you?
Comment 3 Werner Joss 2014-12-06 01:09:41 CST
(In reply to Timothy Pearson from comment #2)
> I think I am able to reproduce the bug, which would mean you don't need to
> do anything.  

ok, then I will just wait for another request to try something, if that helps.

> Was Kontact crashing with SIGSEGV or SIGABRT for you?

it was SIGSEGV.
btw., I think this bug was also present in older trinity versions, namely 3.5.13.2, IIRC.
Comment 4 Timothy Pearson 2014-12-06 15:23:38 CST
This should be fixed in GIT hash 6e9f8cb (tdepim)  It had the same root cause as the LibreOffice bug discussed here:
https://bugs.trinitydesktop.org/show_bug.cgi?id=1489#c11

Specifically two different classes ended up having the same destructor signature, which meant that (in this case) the constructor of one and the destructor of the other was being called.  I still don't understand how this is even possible, but seeing as this has occurred in a situation not involving LibreOffice I will probably need to sit down with the C++ specs and figure out how to prevent this in the future.

Please test and confirm that this issue is resolved.

Thanks!
Comment 5 Timothy Pearson 2014-12-06 15:37:23 CST
On looking around it seems that the One Definition Rule is violated in this scenario (two different Plugin classes, both within the Akregator namespace).  Unfortuately the toolchain can't detect this problem so we get segfaults at runtime if/when a programmer accidentally introduces it.

Much of the remnant "weird" crashing in TDE might be from this type of problem.  I wonder if a tool exists to catch it before runtime?
Comment 6 Timothy Pearson 2014-12-06 23:39:07 CST
(In reply to Timothy Pearson from comment #5)
> On looking around it seems that the One Definition Rule is violated in this
> scenario (two different Plugin classes, both within the Akregator
> namespace).  Unfortuately the toolchain can't detect this problem so we get
> segfaults at runtime if/when a programmer accidentally introduces it.
> 
> Much of the remnant "weird" crashing in TDE might be from this type of
> problem.  I wonder if a tool exists to catch it before runtime?

I couldn't find an existing tool so I wrote one and ran it against most of the TDE libraries.  Unfortunately it won't be that useful as TDE duplicates a LOT of symbols normally via template classes; a mechanism would need to be created by which the template class names could be extracted from the TDE codebase before checking for ODR violations would be feasible.

I'm going to close this as RESOLVED FIXED as it works for me.  Thanks for reporting!