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 621657 - constant segfaults in gslice.c
constant segfaults in gslice.c
Status: RESOLVED NOTGNOME
Product: epiphany
Classification: Core
Component: General
2.30.x
Other Linux
: Normal critical
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-06-15 15:18 UTC by Michael Gratton
Modified: 2010-06-21 05:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
valgrind log (104.00 KB, application/octet-stream)
2010-06-16 02:56 UTC, Michael Gratton
Details

Description Michael Gratton 2010-06-15 15:18:42 UTC
I'm running 2.30.2 from Ubuntu Lucid, and getting a number of segfaults, sometimes a few a day, all in gslice.c. I'm currently running with G_SLICE=debug-blocks to see if that results in anything useful, but it hasn't segfaulted again since setting that.

No other GTK+ apps are exhibiting this, and I'm pretty sure Epiphany 2.30.0 didn't either (although I can't remember if there was a webkitgtk upgrade at the same time as the upgrade to 2.30.2.

epiphany-browser 2.30.2-1ubuntu1.1
epiphany-extensions 2.30.0-4
libwebkit-1.0-2 1.2.0-1
libgtk2.0-0 2.20.1-0ubuntu1
libglib2.0-0 2.24.1-0ubuntu1

A typical stack trace looks like:

  • #0 magazine_chain_pop_head
    at /build/buildd/glib2.0-2.24.1/glib/gslice.c line 486
  • #1 thread_memory_magazine1_alloc
    at /build/buildd/glib2.0-2.24.1/glib/gslice.c line 789
  • #2 IA__g_slice_alloc
    at /build/buildd/glib2.0-2.24.1/glib/gslice.c line 827
  • #3 IA__g_slice_alloc0
    at /build/buildd/glib2.0-2.24.1/glib/gslice.c line 845
  • #4 IA__g_type_create_instance
    at /build/buildd/glib2.0-2.24.1/gobject/gtype.c line 1865
  • #5 g_object_constructor
    at /build/buildd/glib2.0-2.24.1/gobject/gobject.c line 1396
  • #6 IA__g_object_newv
    at /build/buildd/glib2.0-2.24.1/gobject/gobject.c line 1261
  • #7 IA__g_object_new_valist
    at /build/buildd/glib2.0-2.24.1/gobject/gobject.c line 1377
  • #8 IA__g_object_new
    at /build/buildd/glib2.0-2.24.1/gobject/gobject.c line 1095
  • #9 ephy_embed_init
    at /build/buildd/epiphany-browser-2.30.2/embed/ephy-embed.c line 966
  • #10 IA__g_type_create_instance
    at /build/buildd/glib2.0-2.24.1/gobject/gtype.c line 1885
  • #11 g_object_constructor
    at /build/buildd/glib2.0-2.24.1/gobject/gobject.c line 1396
  • #12 IA__g_object_newv
    at /build/buildd/glib2.0-2.24.1/gobject/gobject.c line 1180
  • #13 IA__g_object_new
    at /build/buildd/glib2.0-2.24.1/gobject/gobject.c line 1092
  • #14 ephy_shell_new_tab_full
    at /build/buildd/epiphany-browser-2.30.2/src/ephy-shell.c line 489
  • #15 policy_decision_required_cb
    at /build/buildd/epiphany-browser-2.30.2/src/ephy-window.c line 2538
  • #16 webkit_marshal_BOOLEAN__OBJECT_OBJECT_OBJECT_OBJECT
    at DerivedSources/webkitmarshal.cpp line 255
  • #17 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.24.1/gobject/gclosure.c line 767
  • #18 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3248
  • #19 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.24.1/gobject/gsignal.c line 2991
  • #20 IA__g_signal_emit_by_name
    at /build/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3075
  • #21 WebKit::FrameLoaderClient::dispatchDecidePolicyForNavigationAction
  • #22 WebCore::PolicyChecker::checkNavigationPolicy
    at ../WebCore/loader/PolicyChecker.cpp line 88
  • #23 WebCore::FrameLoader::loadWithDocumentLoader
    at ../WebCore/loader/FrameLoader.cpp line 2097
  • #24 WebCore::FrameLoader::loadWithNavigationAction
    at ../WebCore/loader/FrameLoader.cpp line 2021
  • #25 WebCore::FrameLoader::loadURL
    at ../WebCore/loader/FrameLoader.cpp line 1964
  • #26 WebCore::FrameLoader::loadFrameRequest
    at ../WebCore/loader/FrameLoader.cpp line 1900
  • #27 WebCore::FrameLoader::urlSelected
    at ../WebCore/loader/FrameLoader.cpp line 350
  • #28 WebCore::HTMLAnchorElement::defaultEventHandler
    at ../WebCore/html/HTMLAnchorElement.cpp line 216
  • #29 WebCore::Node::dispatchGenericEvent
    at ../WebCore/dom/Node.cpp line 2680
  • #30 WebCore::Node::dispatchEvent
    at ../WebCore/dom/Node.cpp line 2567
  • #31 WebCore::Node::dispatchMouseEvent
    at ../WebCore/dom/Node.cpp line 2856
  • #32 WebCore::Node::dispatchMouseEvent
    at ../WebCore/dom/Node.cpp line 2765
  • #33 WebCore::EventHandler::dispatchMouseEvent
    at ../WebCore/page/EventHandler.cpp line 1767
  • #34 WebCore::EventHandler::handleMouseReleaseEvent
    at ../WebCore/page/EventHandler.cpp line 1496
  • #35 webkit_web_view_button_release_event
    at ../WebKit/gtk/webkit/webkitwebview.cpp line 634
  • #36 _gtk_marshal_BOOLEAN__BOXED
    at /build/buildd/gtk+2.0-2.20.1/gtk/gtkmarshalers.c line 84
  • #37 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.24.1/gobject/gclosure.c line 767
  • #38 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3286
  • #39 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.24.1/gobject/gsignal.c line 2991
  • #40 IA__g_signal_emit
    at /build/buildd/glib2.0-2.24.1/gobject/gsignal.c line 3038
  • #41 gtk_widget_event_internal
    at /build/buildd/gtk+2.0-2.20.1/gtk/gtkwidget.c line 4951
  • #42 IA__gtk_propagate_event
    at /build/buildd/gtk+2.0-2.20.1/gtk/gtkmain.c line 2447
  • #43 IA__gtk_main_do_event
    at /build/buildd/gtk+2.0-2.20.1/gtk/gtkmain.c line 1647
  • #44 gdk_event_dispatch
    at /build/buildd/gtk+2.0-2.20.1/gdk/x11/gdkevents-x11.c line 2372
  • #45 g_main_dispatch
    at /build/buildd/glib2.0-2.24.1/glib/gmain.c line 1960
  • #46 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.24.1/glib/gmain.c line 2513
  • #47 g_main_context_iterate
    at /build/buildd/glib2.0-2.24.1/glib/gmain.c line 2591
  • #48 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.24.1/glib/gmain.c line 2799
  • #49 IA__gtk_main
    at /build/buildd/gtk+2.0-2.20.1/gtk/gtkmain.c line 1219
  • #50 main
    at /build/buildd/epiphany-browser-2.30.2/src/ephy-main.c line 741

Comment 1 Dan Winship 2010-06-15 15:47:48 UTC
(In reply to comment #0)
> I'm running 2.30.2 from Ubuntu Lucid, and getting a number of segfaults,
> sometimes a few a day, all in gslice.c. I'm currently running with
> G_SLICE=debug-blocks

a better approach would be to just run under valgrind, with G_SLICE=always-malloc, and see what it complains about
Comment 2 Michael Gratton 2010-06-16 02:56:52 UTC
Created attachment 163769 [details]
valgrind log

Oh, okay. I just running under valgrind with some help from http://live.gnome.org/Valgrind:

> G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=20 --log-file=vgdump --suppressions=gtk.suppression epiphany-browser -p --profile=ephy

Valgrind log is attached.

It ended up getting killed, seemingly under the same cirmstances, and while there's a lot of possible leaks in gslice.c, nothing comes up for magazine_chain_pop_head (which is where the segfault always happens) and I can't see anything else that might be useful. I'm not familiar with valgrind though so I might be missing it.

The last few lines output on the terminal were:

> ** (epiphany:22607): CRITICAL **: void webkit_download_set_destination_uri(WebKitDownload*, const gchar*): assertion `destination_uri' failed
> 
> ** (epiphany:22607): CRITICAL **: void webkit_download_start(WebKitDownload*): assertion `priv->destinationURI' failed
> Killed

But I'm not sure if that is related.
Comment 3 Dan Winship 2010-06-16 14:47:32 UTC
The problem isn't in gslice; if it's crashing inside gslice, that means some other piece of code somewhere is mistakenly scribbling over gslice's bookkeeping information, and then the next time gslice tries to malloc or free something, it ends up reading garbage and crashing.

In your trace, the only Invalid write valgrind is seeing is:

==22607== Invalid write of size 8
==22607==    at 0x7A4EA44: JSC::JIT::unlinkCall(JSC::CallLinkInfo*) (X86Assembler.h:1603)
==22607==    by 0x7A94477: JSC::CodeBlock::unlinkCallers() (CodeBlock.cpp:1387)
==22607==    by 0x7B50AFB: JSC::JSFunction::~JSFunction() (JSFunction.cpp:93)
==22607==    by 0x7B3070E: JSC::Heap::sweep() (Collector.cpp:1083)
==22607==    by 0x7B33A9D: JSC::Heap::collectAllGarbage() (Collector.cpp:1279)

which is to say, there's a bug in the JavaScript garbage collector... fun!
Comment 4 Michael Gratton 2010-06-19 07:42:11 UTC
Okay, so this seems like a webkit issue then. I'll open a bug there.
Comment 5 Michael Gratton 2010-06-19 08:05:16 UTC
Filed at: https://bugs.webkit.org/show_bug.cgi?id=40875