nautilus crashed with SIGSEGV in g_str_hash()

Bug #908787 reported by Tormod Volden
60
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Status tracked in Trunk
Stable-3-0
Fix Released
High
dobey
Trunk
Fix Released
High
dobey
nautilus (Ubuntu)
Invalid
Undecided
Unassigned
ubuntuone-client (Ubuntu)
Fix Released
High
dobey

Bug Description

I can see there are old duplicates of this bug title, with upstream bugs marked obsolete. Yet, this happened on current Precise. I was clicking on a disk icon to have it mounted.

I was able to reproduce it once by unmounting the disk in the dock, then double-clicking on it in a "Computer" window.

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: nautilus 1:3.2.1-2ubuntu4
ProcVersionSignature: Ubuntu 3.2.0-6.12-generic-pae 3.2.0-rc6
Uname: Linux 3.2.0-6-generic-pae i686
ApportVersion: 1.90-0ubuntu1
Architecture: i386
Date: Mon Dec 26 15:16:34 2011
ExecutablePath: /usr/bin/nautilus
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha i386 (20111225)
ProcCmdline: nautilus -n
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SegvAnalysis:
 Segfault happened at: 0xb6ba534a <g_str_hash+10>: movzbl (%ecx),%edx
 PC (0xb6ba534a) ok
 source "(%ecx)" (0x00000000) not located in a known VMA region (needed readable region)!
 destination "%edx" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: nautilus
StacktraceTop:
 g_str_hash () from /lib/i386-linux-gnu/libglib-2.0.so.0
 g_hash_table_lookup () from /lib/i386-linux-gnu/libglib-2.0.so.0
 gdu_pool_get_by_object_path () from /usr/lib/i386-linux-gnu/libgdu.so.0
 ?? () from /usr/lib/i386-linux-gnu/libgdu.so.0
 g_cclosure_marshal_VOID__POINTER () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
Title: nautilus crashed with SIGSEGV in g_str_hash()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Related branches

Revision history for this message
Tormod Volden (tormodvolden) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nautilus (Ubuntu):
status: New → Confirmed
Revision history for this message
Jason Conti (jconti) wrote :
Download full text (5.9 KiB)

I can reproduce this in precise as well. Here is a slightly better backtrace:

1) gdb nautilus
2) run Computer://
3) Double click a partition in the nautilus window
4) Following backtrace:

(gdb) run Computer://
Starting program: /usr/bin/nautilus Computer://
[Thread debugging using libthread_db enabled]
[New Thread 0xb68feb70 (LWP 14782)]
[New Thread 0xb60fdb70 (LWP 14783)]
[New Thread 0xb58d3b70 (LWP 14784)]
Initializing nautilus-gdu extension

GLib-GObject-CRITICAL **: g_value_get_pointer: assertion `G_VALUE_HOLDS_POINTER (value)' failed

Program received signal SIGSEGV, Segmentation fault.
g_str_hash (v=0x0) at /build/buildd/glib2.0-2.31.4.tested/./glib/ghash.c:1661
1661 /build/buildd/glib2.0-2.31.4.tested/./glib/ghash.c: No such file or directory.
 in /build/buildd/glib2.0-2.31.4.tested/./glib/ghash.c
(gdb) bt
#0 g_str_hash (v=0x0)
    at /build/buildd/glib2.0-2.31.4.tested/./glib/ghash.c:1661
#1 0xb7374a38 in g_hash_table_lookup_node (hash_return=<synthetic pointer>,
    key=0x0, hash_table=0x8783ee8)
    at /build/buildd/glib2.0-2.31.4.tested/./glib/ghash.c:385
#2 g_hash_table_lookup (hash_table=0x8783ee8, key=0x0)
    at /build/buildd/glib2.0-2.31.4.tested/./glib/ghash.c:1058
#3 0xb50493b9 in gdu_pool_get_by_object_path (pool=0x832acf0, object_path=0x0)
    at gdu-pool.c:2217
#4 0xb50479b6 in device_changed_signal_handler (proxy=0x87e4090,
    object_path=0x0, user_data=0x832acf0) at gdu-pool.c:1528
#5 0xb7444f8a in g_cclosure_marshal_VOID__POINTER (closure=0x87ce5a0,
    return_value=0x0, n_param_values=2, param_values=0x87ec5c0,
    invocation_hint=0xbfffee90, marshal_data=0x0)
    at /build/buildd/glib2.0-2.31.4.tested/./gobject/gmarshal.c:609
#6 0xb502017a in marshal_dbus_message_to_g_marshaller (closure=0x87ce5a0,
    return_value=0x0, n_param_values=3, param_values=0x87d4048,
    invocation_hint=0xbfffee90, marshal_data=0x0) at dbus-gproxy.c:1734
#7 0xb7442dac in g_closure_invoke (closure=0x87ce5a0, return_value=0x0,
    n_param_values=3, param_values=0x87d4048, invocation_hint=0xbfffee90)
    at /build/buildd/glib2.0-2.31.4.tested/./gobject/gclosure.c:774
#8 0xb74540c5 in signal_emit_unlocked_R (node=0x82be698, detail=2861,
    instance=0x87e4090, emission_return=0x0, instance_and_params=0x87d4048)
    at /build/buildd/glib2.0-2.31.4.tested/./gobject/gsignal.c:3302
#9 0xb745b942 in g_signal_emit_valist (instance=0x87e4090, signal_id=220,
    detail=2861, var_args=0xbffff044 "")
    at /build/buildd/glib2.0-2.31.4.tested/./gobject/gsignal.c:3033
#10 0xb745bad3 in g_signal_emit (instance=0x87e4090, signal_id=220,
    detail=2861)
    at /build/buildd/glib2.0-2.31.4.tested/./gobject/gsignal.c:3090
#11 0xb5020820 in dbus_g_proxy_emit_remote_signal (message=0x8427ce0,
    proxy=<optimized out>) at dbus-gproxy.c:1787
#12 dbus_g_proxy_manager_filter (user_data=0x87c98d0, message=0x8427ce0,
    connection=<optimized out>) at dbus-gproxy.c:1354
#13 dbus_g_proxy_manager_filter (connection=0x87d0568, message=0x8427ce0,
    user_data=0x87c98d0) at dbus-gproxy.c:1195
#14 0xb693e441 in dbus_connection_dispatch ()
   from /lib/i386-linux-gnu/libdbus-1.so.3
#15 0xb50189ad in message_queue_dispatch (source=0x878fb98, call...

Read more...

Revision history for this message
Jason Conti (jconti) wrote :

Found the problem, it is actually caused by ubuntuone-client (specifically libsyncdaemon). Due to a recent change from bug #859635 , the library is registering a dbus message marshaller for VOID__POINTER, however the type registered is actually VOID__BOXED, which happens to be the same type as DeviceChanged from UDisks (DBusGObjectPath is a boxed type). So there is an unnecessary (it is a standard type, and just maps to g_cclosure_marshal_VOID__POINTER anyway) and incorrect entry in the marshal_table of dbus-glib, and we get the error message as above:

GLib-GObject-CRITICAL **: g_value_get_pointer: assertion `G_VALUE_HOLDS_POINTER (value)' failed

when g_cclosure_marshal_VOID__POINTER is called, and then everything dies because object_path is NULL.

I think the best fix to this would be to just remove the marshaller registration in ubuntuone-client/libsyncdaemon/syncdaemon-authentication.c. (tested a rebuild with it commented out and no crash, but I don't use ubuntuone so didn't test any of that code, but again, it should be unnecessary since it just maps to a standard marshaller).

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntuone-client (Ubuntu):
status: New → Confirmed
Changed in ubuntuone-client (Ubuntu):
assignee: nobody → Rodney Dawes (dobey)
Changed in ubuntuone-client (Ubuntu):
importance: Undecided → High
Changed in nautilus (Ubuntu):
status: Confirmed → Invalid
Changed in ubuntuone-client (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Sebastien Bacher (seb128) wrote :

bug #908261 is a duplicate (will close it once it's retraced)

Changed in ubuntuone-client:
status: New → Fix Committed
dobey (dobey)
Changed in ubuntuone-client (Ubuntu):
milestone: none → precise-alpha-2
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntuone-client - 2.99.1-0ubuntu1

---------------
ubuntuone-client (2.99.1-0ubuntu1) precise; urgency=low

  * New upstream release.
    - Avoid using hint files with size 0. (LP: #825366)
    - Use g_return_if_fail to avoid NULL for important args (LP: #908805)
    - Don't register a new VOID__POINTER marshaller for dbus as it breaks now
      (LP: #908787, LP: #908261)
  * debian/watch:
    - Point at the release milestone
 -- Rodney Dawes <email address hidden> Wed, 04 Jan 2012 09:44:36 -0500

Changed in ubuntuone-client (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.