After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793438 - Crash in PriorityQueue._remove_type1_node() removing elements from queue with compare_func
Crash in PriorityQueue._remove_type1_node() removing elements from queue with...
Status: RESOLVED OBSOLETE
Product: libgee
Classification: Platform
Component: general
0.20.x
Other Linux
: Normal normal
: ---
Assigned To: libgee-maint
libgee-maint
Depends on:
Blocks: 793566
 
 
Reported: 2018-02-13 23:06 UTC by Michael Gratton
Modified: 2019-03-20 10:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Gratton 2018-02-13 23:06:28 UTC
Ubuntu and Fedora are both getting traces where Geary is crashing in a call to Gee.PriorityQueue.remove on a queue. The only thing particularly interesting about the queue is that it has a custom CompareDataFunc function.

E.g.: https://bugzilla.redhat.com/show_bug.cgi?id=1484620 and https://bugs.launchpad.net/ubuntu/+source/geary/+bug/1622065

The crash is intermittent - so maybe it depends on the ordering in which items are removed? At the time of the crash, Geary is removing all elements from the queue, one by one. I'm not sure at what point it's crashing however - removing last one or some other element in the queue.
Comment 1 Maciej (Matthew) Piechotka 2018-02-19 00:46:09 UTC
It looks like a crash happens during the removal from the list. Unfortunately it's hard to get more from output.

Can you reproduce crash when libgee is compiled with -g flag so lines are preserved and also get bt full stack (i.e. one including the variables)?
Comment 2 Michael Catanzaro 2018-02-19 17:18:20 UTC
(In reply to Maciej (Matthew) Piechotka from comment #1) 
> Can you reproduce crash when libgee is compiled with -g flag so lines are
> preserved and also get bt full stack (i.e. one including the variables)?

I recommend compiling with -g when creating release tarballs; then you would automatically have Vala line numbers in the backtraces you get from Fedora bug reports, like we already do for the Geary portion of the backtrace.
Comment 3 Michael Gratton 2018-02-20 01:17:32 UTC
Yeah, I'd need to recompile the libgee package to get a better trace, and as I mentioned above it's only triggered sometimes, hence is hard to reproduce. Might be a while before I can get around to it.

Thinking about the underlying cause a bit more, it might be because Geary is using a sort key that is occasionally unstable, so maybe the ordering of elements given by the queue's comparator has changed after inserting the elements when the crash occurs. Obviously this is a stupid thing for Geary to do, but it would be nice if PriorityQueue handled this a bit more gracefully than by segfaulting.
Comment 4 GNOME Infrastructure Team 2019-03-20 10:41:52 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/libgee/issues/27.