GNOME Bugzilla – Bug 793438
Crash in PriorityQueue._remove_type1_node() removing elements from queue with compare_func
Last modified: 2019-03-20 10:41:52 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.
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)?
(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.
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.
-- 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.