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 778720 - Crash in SoupCacheInputStream when cancelling a message load
Crash in SoupCacheInputStream when cancelling a message load
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: client
master
Other Linux
: High critical
: 0.12.1
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks: 774603
 
 
Reported: 2017-02-15 22:16 UTC by Michael Gratton
Modified: 2017-12-12 13:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Gratton 2017-02-15 22:16:23 UTC
The gtk widget port (Bug 765516) introduced the use of a stand-along libsoup session for loading avatars from Gravatar, but the current implementation is triggering a libsoup crasher bug (Bug 771912).

We need to work around this before releasing 0.12.
Comment 1 Michael Gratton 2017-02-15 23:21:59 UTC
Fix for this pushed to master as commit 4ca86af, will sit on this a bit before marking it as closed.
Comment 2 Michael Gratton 2017-02-15 23:24:07 UTC
Federico, just FYI. I think you were seeing some crashes with related to this?
Comment 3 Federico Bruni 2017-02-22 18:03:21 UTC
Yes, but I can't remember if and how I was able to trigger the crash.. perhaps when loading big conversations?

Yes, it seems so. Just got a crash with latest master while loading a 150 messages conversation:

DB QUERY STEP "SELECT id, fields, date_field, date_time_t, from_field, sender, reply_to, to_field, cc, bcc, message_id, in_reply_to, reference_ids, subject, header, body, internaldate, internaldate_time_t, rfc822_size, preview, flags FROM MessageTable WHERE id=?"
elapsed=2,595242


**
libsoup:ERROR:soup-cache-input-stream.c:195:soup_cache_input_stream_write_next_buffer: assertion failed: (priv->output_stream && !g_output_stream_is_closed (priv->output_stream))
Aborted (core dump creato)

Let me know if you need a backtrace or anything else.
Comment 4 Michael Gratton 2017-02-28 12:51:03 UTC
Cheers. Don't worry about the backtrace, I've seen it again since as well.

It probably won't help, but I did push a fix just then as commit f3fd81b to stop using a deprecated version of a method in the code path involved in this crash. Next time you update and rebuild, can you try loading that large conversation again and see if it crashes again?
Comment 5 Federico Bruni 2017-02-28 16:22:10 UTC
I've tried again with the 150 messages conversation and no crash this time! I would say that the crash percentage was about 95% of times. Now it's dropped to zero.
Comment 6 Michael Gratton 2017-04-23 07:07:17 UTC
Bumping things that aren't likely to make 0.12.0.
Comment 7 Michael Gratton 2017-12-04 00:02:06 UTC
Hey all, I just pushed a WIP branch that should fix the issue to git as wip/778720-soup-avatar-crash.

Please try this out and let me know if it fixes the issue for you. I can't seem to reproduce it on long conversations any more.
Comment 8 Federico Bruni 2017-12-04 13:30:36 UTC
I still have my 183 messages thread, but I cannot reproduce the crash since end of February (see comment #5).

Should you ask to the mailing list?
Comment 9 Michael Gratton 2017-12-07 13:04:59 UTC
(In reply to Federico Bruni from comment #8)
> I still have my 183 messages thread, but I cannot reproduce the crash since
> end of February (see comment #5).
> 
> Should you ask to the mailing list?

Oh maybe, I'm pretty sure the fix is good though. I've been seeing the crashes more frequently since I'm usually running under gdb with G_DEBUG=fatal-criticals set, and haven't seen any with this new fix applied.

Just pushed to master as commit b2f0eca along with a fix for a more obscure problem in commit b627fd4. Will let the m bake for a while then merge to geary-0.12.
Comment 10 Michael Gratton 2017-12-12 13:15:30 UTC
Thee commits have been cherry picked to geary-0.12 as commit 60fed7a and commit 0a036e0.