gvfsd-http assert failure in g_error_free()

Bug #1210852 reported by Jesper Welin
34
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gvfs
Fix Released
Medium
gvfs (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Precise by Gunnar Hjalmarsson
Saucy
Won't Fix
Low
Unassigned

Bug Description

Trying to get this backported so attempting to follow the SRU Procedure as outlined here: https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

[Impact]

 * An explanation of the effects of the bug on users

This bug stops users of Abiword in Xubuntu copy and pasting pictures from Firefox. Maybe other sources too? Text pastes fine. Libreoffice is unaffected.

 * justification for backporting the fix to the stable release.

Copy and pasting pictures is surely a very basic feature of any word processor and Abiword is bundled as the default in Xubuntu. Additionally I have detected this bug on multiple versions of Xubuntu (13.10 64-bit, 13.10 32-bit and a 12.04 ?-bit - 100% of the machines I have tested it on).

 * In addition, it is helpful, but not required, to include an
   explanation of how the upload fixes this bug.

No idea

[Test Case]

 * detailed instructions how to reproduce the bug

 * these should allow someone who is not familiar with the affected
   package to reproduce the bug and verify that the updated package fixes
   the problem.

Simply open Abiword on a Xubuntu machine, find an image from Google images on Firefox and copy and paste by any method into the document. It has on occasion successfully pasted the image although most of the time it seems to fail. I do not know what factors cause fail/success.

[Regression Potential]

I am unable to comment on this personally.

ProblemType: Crash
DistroRelease: Ubuntu 13.10
Package: gvfs-backends 1.17.2-0ubuntu6
ProcVersionSignature: Ubuntu 3.10.0-6.17-generic 3.10.3
Uname: Linux 3.10.0-6-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.12-0ubuntu3
Architecture: amd64
AssertionMessage: *** Error in `/usr/lib/gvfs/gvfsd-http': munmap_chunk(): invalid pointer: 0x00007f6a20ffea90 ***
CrashCounter: 1
Date: Sat Aug 10 21:54:49 2013
ExecutablePath: /usr/lib/gvfs/gvfsd-http
InstallationDate: Installed on 2013-07-28 (12 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130618)
MarkForUpload: True
ProcCmdline: /usr/lib/gvfs/gvfsd-http --spawner :1.4 /org/gtk/gvfs/exec_spaw/2
Signal: 6
SourcePackage: gvfs
StacktraceTop:
 __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7f6a205d26a0 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:199
 malloc_printerr (action=3, str=0x7f6a205d2a18 "munmap_chunk(): invalid pointer", ptr=<optimized out>) at malloc.c:4902
 g_error_free () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 ?? ()
 ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
Title: gvfsd-http assert failure: *** Error in `/usr/lib/gvfs/gvfsd-http': munmap_chunk(): invalid pointer: 0x00007f6a20ffea90 ***
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm autopilot cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Jesper Welin (jesperwelin) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7f6a205d26a0 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:199
 malloc_printerr (action=3, str=0x7f6a205d2a18 "munmap_chunk(): invalid pointer", ptr=<optimized out>) at malloc.c:4902
 g_error_free (error=0xb4a180) at /build/buildd/glib2.0-2.37.3/./glib/gerror.c:476
 close_read_ready (source_object=<optimized out>, result=<optimized out>, user_data=user_data@entry=0x7f6a18033d30) at gvfsbackendhttp.c:528
 g_task_return_now (task=0xb43a10) at /build/buildd/glib2.0-2.37.3/./gio/gtask.c:1108

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
information type: Private → Public
summary: - gvfsd-http assert failure: *** Error in `/usr/lib/gvfs/gvfsd-http':
- munmap_chunk(): invalid pointer: 0x00007f6a20ffea90 ***
+ gvfsd-http assert failure in g_error_free()
Changed in gvfs (Ubuntu):
status: New → Triaged
Changed in gvfs:
importance: Unknown → Medium
status: Unknown → New
Changed in gvfs:
status: New → Fix Released
Changed in gvfs (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gvfs - 1.19.2-0ubuntu1

---------------
gvfs (1.19.2-0ubuntu1) trusty; urgency=low

  * New upstream release.
    - smb: Fix "write file error: Success". (LP: #490176)
    - sftp: unable to append to file when using low-level writing
      (LP: #517033)
    - http: Fix uninitialized GError (LP: #1210852)
  * Adjust libsoup-gnome2.4-dev → libsoup2.4-dev build dependency, as per
    upstream configure.ac.
  * Drop 00upstream_mtp_test_updates.patch, included upstream.
 -- Martin Pitt <email address hidden> Mon, 25 Nov 2013 11:05:01 +0100

Changed in gvfs (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Gulliver Moy (gully-moy) wrote :

Sorry I am new to this. To be clear, to fix this error on my computer running Xubuntu 13.10 amd64, would I need to build a gvfs 1.19.2 package from here: https://launchpad.net/ubuntu/+source/gvfs/1.19.2-0ubuntu1 ?

Or will that work because my machine is not 14.04?

Never built/compiled a package before but am happy to work it out if someone can tell me if that's what needs to be done.

Cheers.

Revision history for this message
penalvch (penalvch) wrote :

Gulliver Moy, if you need a fix for the bug in previous versions of Ubuntu, please perform as much as possible of the SRU Procedure [1] to bring the need to a developer's attention.

[1]: https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

Revision history for this message
Gulliver Moy (gully-moy) wrote :

Sorry Christopher, I'm not really confident following those instructions due to my very basic understanding of Ubuntu/Bug fixing and Launchpad procedure. For example I don't feel comfortable editing the description, talking about things like regression potential or even understand 'Upload the fixed package to release-proposed with the patch in the bug report', etc.

Perhaps someone could nominate it for me or else I would need more detailed instructions.

In the mean time, would it be a bad idea to attempt to compile “gvfs” 1.19.2-0ubuntu1 (from the link in my previous comment) on my Saucy (13.10) machine. Will it definitely fail to fix my problem / put my system in danger?

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Gulliver: the issue is that the new gvfs is going to require new library versions (libsoup, glib) which are not available in 13.10, backporting those is less than a trivial job and could led to other problems as well

Gulliver Moy (gully-moy)
description: updated
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Hmm... I nominated this bug for Precise in accordance with Gully's request at the ubuntu-bugcontrol mailing list. Only afterwards I noticed Sebastien's doubts due to dependencies.

Revision history for this message
penalvch (penalvch) wrote :

Sebastien Bacher, thanks for the quick SRU analysis turnaround. Given this may not be a good fit for an SRU, would this better fit the criteria of a backport as outlined in https://wiki.ubuntu.com/UbuntuBackports#Requesting_a_Backport ?

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Christopher, Gulliver: I'm not sure why you want that specific fix backported?

Reading the SRU description which was added, it seems you might think the fix would resolve issue it probably doesn't. The change is to fix an error handling, having the fix wouldn't fix the fact that gvfs hits an error, it would just avoid triggering apport on it.

In any case no need to update gvfs to get the fix for that segfault, the commit is a one liner
https://git.gnome.org/browse/gvfs/commit/?h=gnome-3-10&id=de8ad26c71e14a15a3c5eeb05a73033dfccc8d85

Which should be easy to apply to the saucy version/SRU. Could you try to build a package with it and see if that indeed fixes your issue?

Revision history for this message
Gulliver Moy (gully-moy) wrote :

@Sebastien, I wanted to be able to use Abiword as my word processor as is intended in Xfce. I also think that countless others must have encountered this problem (seeing as it is present on 100% of machines I've tested it on) and found it very frustrating, particularly when trying to meet deadlines and having a crashing computer on their hands. I was told that this is the same bug as the one I originally posted so in my mind a fix for this bug was a fix for my problem and everyone elses. So it seemed logical to have it backported.

... But you're saying that the 'fix' doesn't actually address the problem it just stops apport being triggered? I don't see how that could write this bug off as 'fix released'! I want apport to run when my system encounters an error, otherwise I've got nothing to go on! How the hell can ignoring the error be considered a fix

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Gulliver: that bug report is about a gvfs assert in g_error_free(), it's not about abiword not working. It's worth trying the fix for this bug but whoever said you that was the same issue as your might have misleaded you. Can you describe what you do exactly with abiword to trigger the issue? Is that specific to XFCE sessions?

Revision history for this message
penalvch (penalvch) wrote :

Sebastien Bacher, Apport Retracing Service sent Gulliver here -> https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1267289 .

Revision history for this message
Gulliver Moy (gully-moy) wrote :

Yes, the link Christopher posted was the original valid report I created before being redirected here. When I first made it the launchpad report title field was already filled and launchpad suggested that it could be the same bug. I had a look and was unsure. The error details were similar but not exactly the same and there was no mention of abiword so I decided to create a new report. Soon after Christopher informed me that it was the same bug so I ditched that report and started hanging out here.

If you read my edited version of the bug description of the report we're on now you will find details on how to trigger it. When I was told to make these edits whilst following the SRU procedure I was somewhat unsure because making this bug report so specific to my problem seemed to narrow it. But I continued anyway as that's what I had been asked to do and cautiously explained myself in the description.

I can't say whether it is specific to xfce because I have no machines running other desktop environments to test it on. The reason I mention xfce specifically is that it bundles abiword as default word processor so the bug will affect primarily its users. I guess I could try closing xfce and running abiword from the terminal using a keyboard shortcut I came across once? But my guess is it's not specific to xfce...

I hope this all makes sense now?

Revision history for this message
Gulliver Moy (gully-moy) wrote :

Sorry, I meant the apport retracing service sent me here as Christopher said.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Well, the patch is easy to apply to the saucy gvfs version, it would be useful if somebody having the issue could try that and comment on whether it resolve their bug or not

Revision history for this message
Gulliver Moy (gully-moy) wrote :

Ok - well I am of course happy to try it, trouble is that easy-though-it-may-be, I have no idea how to apply the patch. I assume you're talking about this link you posted https://git.gnome.org/browse/gvfs/diff/daemon/gvfsbackendhttp.c?h=gnome-3-10&id=de8ad26c71e14a15a3c5eeb05a73033dfccc8d85 ?

I get what I have to do to the line, the trouble I'm having is opening the file to edit it. I gather that the file should be root/daemon/gvfsbackendhttp.c

I've tried navigating via thunar, but can't access the /root folder. So I tried gksudo thunar from the terminal and then I can open /root but the loading cursor just hangs for a while and nothing inside shows. Also tried gksudo mousepad /root/daemon/gvfsbackendhttp.c and sudoedit /root/daemon/gvfsbackendhttp.c but both just open blank documents the former again with the loading cursor.

Anyone want to talk me through it?

Revision history for this message
Gulliver Moy (gully-moy) wrote :

Anyone? I've tried to research it but can't find anything.

Also tried various searches with 'gksudo catfish' such as searching for 'gvfsbackendhttp.c' in my entire file system to no avail. Am I missing something?

Changed in gvfs (Ubuntu Saucy):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Sebastien Bacher (seb128) wrote :

@Guilliver: to build it you can basically do

- dget https://launchpad.net/ubuntu/+archive/primary/+files/gvfs_1.18.2-0ubuntu1.dsc
- dpkg-source -x *.dsc
- copy the git patch to debian/patches (https://git.gnome.org/browse/gvfs/patch/?id=de8ad26c71e14a15a3c5eeb05a73033dfccc8d85)
- list the filename of that new patch in debian/patches/series
- run "dch -i 'description of the change'
- run "debuild" (you need to have the build-depends to build it, "sudo apt-get build-dep gvfs" to install those)

if you want to avoid having to build you can also upload the source to a ppa, see https://help.launchpad.net/Packaging/PPA about those

Revision history for this message
Gulliver Moy (gully-moy) wrote :
Download full text (3.2 KiB)

Hi Sebastien, thanks for your explanation. Unfortunately I am still having problems.

Here's what I took from your instructions. Steps I added myself to overcome problems encountered are in square brackets:

- Run first line in terminal
- Run second line in terminal
- Make a new file with the contents of that link and put it in /gvfs-1.18.2/debian/patches
- Add the name of this new file as a new line in /gvfs-1.18.2/debian/ptches/series
- [cd to gvfs-1.18.2 because I was getting error about not finding Debian change log.]
- [run "sudo apt-get install devscripts" from terminal because I was didn't have the 'dch' command.]
- [installed "GnuPG keys of Debian Developers" from software centre because I was getting errors some key errors somewhere].
- Run "dch -i 'attempt to fix Launchpad bug number 1210852'" in terminal
- [Edit changelog so that last edit appears signed by a previous editor (you incidentally) instead of me because I was getting an error after running debuild about my signature not containing a valid email address.]
- Run "sudo apt-get build-dep gvfs" in terminal.
- Run "debuild" in terminal.

Along the way I get a few "warning"s along the way but the way
(one common one being "warning: Can't extract name and version from library name `libgvfscommon.so'" )
but the script continues until it finally ends with:

"
 dpkg-genchanges >../gvfs_1.18.2-0ubuntu2_amd64.changes
dpkg-genchanges: not including original source code in upload
 dpkg-source --after-build gvfs-1.18.2
dpkg-source: info: unapplying 1210852.patch
dpkg-source: info: unapplying ref-jobs-in-thread.patch
dpkg-source: info: unapplying handle-inactive-vfs.patch
dpkg-source: info: unapplying dont-crash-on-null-job.patch
dpkg-source: info: unapplying metadata-nuke-junk-data.patch
dpkg-source: info: unapplying metadata-dont-flush-null-tree.patch
dpkg-source: info: unapplying 06_metadata_nfs.patch
dpkg-source: info: unapplying 05_shared_libdaemon.patch
dpkg-source: info: unapplying 04_hurd_path_max.patch
dpkg-source: info: unapplying 01_modules_dir.patch
dpkg-buildpackage: binary and diff upload (original source NOT included)
Now running lintian...
W: gvfs source: out-of-date-standards-version 3.9.3 (current is 3.9.4)
W: gvfs-bin: binary-without-manpage usr/bin/gvfs-less
W: gvfs-backends: killall-is-dangerous postinst:8
Finished running lintian.
Now signing changes and any dsc files...
 signfile gvfs_1.18.2-0ubuntu2.dsc Sebastien Bacher <email address hidden>
gpg: skipped "Sebastien Bacher <email address hidden>": secret key not available
gpg: /tmp/debsign.GTq1Z4dT/gvfs_1.18.2-0ubuntu2.dsc: clearsign failed: secret key not available
debsign: gpg error occurred! Aborting....
debuild: fatal error at line 1280:
running debsign failed
"

Also tried debuild -kA2D7D292 (obtained that key from "gpg -k" in the terminal) but the problem persists.

It does leave a bunch of .deb packages on my computer but running them just opens the software centre which displays messages such as "Breaks existing package 'gvfs-backends' dependency gvfs (= 1.18.2-0ubuntu1) Error".

I have attempted resolving these issues myself to no avail. Any pointers?

P.S. Am I treating Launchpad too much like a forum bothe...

Read more...

Revision history for this message
Gulliver Moy (gully-moy) wrote :

Ok, I've managed to get past the signing problem by setting up a gpg by following the this guide:
https://help.ubuntu.com/community/GnuPrivacyGuardHowto
The command line option 'Using GnuPG to generate a key' was straigt forward.

The script finishes with 'Successfully signed dsc and changes files', but I still get all the "unapplying" lines (don't know if that's a bad thing) and the ones that start with "W:"

When I try to run the .deb files I still get the same errors in the software centre.

Revision history for this message
Gulliver Moy (gully-moy) wrote :

Should I try sudo dpkg -i xxx.deb for each package or will I risk breaking things?

Revision history for this message
Gulliver Moy (gully-moy) wrote :

Ok, well I went ahead with 'sudo dpkg -i' for each .deb file. Some depended on others so I had to install certain .deb files first. The terminal outputs made it clear which ones. I also had to run 'sudo dpkg --configure -a' before installing 'gvfs_1.18.2-0ubuntu2_amd64.deb' because of an error that was coming up. Just outlining exactly what I did for any other novices trying to follow.

They seemed to install fine, however after all this the problem is not fixed. Apport no longer opens with a crash like before but the image doesn't successfully paste either. Instead the loading circle cursor thing just hangs indefinitely. I still get

'** (abiword:3572): CRITICAL **: char* UT_go_url_resolve_relative(const char*, const char*): assertion 'ref_uri != NULL' failed'

when running from the terminal.

So my guess is that the 'fix' doesn't actually address the error as Sebastien Bacher suggested, but rather just stops it being registered as a crash... Not very helpful for me. Would it be worth me filing a new bug report based on the Terminal output pasted above?

Revision history for this message
Rolf Leggewie (r0lf) wrote :

saucy has seen the end of its life and is no longer receiving any updates. Marking the saucy task for this ticket as "Won't Fix".

Changed in gvfs (Ubuntu Saucy):
status: Triaged → Won't Fix
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.