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 793885 - Crashes in a loop
Crashes in a loop
Status: RESOLVED DUPLICATE of bug 787992
Product: gvfs
Classification: Core
Component: mtp backend
git master
Other Linux
: Normal normal
: ---
Assigned To: Philip Langdale
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2018-02-27 16:09 UTC by Bastien Nocera
Modified: 2018-02-28 17:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2018-02-27 16:09:11 UTC
This is an Android device[1] which I plugged in via USB. After browsing through the MTP mount and finding nothing interesting, I launch "adb devices" as root, and gvfsd-mtp started crashing in a loop with this backtrace:
  • #0 unregister_mount_got_proxy_cb
    at gvfsbackend.c line 773
  • #1 g_task_return_now
    at gtask.c line 1145
  • #2 g_task_return
    at gtask.c line 1203
  • #3 init_second_async_cb
    at gdbusproxy.c line 1808
  • #4 g_task_return_now
    at gtask.c line 1145
  • #5 g_task_return
    at gtask.c line 1203
  • #6 async_init_data_set_name_owner
    at gdbusproxy.c line 1499
  • #7 async_init_get_name_owner_cb
    at gdbusproxy.c line 1537
  • #8 g_task_return_now
    at gtask.c line 1145
  • #9 g_task_return
    at gtask.c line 1203
  • #10 g_dbus_connection_call_done
    at gdbusconnection.c line 5722
  • #11 g_task_return_now
    at gtask.c line 1145
  • #12 complete_in_idle_cb
    at gtask.c line 1159
  • #13 g_idle_dispatch
    at gmain.c line 5486
  • #14 g_main_dispatch
    at gmain.c line 3142
  • #15 g_main_context_dispatch
    at gmain.c line 3795
  • #16 g_main_context_iterate
    at gmain.c line 3868
  • #17 g_main_loop_run
    at gmain.c line 4064
  • #18 daemon_main
    at daemon-main.c line 398
  • #19 main
    at daemon-main-generic.c line 45

gvfs-mtp-1.34.2-1.fc27.x86_64

Race on umount?

[1]: https://www.atgames.us/collections/the-sega-genesis-flashback-collection/products/sega-genesis-flasback
Comment 1 Bastien Nocera 2018-02-27 16:19:40 UTC
journalctl output:
Feb 27 17:17:42 classic kernel: usb 3-9: new high-speed USB device number 51 using xhci_hcd
Feb 27 17:17:42 classic kernel: usb 3-9: New USB device found, idVendor=2207, idProduct=0011
Feb 27 17:17:42 classic kernel: usb 3-9: New USB device strings: Mfr=2, Product=3, SerialNumber=4
Feb 27 17:17:42 classic kernel: usb 3-9: Product: rk3036
Feb 27 17:17:42 classic kernel: usb 3-9: Manufacturer: rockchip
Feb 27 17:17:42 classic kernel: usb 3-9: SerialNumber: V5NQX36ZJH
Feb 27 17:17:42 classic gvfs-mtp-volume[1946]: device (null) has no BUSNUM property, ignoring
Feb 27 17:17:42 classic gvfs-mtp-volume[1946]: device (null) has no BUSNUM property, ignoring
Feb 27 17:17:42 classic gvfsd[1745]: Device 0 (VID=2207 and PID=0011) is a Various Viewpia DR/bq Kepler Debugging.
Feb 27 17:17:42 classic kernel: usb 3-9: reset high-speed USB device number 51 using xhci_hcd
Feb 27 17:17:42 classic kernel: usb 3-9: USB disconnect, device number 51
Feb 27 17:17:48 classic gvfsd[1745]: PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
Feb 27 17:17:48 classic gvfsd[1745]: LIBMTP libusb: Attempt to reset device
Feb 27 17:17:48 classic gvfsd[1745]: inep: usb_get_endpoint_status(): No such device
Feb 27 17:17:48 classic gvfsd[1745]: outep: usb_get_endpoint_status(): No such device
Feb 27 17:17:48 classic gvfsd[1745]: libusb_open() failed!: No such device
Feb 27 17:17:48 classic gvfsd[1745]: LIBMTP PANIC: Could not init USB on second attempt
Feb 27 17:17:48 classic gnome-shell[26580]: invalid cast from 'GTask' to 'GSimpleAsyncResult'
Feb 27 17:17:48 classic gnome-shell[26580]: g_simple_async_result_propagate_error: assertion 'G_IS_SIMPLE_ASYNC_RESULT (simple)' failed
Feb 27 17:17:48 classic gvfsd-mtp[30933]: invalid unclassed pointer in cast to 'GVfsBackendMtp'
Feb 27 17:17:48 classic audit[30933]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=30933 comm="gvfsd-mtp" exe="/usr/libexec/gvfsd-mtp" sig=11 res=1
Feb 27 17:17:48 classic kernel: gvfsd-mtp[30933]: segfault at 18 ip 00007f9019eaba99 sp 00007ffc673c5dc0 error 4 in libgvfsdaemon.so[7f9019e9e000+25000]
Feb 27 17:17:48 classic gvfsd-mtp[30933]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
Feb 27 17:17:48 classic gvfsd-mtp[30933]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
Comment 2 Bastien Nocera 2018-02-27 18:38:31 UTC
(The reproducer is a broken version of android-tools and an Android device, see https://bugzilla.redhat.com/show_bug.cgi?id=1470740)
Comment 3 Ondrej Holy 2018-02-28 09:12:19 UTC
This is just another duplicate of Bug 787992, but maybe finally brings some real reproducer... Can you please provide gvfsd debug log for the segfaults (maybe also with LIBMTP_DEBUG=13)?

I will try to reproduce it with the mentioned version of android-tools.
Comment 4 Ondrej Holy 2018-02-28 10:02:49 UTC
Hmm, "adb devices" works as expected on rawhide and I don't see any repeating resets with one of those broken versions... :-(
Comment 5 Bastien Nocera 2018-02-28 12:41:30 UTC
(In reply to Ondrej Holy from comment #4)
> Hmm, "adb devices" works as expected on rawhide and I don't see any
> repeating resets with one of those broken versions... :-(

I fixed it in rawhide, you'll need to use one of the broken versions (as mentioned in the bug comments). You'll also need to make sure you killed the old adb daemon that's running from your working version.
Comment 6 Bastien Nocera 2018-02-28 16:58:58 UTC
Tested gvfs-1.35.91 on my F27 machine (locally built RPM), and even if mtp still throws more errors than I'd like, it doesn't crash anymore.

Closing as a dupe.

*** This bug has been marked as a duplicate of bug 787992 ***
Comment 7 Ondrej Holy 2018-02-28 17:48:21 UTC
I've used one from the versions mentioned on that bug, but never mind... but never mind...