gvfsd-ftp crashed with SIGABRT in g_mutex_unlock_slowpath()

Bug #1361906 reported by Wade Menard on 2014-08-26
178
This bug affects 26 people
Affects Status Importance Assigned to Milestone
gvfs
Fix Released
High
bluefish (Ubuntu)
Medium
Unassigned
Utopic
Undecided
Unassigned
gvfs (Ubuntu)
High
Unassigned
Utopic
High
Iain Lane

Bug Description

[ Description ]

gvfsd-ftp sometimes attempts to unlock an already unlocked mutex, which is fatal with glib in utopic and later.

[ QA ]

1. Open gedit
2. File -> Open
3. Ctrl-l
4. Type ftp://ftp.gnome.org/
5. Press enter

At this point gvfsd-ftp may crash, and you'll see an apport popup if so. The operation won't work.

With the fix it should not crash and you should see the listings of the remote server.

[ Development fix ]

This commit is in Vivid

[ Original Report ]

Ubuntu 14.10

A clicked on a gvfs ftp mount in a Shotwell Save As dialog and it went boom.

ProblemType: Crash
DistroRelease: Ubuntu 14.10
Package: gvfs-backends 1.20.2-1ubuntu1
ProcVersionSignature: Ubuntu 3.16.0-10.15-generic 3.16.1
Uname: Linux 3.16.0-10-generic x86_64
ApportVersion: 2.14.6-0ubuntu2
Architecture: amd64
CrashCounter: 1
CurrentDesktop: Unity
Date: Tue Aug 26 18:09:46 2014
ExecutablePath: /usr/lib/gvfs/gvfsd-ftp
InstallationDate: Installed on 2014-07-04 (53 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Alpha amd64 (20140520)
ProcCmdline: /usr/lib/gvfs/gvfsd-ftp --spawner :1.4 /org/gtk/gvfs/exec_spaw/3
ProcEnviron:
 XDG_RUNTIME_DIR=<set>
 SHELL=/bin/bash
 LANGUAGE=en_US
 PATH=(custom, no user)
 LANG=en_US.UTF-8
Signal: 6
SourcePackage: gvfs
StacktraceTop:
 g_mutex_unlock_slowpath (mutex=<optimized out>, prev=<optimized out>) at /build/buildd/glib2.0-2.41.3/./glib/gthread-posix.c:1327
 g_mutex_unlock (mutex=<optimized out>) at /build/buildd/glib2.0-2.41.3/./glib/gthread-posix.c:1350
 g_vfs_ftp_task_acquire_connection (task=0x7fa0c5ad1d40) at gvfsftptask.c:266
 g_vfs_ftp_task_sendv (task=0x7fa0c5ad1d40, flags=G_VFS_FTP_PASS_550, reply=reply@entry=0x0, format=format@entry=0x4105a9 "CWD %s", varargs=varargs@entry=0x7fa0c5ad1b78) at gvfsftptask.c:632
 g_vfs_ftp_task_sendv (varargs=0x7fa0c5ad1b78, format=0x4105a9 "CWD %s", reply=0x0, flags=G_VFS_FTP_PASS_550, task=0x7fa0c5ad1d40) at gvfsftptask.c:515
Title: gvfsd-ftp crashed with SIGABRT in g_mutex_unlock_slowpath()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm audio cdrom dip lpadmin mediatomb plugdev pulse sambashare sudo vboxusers

Wade Menard (wade-ezri) wrote :
information type: Private → Public

StacktraceTop:
 g_mutex_unlock_slowpath (mutex=<optimized out>, prev=<optimized out>) at /build/buildd/glib2.0-2.41.3/./glib/gthread-posix.c:1327
 g_mutex_unlock (mutex=<optimized out>) at /build/buildd/glib2.0-2.41.3/./glib/gthread-posix.c:1350
 g_vfs_ftp_task_acquire_connection (task=0x7fa0c5ad1d40) at gvfsftptask.c:266
 g_vfs_ftp_task_sendv (task=0x7fa0c5ad1d40, flags=G_VFS_FTP_PASS_550, reply=reply@entry=0x0, format=format@entry=0x4105a9 "CWD %s", varargs=varargs@entry=0x7fa0c5ad1b78) at gvfsftptask.c:632
 g_vfs_ftp_task_sendv (varargs=0x7fa0c5ad1b78, format=0x4105a9 "CWD %s", reply=0x0, flags=G_VFS_FTP_PASS_550, task=0x7fa0c5ad1d40) at gvfsftptask.c:515

Changed in gvfs (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Launchpad Janitor (janitor) wrote :

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

Changed in gvfs (Ubuntu):
status: New → Confirmed
Halász Tibor (tibor-halasz) wrote :

Same bug. Ubuntu 14.10 fresh install.
While copying 1 file with Nautilus gvfsd-ftp, it suddenly stops, and closes the ftp connection too.

zubozrout (zubozrout) wrote :

Unfortunately I have to confirm the bug still persists with the final Ubuntu 14.10. Very frustrating if you are used to access ftp through Nautilus which I do a lot.

Chris Ribal (chris-ribal-6) wrote :

Same here. Fresh update from 14.04 LTS where it worked without any problem. I'm mounting an ftp server and when trying to open it in nautilus, the mount is suddenly closed and naultilus crashes too.

Jean-Philippe Fleury (jpfle) wrote :

I solved this problem by updating gvfs (version 1.20.2-1ubuntu2 on Ubuntu 14.10) with a newer version (1.22.1-1) from Debian Unstable. Steps:

- Install the package "debian-archive-keyring":

sudo apt-get install debian-archive-keyring

- Add the following line at the end of the file "/etc/apt/sources.list":

deb http://ftp.debian.org/debian/ unstable main contrib

- Refresh repositories:

sudo apt-get update

- Update gvfs:

sudo apt-get install gvfs

- Delete or comment the line previously added in the file "/etc/apt/sources.list".

- Refresh repositories:

sudo apt-get update

chicoff (chicoff) wrote :

thanks @jpfle your solution works!

Thanks. works for me too.

:¬}

On 04/11/14 13:29, Jean-Philippe Fleury wrote:
> I solved this problem by updating gvfs (version 1.20.2-1ubuntu2 on
> Ubuntu 14.10) with a newer version (1.22.1-1) from Debian Unstable.
> Steps:
>
> - Install the package "debian-archive-keyring":
>
> sudo apt-get install debian-archive-keyring
>
> - Add the following line at the end of the file "/etc/apt/sources.list":
>
> deb http://ftp.debian.org/debian/ unstable main contrib
>
> - Refresh repositories:
>
> sudo apt-get update
>
> - Update gvfs:
>
> sudo apt-get install gvfs
>
> - Delete or comment the line previously added in the file
> "/etc/apt/sources.list".
>
> - Refresh repositories:
>
> sudo apt-get update
>

Enrico Ceppi (eceppi-x) wrote :

File|Upload/Download function fails with ftp.

Launchpad Janitor (janitor) wrote :

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

Changed in bluefish (Ubuntu):
status: New → Confirmed
Changed in bluefish (Ubuntu):
importance: Undecided → Medium
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software by following the instructions at https://wiki.ubuntu.com/Bugs/Upstream/GNOME. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

Sebastien Bacher (seb128) wrote :

In fact that's already reported upstream, see https://bugzilla.gnome.org/show_bug.cgi?id=735381

Changed in gvfs (Ubuntu):
status: Confirmed → Triaged
importance: Medium → High
Sebastien Bacher (seb128) wrote :

The issue is fixed in the current version and the fix should probably be backported to utopic
https://git.gnome.org/browse/gvfs/patch/?id=2153d300f24d3388d7c4ab75a55451ad5a581b5a

Changed in gvfs (Ubuntu):
status: Triaged → Fix Released
Changed in gvfs (Ubuntu Utopic):
importance: Undecided → High
status: New → Triaged
Iain Lane (laney) on 2015-01-07
Changed in bluefish (Ubuntu):
status: Confirmed → Invalid
Changed in bluefish (Ubuntu Utopic):
status: New → Invalid
Changed in gvfs (Ubuntu Utopic):
status: Triaged → In Progress
assignee: nobody → Iain Lane (laney)
Iain Lane (laney) wrote :

I uploaded the backport, thanks Seb for pointing it out.

Please check once it's approved.

description: updated
Changed in gvfs:
importance: Unknown → High
status: Unknown → Fix Released

Hello Wade, 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
Enrico Ceppi (eceppi-x) wrote :

Nautilus and BlusFish now work OK.
gvfs 1.20.2-1ubuntu3

Iain Lane (laney) on 2015-01-14
tags: added: verification-done
removed: verification-needed
Zapp (robin-hobil) wrote :

Ubuntu 14.10
The fix does not work completely for me:

With the proposed gvfs update Nautilus issues are resolved when browsing the ftp-server, but there still remains one issue. If I disconnect from the server and try to reconnect on the same gnome-session, nautilus crashes without crash report.

$ sudo apt list | grep gvfs

>>>
deja-dup-backend-gvfs/utopic,now 32.0-0ubuntu1 all [installed]
gvfs/now 1.20.2-1ubuntu3 amd64 [installed,local]
gvfs-backends/now 1.20.2-1ubuntu3 amd64 [installed,local]
gvfs-backends-goa/utopic 1.20.2-1ubuntu2 amd64
gvfs-bin/now 1.20.2-1ubuntu3 amd64 [installed,local]
gvfs-common/now 1.20.2-1ubuntu3 all [installed,local]
gvfs-daemons/now 1.20.2-1ubuntu3 amd64 [installed,local]
gvfs-dbg/utopic 1.20.2-1ubuntu2 amd64
gvfs-fuse/now 1.20.2-1ubuntu3 amd64 [installed,local]
gvfs-libs/now 1.20.2-1ubuntu3 amd64 [installed,local]
xmms2-plugin-gvfs/utopic 0.8+dfsg-11build2 amd64

Sebastien Bacher (seb128) wrote :

the new comment seems a different issue you should open a new report about that

on my system the following command was required to update gvfs without removing dependent programs:

sudo apt-get install gvfs/utopic-proposed gvfs-daemons/utopic-proposed gvfs-libs/utopic-proposed gvfs-common/utopic-proposed gvfs:i386/utopic-proposed gvfs-libs:i386/utopic-proposed gvfs-backends/utopic-proposed gvfs-bin/utopic-proposed gvfs-fuse/utopic-proposed

Nautilus (well, of cause actually gvfsd-ftp) now works as expected!

gvfs/utopic-proposed,now 1.20.2-1ubuntu3 amd64
gvfs-backends/utopic-proposed,now 1.20.2-1ubuntu3 amd64
gvfs-bin/utopic-proposed,now 1.20.2-1ubuntu3 amd64
gvfs-common/utopic-proposed,now 1.20.2-1ubuntu3 all
gvfs-daemons/utopic-proposed,now 1.20.2-1ubuntu3 amd64
gvfs-fuse/utopic-proposed,now 1.20.2-1ubuntu3 amd64
gvfs-libs/utopic-proposed,now 1.20.2-1ubuntu3 amd64

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  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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