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 693574 - segfault in gvfsd-obexftp when trying to browse cell phone via bluetooth
segfault in gvfsd-obexftp when trying to browse cell phone via bluetooth
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: [obsolete] obexftp backend
1.14.x
Other Linux
: High critical
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2013-02-11 09:07 UTC by Serge Gavrilov
Modified: 2013-04-02 11:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Backtrace of the crash (6.74 KB, text/plain)
2013-02-15 20:35 UTC, Jussi Saarinen
  Details
Output of lsusb (28.85 KB, text/plain)
2013-02-15 20:36 UTC, Jussi Saarinen
  Details
backtrace of the crash (19.73 KB, text/plain)
2013-02-26 15:48 UTC, Serge Gavrilov
  Details
obexftp: Fix crasher due to missing D-Bus threads support (1.19 KB, patch)
2013-03-31 00:53 UTC, Bastien Nocera
committed Details | Review

Description Serge Gavrilov 2013-02-11 09:07:50 UTC
Software: Gentoo ~amd64, Gnome 3.6, G-bluetooth 3.6.1, gvfs 1.14.2, obexd 0.46, 0.4.6, bluez 4.101 

To reproduce: try to browse a cell phone via bt menu on G-shell top bar. 

gvfsd-obexftp[1815]: segfault at 4 ip 00007fe2ee4f3e60 sp 00007fff9d8408b8 error 6 in libdbus-1.so.3.7.2[7fe2ee4d2000+3c000]
pool[1862]: segfault at 0 ip 00007f305235b6a3 sp 00007f3049677940 error 4 in libdbus-1.so.3.7.2[7f3052339000+3c000]

Reproducible 100%

Downgrade gvfs up to 1.12.3 fixes the problem.
Comment 1 Tomas Bzatek 2013-02-11 12:06:37 UTC
Thanks for taking the time to report this bug.
Without a stack trace from the crash it's very hard to determine what caused it.
Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Comment 2 Jussi Saarinen 2013-02-15 20:35:29 UTC
Created attachment 236297 [details]
Backtrace of the crash

I'm experiencing the same bug. I attached my backtrace to this message.

I noticed the following bug reports elsewhere that are probably about this same bug:

https://bugs.gentoo.org/show_bug.cgi?id=456760
https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1057546

Addititional information:

Distribution: ArchLinux

Packages:
extra/gvfs 1.14.2-3
extra/gvfs-afc 1.14.2-3
extra/gvfs-gphoto2 1.14.2-3
extra/gvfs-obexftp 1.14.2-3
extra/gvfs-smb 1.14.2-3

core/dbus 1.6.8-6
extra/dbus-glib 0.100-1
extra/python-dbus 1.1.1-2
extra/python-dbus-common 1.1.1-2
extra/python2-dbus 1.1.1-2
multilib/lib32-dbus-core 1.6.8-1

extra/bluez 4.101-1

extra/obex-data-server 0.4.6-4
extra/obexd-client 1:0.46-1
extra/obexftp 0.23-5
extra/openobex 1.5-3
Comment 3 Jussi Saarinen 2013-02-15 20:36:39 UTC
Created attachment 236298 [details]
Output of lsusb

And here is my output of 'lsusb -v -v'.
Comment 4 Jussi Saarinen 2013-02-15 20:50:32 UTC
Log entries from everything.log:

Feb 15 21:58:35 localhost kernel: [47254.227719] gvfsd-obexftp[30271]: segfault at 0 ip 00007ffff799a301 sp 00007fffffffdbe8 error 6 in libdbus-1.so.3.7.2[7ffff7974000+42000]

Feb 15 21:58:35 localhost systemd-coredump[30275]: Process 30271 (gvfsd-obexftp) dumped core.

Feb 15 21:58:36 localhost kernel: [47255.313326] Bluetooth: hci0 command 0x0408 tx timeout

I also forgot to mention that I'm running x86_64.
Comment 5 Jussi Saarinen 2013-02-16 12:46:51 UTC
Sorry, I forgot this:

extra/gnome-bluetooth 3.6.1-1
Comment 6 Serge Gavrilov 2013-02-26 15:48:20 UTC
Created attachment 237455 [details]
backtrace of the crash
Comment 7 Pacho Ramos 2013-02-26 19:17:20 UTC
[New LWP 1089]
[New LWP 1090]
[New LWP 1092]
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/libexec/gvfsd-obexftp --spawner :1.9 /org/gtk/gvfs/exec_spaw/0'.
Program terminated with signal 11, Segmentation fault.

Comment 8 Serge Gavrilov 2013-02-28 14:05:00 UTC
Any ideas how to fix this? Again brutalforce downgrade up to 1.12.3 fixes the problem.
Comment 9 Serge Gavrilov 2013-03-29 21:26:55 UTC
ping
Comment 10 Serge Gavrilov 2013-03-30 12:25:23 UTC
Upgrade gvfs up to 1.16 does not solve the problem.

Could anybody recommend something to workaround/fix this issue?
Comment 11 Serge Gavrilov 2013-03-30 19:41:00 UTC
The bug introduced somewhere between 1.13.7 and 1.13.8:

1.13.7 works
1.13.8 does not work
Comment 12 Serge Gavrilov 2013-03-30 20:44:35 UTC
7d4bd61385cd56db5507ee31b14724244b637da4 is the first bad commit
commit 7d4bd61385cd56db5507ee31b14724244b637da4
Author: Colin Walters <walters@verbum.org>
Date:   Tue Aug 21 10:36:17 2012 -0400

    daemon: Drop no-longer-necessary libdbus thread init bits
    
    Build regression introduced by 288e9153f1f6efdb1243ad4d8589519326f3ec94

:040000 040000 6dfce3c92812f523d2d4403a8f6361cb1531f1ed 7f10e63dcd660384f5fd82e28f65d12b339708fd M	daemon
Comment 13 Serge Gavrilov 2013-03-30 20:51:08 UTC
For parent state the compilation fails in gvfsd-sftp

gvfsd_sftp-daemon-main.o: In function `daemon_init':
/var/tmp/git-projects/gvfs/daemon/daemon-main.c:75: undefined reference to `dbus_threads_init_default'
collect2: ld returned 1 exit status
make[4]: *** [gvfsd-sftp] Error 1
make[4]: Leaving directory `/var/tmp/git-projects/gvfs/daemon'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/git-projects/gvfs/daemon'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/git-projects/gvfs/daemon'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/git-projects/gvfs'
make: *** [all] Error 2

but 

cd daemon
make gvfsd-obexftp 

results in good gvfsd-obexftp

Please, fix this!
Comment 14 Bastien Nocera 2013-03-31 00:53:11 UTC
Created attachment 240184 [details] [review]
obexftp: Fix crasher due to missing D-Bus threads support

Spotted by Serge Gavrilov <serge@pdmi.ras.ru>

The GDbus port removed the need for us to initialise
libdbus' threads support, and commit
7d4bd61385cd56db5507ee31b14724244b637da4
removed the last call to it.

However, the obexftp backend still hasn't fully been ported
to GDbus, and needs this threading support. Re-add it directly
in the backend.
Comment 15 Serge Gavrilov 2013-03-31 06:21:48 UTC
The patch fixes the problem for me, many thanks!
Comment 16 Tomas Bzatek 2013-04-02 11:47:04 UTC
Review of attachment 240184 [details] [review]:

Ah right, this is needed indeed. Thanks for spotting this, I haven't used bluetooth for years, don't have any BT device around.

Please commit to both master and stable gnome-3-8 branches.
Comment 17 Bastien Nocera 2013-04-02 11:54:54 UTC
Attachment 240184 [details] pushed as 070294d - obexftp: Fix crasher due to missing D-Bus threads support