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 659103 - Epiphany will not start (segfault) when network manager is not running.
Epiphany will not start (segfault) when network manager is not running.
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
3.1.x
Other Linux
: Normal critical
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-09-15 00:53 UTC by dmotd
Modified: 2011-09-27 14:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
don't crash when nm is not available (948 bytes, patch)
2011-09-26 14:52 UTC, Ionut Biru
needs-work Details | Review
take two (1.12 KB, patch)
2011-09-26 17:57 UTC, Ionut Biru
none Details | Review
take three (1.21 KB, patch)
2011-09-26 18:03 UTC, Ionut Biru
none Details | Review
last call (1.18 KB, patch)
2011-09-26 18:16 UTC, Ionut Biru
committed Details | Review

Description dmotd 2011-09-15 00:53:17 UTC
Overview:
Running the GNOME 3.2 beta2 release on arch linux, if the networkmanager daemon isn't started epiphany returns a 'GLib-GObject-CRITICAL' and Segmentation fault.

Steps to Reproduce: 
Stop the networkmanager daemon (rc.d stop networkmanager)
Launch epiphany 3.1.91.1
--
$ sudo rc.d stop networkmanager 
:: Stopping NetworkManager                                        [DONE] 

$ epiphany 

(epiphany:15918): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(epiphany:15918): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
Segmentation fault
--

Expected Results: 
As per commit 'Copy&paste a few NM defines/enums we need at compile time',
http://git.gnome.org/browse/epiphany/commit/?id=64ff9f8650277fdf849917a01dde4b18e67b046d
I would expect epiphany to attempt connection to NM through dbus and gracefully remove NM dependent features on failure.
 
Build Date: 
Wed 07 Sep 2011 04:47:25 PM EST
Platform: 
Linux 3.0-ARCH, x86_64, arch linux

Additional Information:
Issue was traced through gdb
---
(gdb) run
Starting program: /usr/bin/epiphany 
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffe7817700 (LWP 16094)]
[New Thread 0x7fffe7016700 (LWP 16095)]
[New Thread 0x7fffe58e1700 (LWP 16096)]
[New Thread 0x7fffe4fc0700 (LWP 16097)]

(epiphany:16091): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(epiphany:16091): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

Program received signal SIGSEGV, Segmentation fault.
0x00000000004475a9 in ephy_network_manager_get_state ()
(gdb) bt
  • #0 ephy_network_manager_get_state
  • #1 ??
  • #2 ??
  • #3 g_object_newv
    from /usr/lib/libgobject-2.0.so.0
  • #4 g_object_new_valist
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_object_new
    from /usr/lib/libgobject-2.0.so.0
  • #6 ephy_window_new_with_chrome
  • #7 ephy_shell_new_tab_full
  • #8 ??
  • #9 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #10 ??
    from /usr/lib/libglib-2.0.so.0
  • #11 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #12 gtk_main
    from /usr/lib/libgtk-3.so.0
  • #13 g_application_run
    from /usr/lib/libgio-2.0.so.0
  • #14 main

---
Comment 1 Ionut Biru 2011-09-26 14:17:57 UTC
proper trace

Starting program: /usr/bin/epiphany 
[Thread debugging using libthread_db enabled]
[New Thread 0xb38c1b70 (LWP 12737)]
[New Thread 0xb2effb70 (LWP 12738)]
[New Thread 0xb1b05b70 (LWP 12740)]
[New Thread 0xb11dcb70 (LWP 12741)]

(epiphany:12734): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(epiphany:12734): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

Program received signal SIGSEGV, Segmentation fault.
0x08088935 in ephy_network_manager_get_state (object=0x0) at ephy-network-manager.c:350
350	ephy-network-manager.c: No such file or directory.
	in ephy-network-manager.c
(gdb) bt full
  • #0 ephy_network_manager_get_state
    at ephy-network-manager.c line 350
  • #1 impl_get_embed_single
    at ephy-shell.c line 475
  • #2 ephy_embed_shell_get_embed_single
    at ephy-embed-shell.c line 257
  • #3 ephy_window_constructor
    at ephy-window.c line 3935
  • #4 g_object_newv
    at gobject.c line 1493
  • #5 g_object_new_valist
    at gobject.c line 1610
  • #6 g_object_new
    at gobject.c line 1325
  • #7 ephy_window_new_with_chrome
    at ephy-window.c line 4033
  • #8 ephy_shell_new_tab_full
    at ephy-shell.c line 658
  • #9 session_command_dispatch
    at ephy-session.c line 756
  • #10 g_idle_dispatch
    at gmain.c line 4801
  • #11 g_main_dispatch
    at gmain.c line 2441
  • #12 g_main_context_dispatch
    at gmain.c line 3011
  • #13 g_main_context_iterate
    at gmain.c line 3089
  • #14 g_main_loop_run
    at gmain.c line 3297
  • #15 gtk_main
    at gtkmain.c line 1362
  • #16 gtk_application_run_mainloop
    at gtkapplication.c line 115
  • #17 g_application_run
    at gapplication.c line 1323
  • #18 main
    at ephy-main.c line 475

Comment 2 Ionut Biru 2011-09-26 14:18:52 UTC
i don't know if is a bug in epiphany or in glib gdbus-codegen since ephy-network-manager.c is generated
Comment 3 Ionut Biru 2011-09-26 14:28:21 UTC
and the bug is in generated code.

Program received signal SIGSEGV, Segmentation fault.
0x08088935 in ephy_network_manager_get_state (object=0x0) at ephy-network-manager.c:350
350	  return EPHY_NETWORK_MANAGER_GET_IFACE (object)->get_state (object);
(gdb) bt full


where is fault here, glib or epiphany?
Comment 4 Ionut Biru 2011-09-26 14:52:59 UTC
Created attachment 197485 [details] [review]
don't crash when nm is not available
Comment 5 Xan Lopez 2011-09-26 17:02:09 UTC
Review of attachment 197485 [details] [review]:

I think it's better to have a g_return_if_fail with priv->nm_proxy after the call to _get_net_monitor, since this is not a normal situation.
Comment 6 Ionut Biru 2011-09-26 17:57:34 UTC
Created attachment 197500 [details] [review]
take two
Comment 7 Ionut Biru 2011-09-26 18:03:26 UTC
Created attachment 197501 [details] [review]
take three
Comment 8 Ionut Biru 2011-09-26 18:16:53 UTC
Created attachment 197502 [details] [review]
last call
Comment 9 Ionut Biru 2011-09-26 18:17:05 UTC
sorry for the spam
Comment 10 Xan Lopez 2011-09-26 18:51:27 UTC
Review of attachment 197502 [details] [review]:

Looks great, thank you. Please commit after the freeze is over.
Comment 11 Claudio Saavedra 2011-09-27 09:22:06 UTC
Doesn't this grant a code-freeze break request? It's a crasher after all..
Comment 12 Xan Lopez 2011-09-27 14:03:17 UTC
Comment on attachment 197502 [details] [review]
last call

Pushed to master.