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 706224 - gvfsd-gphoto2 crashed with SIGSEGV in g_object_unref()
gvfsd-gphoto2 crashed with SIGSEGV in g_object_unref()
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: gphoto backend
git master
Other Linux
: Normal critical
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2013-08-18 06:05 UTC by Cristian Aravena Romero
Modified: 2013-12-06 00:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gphoto2: Don't release the device multiple times (5.13 KB, patch)
2013-12-01 11:02 UTC, Ross Lagerwall
accepted-commit_now Details | Review

Description Cristian Aravena Romero 2013-08-18 06:05:10 UTC
Open bug in launchpad.net:
https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1213555

"I'm conneting Samsung Galaxy S2 with android 4.1.2 and Crash"

  • #0 g_object_unref
    at /build/buildd/glib2.0-2.37.5/./gobject/gobject.c line 3086
  • #1 release_device
    at gvfsbackendgphoto2.c line 561
  • #2 g_vfs_backend_gphoto2_finalize
    at gvfsbackendgphoto2.c line 637
  • #3 g_object_unref
    at /build/buildd/glib2.0-2.37.5/./gobject/gobject.c line 3194
  • #4 g_vfs_job_mount_finalize
    at gvfsjobmount.c line 49
  • #5 g_object_unref
    at /build/buildd/glib2.0-2.37.5/./gobject/gobject.c line 3194
  • #6 g_thread_pool_thread_proxy
    at /build/buildd/glib2.0-2.37.5/./glib/gthreadpool.c line 309
  • #7 g_thread_proxy
    at /build/buildd/glib2.0-2.37.5/./glib/gthread.c line 798
  • #8 start_thread
    at pthread_create.c line 311
  • #9 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 113

Comment 1 Ross Lagerwall 2013-12-01 11:02:32 UTC
Created attachment 263227 [details] [review]
gphoto2: Don't release the device multiple times

If an error occurs during mounting, don't explicitly release the device
because it is released anyway during finalize().
Comment 2 Ross Lagerwall 2013-12-01 11:04:45 UTC
One way of reproducing this bug is to mount with an invalid hostname:
gvfs-mount gphoto2://s/

If a crash reporter is enabled, it will detect a segfault because release_device() is called twice.
Comment 3 Ondrej Holy 2013-12-05 15:28:18 UTC
Review of attachment 263227 [details] [review]:

Looks good, thanks!
Comment 4 Ondrej Holy 2013-12-05 15:28:20 UTC
Review of attachment 263227 [details] [review]:

Looks good, thanks!
Comment 5 Ross Lagerwall 2013-12-06 00:04:50 UTC
Thanks. Pushed to master as 249711ae216e03ee88ac8e74904ff55a29674a31 and stable as 7fa1dc9c2ebff2583c1d661dd3a7aa7bf02fe737.