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 691489 - Crash in Oscars 2013 page
Crash in Oscars 2013 page
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-01-10 18:44 UTC by Xan Lopez
Modified: 2013-01-13 14:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GInputStream: fix default g_input_stream_skip_async() logic (2.83 KB, patch)
2013-01-12 22:47 UTC, Dan Winship
committed Details | Review

Description Xan Lopez 2013-01-10 18:44:24 UTC
I get this crash fairly easily fooling around the Oscars 2013 page (http://oscar.go.com/nominees):

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff59b545e in soup_message_io_in_progress (msg=0x7fff580027b0) at soup-message-io.c:1199
1199		return priv->io_data != NULL;
Missing separate debuginfos, use: debuginfo-install libXres-1.0.5-2.fc15.x86_64 libwebp-0.1.3-1.fc16.x86_64 libwnck3-3.2.1-2.fc16.x86_64 libxkbfile-1.0.7-2.fc15.x86_64 xcb-util-0.3.6-2.fc15.x86_64
(gdb) bt
  • #0 soup_message_io_in_progress
    at soup-message-io.c line 1199
  • #1 soup_session_send_request_finish
    at soup-session.c line 3888
  • #2 http_input_stream_ready_cb
    at soup-request-http.c line 122
  • #3 g_task_return_now
    at gtask.c line 1105
  • #4 complete_in_idle_cb
    at gtask.c line 1114
  • #5 g_idle_dispatch
    at gmain.c line 4887
  • #6 g_main_dispatch
    at gmain.c line 2784
  • #7 g_main_context_dispatch
    at gmain.c line 3288
  • #8 g_main_context_iterate
    at gmain.c line 3359
  • #9 g_main_context_iteration
    at gmain.c line 3420
  • #10 g_application_run
    at gapplication.c line 1620
  • #11 main
    at ../../src/ephy-main.c line 478

Comment 1 Dan Winship 2013-01-12 22:47:01 UTC
The new redirection code in WebKitGTK uses g_input_stream_skip_async(), which accidentally ends up doing I/O on the stream in another thread, which causes problems because the libsoup GInputStreams aren't threadsafe.
Comment 2 Dan Winship 2013-01-12 22:47:13 UTC
Created attachment 233354 [details] [review]
GInputStream: fix default g_input_stream_skip_async() logic

g_input_stream_real_skip_async() wants to use read_async() normally,
but will use skip() in a thread instead if it sees that read_async()
will end up using threads. Except that the test for "will read_async()
use threads" never got updated to know about the GPollableInputStream
support in read_async(), so it was doing the wrong thing in that case.
Fix.

Also remove a small bit of pre-GTask cruft noticed nearby.
Comment 3 Matthias Clasen 2013-01-13 11:40:06 UTC
Review of attachment 233354 [details] [review]:

Looks fine to me
Comment 4 Dan Winship 2013-01-13 14:57:22 UTC
Attachment 233354 [details] pushed as 1738d5f - GInputStream: fix default g_input_stream_skip_async() logic