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 573289 - segfault (with testcase) (in gio? in dbus? in gvfs? in the sftp backend?)
segfault (with testcase) (in gio? in dbus? in gvfs? in the sftp backend?)
Status: RESOLVED OBSOLETE
Product: gvfs
Classification: Core
Component: sftp backend
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2009-02-26 16:27 UTC by Olivier Sessink
Modified: 2017-06-06 11:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase, run with ./giodebug write sftp://host/path/file (2.01 KB, text/plain)
2009-02-26 16:28 UTC, Olivier Sessink
Details

Description Olivier Sessink 2009-02-26 16:27:19 UTC
I extended the testcase for http://bugzilla.gnome.org/show_bug.cgi?id=556458 with an asynchronous replace test because some bluefish users on Fedora 9, Ubuntu 8.04 and Debian Lenny reported issues with sftp.

The sftp connection is mounted already. starting the textcase with 'load' works fine. The segfault is triggered when I start the testcase with 'write'.

The Debian Lenny system uses glib-2.16.6, libdbus 1.2.1 and gvfs 0.2.5.

The testcase works fine on Ubuntu 8.10 (glib-2.18).

the gdb backtrace:
[Thread debugging using libthread_db enabled]
Error while reading shared library symbols:
Cannot find new threads: generic error
Cannot find new threads: generic error
(gdb) c
Continuing.
[New Thread 0xb7cad720 (LWP 11541)]

Program received signal SIGSEGV, Segmentation fault.

Thread 3083523872 (LWP 11541)

  • #0 strlen
    from /lib/tls/i686/cmov/libc.so.6
  • #1 ??
    from /usr/lib/libdbus-1.so.3
  • #2 ??
    from /usr/lib/libdbus-1.so.3
  • #3 ??
    from /usr/lib/libdbus-1.so.3
  • #4 dbus_message_iter_append_basic
    from /usr/lib/libdbus-1.so.3
  • #5 ??
    from /usr/lib/gio/modules/libgvfsdbus.so
  • #6 ??
    from /usr/lib/gio/modules/libgvfsdbus.so
  • #7 ??
    from /usr/lib/gio/modules/libgvfsdbus.so
  • #8 ??
    from /usr/lib/gio/modules/libgvfsdbus.so
  • #9 g_file_replace_async
    from /usr/lib/libgio-2.0.so.0
  • #10 main
    at giodebug.c line 60

valgrind memcheck:

==11502== Process terminating with default action of signal 11 (SIGSEGV)
==11502==  Access not within mapped region at address 0x0
==11502==    at 0x40239D8: strlen (mc_replace_strmem.c:242)
==11502==    by 0x477B145: (within /usr/lib/libdbus-1.so.3.4.0)
==11502==    by 0x4767BEB: (within /usr/lib/libdbus-1.so.3.4.0)
==11502==    by 0x4767C49: (within /usr/lib/libdbus-1.so.3.4.0)
==11502==    by 0x476C42B: dbus_message_iter_append_basic (in /usr/lib/libdbus-1.so.3.4.0)
==11502==    by 0x47395EF: (within /usr/lib/gio/modules/libgvfsdbus.so)
==11502==    by 0x47397F2: (within /usr/lib/gio/modules/libgvfsdbus.so)
==11502==    by 0x472B11D: (within /usr/lib/gio/modules/libgvfsdbus.so)
==11502==    by 0x472B27B: (within /usr/lib/gio/modules/libgvfsdbus.so)
==11502==    by 0x4056059: g_file_replace_async (in /usr/lib/libgio-2.0.so.0.0.0)
==11502==    by 0x804895C: main (giodebug.c:60)
Comment 1 Olivier Sessink 2009-02-26 16:28:15 UTC
Created attachment 129580 [details]
testcase, run with ./giodebug write sftp://host/path/file
Comment 2 Matthias Clasen 2009-02-27 20:50:49 UTC
Works without a crash here...
Comment 3 Olivier Sessink 2009-02-28 12:51:50 UTC
on Debian Lenny? or Ubuntu 8.04?
Comment 4 Matthias Clasen 2009-02-28 17:28:20 UTC
Fedora 11
Comment 5 Olivier Sessink 2009-02-28 18:27:35 UTC
as described in the bugreport the bug seems to be glib 2.16 specific, it is visible on Ubuntu 8.04 and Debian Lenny. It is not visible on Ubuntu 8.10. I have not yet tested Fedora 9 (glib-2.16) or 10 (glib-2.18).

Comment 6 Olivier Sessink 2009-03-01 12:28:36 UTC
just tested with Fedora 9 and 10 

the testcase segfaults on Fedora 9
the testcase runs fine on Fedora 10

Comment 7 Alexander Larsson 2009-03-03 15:18:57 UTC
I believe this is a fixed by the fix in bug 526454, which should be fixed in gvfs 0.2.4. What version is this?
Comment 8 Olivier Sessink 2009-03-03 15:44:37 UTC
as shown in comment #1 Debian Lenny uses glib-2.16.6, libdbus 1.2.1 and gvfs 0.2.5.
Comment 9 Ondrej Holy 2017-06-06 11:10:15 UTC
This is really an old bug and I can't reproduce it with current versions. Let's close this bug as obsolete. Please reopen if you still see the problem...