gvfsd-mtp crashed with SIGABRT in g_mutex_clear()

Bug #1377110 reported by Gabriel Mazetto
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gvfs
Fix Released
Medium
gvfs (Ubuntu)
Fix Released
Medium
Unassigned
Utopic
Fix Released
Undecided
Iain Lane

Bug Description

[ Description ]

Can crash when the plug is pulled on an MTP device when an operation is in progress.

[ Fix ]

Backport patch from upstream git.

[ Development fix ]

This change is in Vivid.

[ QA ]

I don't yet have reproducer steps. This is an upstream fix which is in Vivid, so I hope it can be accepted anyway.

It's https://errors.ubuntu.com/problem/e0bc04a0c1e91a77d2a47d8a9c0145e132cc47b3, so perhaps we can check for occurrences with the new version.

[ Original description ]

trying to mount a Android filesystem before unlocking the screen

ProblemType: Crash
DistroRelease: Ubuntu 14.10
Package: gvfs-backends 1.20.2-1ubuntu2
Uname: Linux 3.16.1-031601-generic x86_64
ApportVersion: 2.14.7-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Oct 3 03:37:23 2014
ExecutablePath: /usr/lib/gvfs/gvfsd-mtp
InstallationDate: Installed on 2013-01-21 (620 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
ProcCmdline: /usr/lib/gvfs/gvfsd-mtp --spawner :1.6 /org/gtk/gvfs/exec_spaw/18
ProcEnviron:
 XDG_RUNTIME_DIR=<set>
 SHELL=/usr/bin/zsh
 LANGUAGE=pt_BR:en
 PATH=(custom, no user)
 LANG=pt_BR.UTF-8
Signal: 6
SourcePackage: gvfs
StacktraceTop:
 g_mutex_clear () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 ?? ()
 g_object_unref () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 g_value_unset () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
Title: gvfsd-mtp crashed with SIGABRT in g_mutex_clear()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Gabriel Mazetto (brodock) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 g_mutex_clear (mutex=mutex@entry=0xf8d8f0) at /build/buildd/glib2.0-2.41.5/./glib/gthread-posix.c:1301
 g_vfs_backend_mtp_finalize (object=0xf8d8c0) at gvfsbackendmtp.c:378
 g_object_unref (_object=0xf8d8c0) at /build/buildd/glib2.0-2.41.5/./gobject/gobject.c:3170
 g_value_unset (value=value@entry=0x7fff2eb7d510) at /build/buildd/glib2.0-2.41.5/./gobject/gvalue.c:272
 g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fff2eb7d690) at /build/buildd/glib2.0-2.41.5/./gobject/gsignal.c:3339

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in gvfs (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Iain Lane (laney)
information type: Private → Public
Iain Lane (laney)
Changed in gvfs (Ubuntu):
status: New → Fix Released
Revision history for this message
Iain Lane (laney) wrote :

Hi Gabriel,

Do you have a series of steps to make this error happen?

I think I found a fix for it, and I've uploaded this to Utopic (pending review), but a way to make it happen to check it's really fixed would be appreciated.

Changed in gvfs (Ubuntu Utopic):
status: New → In Progress
assignee: nobody → Iain Lane (laney)
Changed in gvfs:
importance: Unknown → Medium
status: Unknown → Fix Released
Iain Lane (laney)
description: updated
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Gabriel, or anyone else affected,

Accepted gvfs into utopic-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/gvfs/1.20.2-1ubuntu3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gvfs (Ubuntu Utopic):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Looking to e.u.c it seems the new version is stable, setting as verification-done

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gvfs - 1.20.2-1ubuntu3

---------------
gvfs (1.20.2-1ubuntu3) utopic; urgency=medium

  * 0001-ftp-Don-t-unlock-unlocked-mutex.patch,
    0001-mtp-do-not-crash-when-device-is-unplugged.patch: Backport patches
    from git to fix crashes due to misusing mutexes on newer versions of GLib
    (LP: #1361906, #1377110)
 -- Iain Lane <email address hidden> Wed, 07 Jan 2015 16:26:56 +0000

Changed in gvfs (Ubuntu Utopic):
status: Fix Committed → 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.