Bug 1871442

Summary: jmtpfs: crashes when started
Product: [Fedora] Fedora Reporter: Dominik 'Rathann' Mierzejewski <dominik>
Component: jmtpfsAssignee: Robert Scheck <redhat-bugzilla>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: redhat-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: jmtpfs-0.5-1.fc33 jmtpfs-0.5-1.fc32 jmtpfs-0.5-1.el7 jmtpfs-0.5-2.fc32 jmtpfs-0.5-2.fc33 jmtpfs-0.5-2.el8 jmtpfs-0.5-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-14 01:38:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dominik 'Rathann' Mierzejewski 2020-08-23 15:28:26 UTC
Description of problem:
jmtpfs crashes immediately when started.

Version-Release number of selected component (if applicable):
0.4-12.fc32

How reproducible:
Always.

Steps to Reproduce:
1. Run jmtpfs without any parameters.

Actual results:
$ jmtpfs --help
Device 0 (VID=0e8d and PID=2008) is a MediaTek Inc MT65xx.
Device 1 (VID=18d1 and PID=4ee1) is a Google Inc Nexus/Pixel (MTP).
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device
terminate called after throwing an instance of 'MtpErrorCantOpenDevice'
  what():  Can't open device
Aborted (core dumped)

Expected results:
No crash.

Additional info:
$ coredumpctl info jmtpfs
           PID: 63560 (jmtpfs)
           UID: 5242 (rathann)
           GID: 5242 (rathann)
        Signal: 6 (ABRT)
     Timestamp: Sun 2020-08-23 17:23:43 CEST (3min 19s ago)
  Command Line: jmtpfs --help
    Executable: /usr/bin/jmtpfs
 Control Group: /user.slice/user-5242.slice/session-2.scope
          Unit: session-2.scope
         Slice: user-5242.slice
       Session: 2
     Owner UID: 5242 (rathann)
       Boot ID: 01ac85ff9012433e84490c37593c9d31
    Machine ID: 674a6bc33c8d4f6dbeee207dbaa64ecc
      Hostname: localhost.localdomain
       Storage: /var/lib/systemd/coredump/core.jmtpfs.5242.01ac85ff9012433e84490c37593c9d31.63560.159819622300000000000>
       Message: Process 63560 (jmtpfs) of user 5242 dumped core.
                
                Stack trace of thread 63560:
                #0  0x00007fdd66a799e5 raise (libc.so.6 + 0x3c9e5)
                #1  0x00007fdd66a62895 abort (libc.so.6 + 0x25895)
                #2  0x00007fdd66ce4961 _ZN9__gnu_cxx27__verbose_terminate_handlerEv.cold (libstdc++.so.6 + 0x9e961)
                #3  0x00007fdd66cf044c _ZN10__cxxabiv111__terminateEPFvvE (libstdc++.so.6 + 0xaa44c)
                #4  0x00007fdd66cf04b7 _ZSt9terminatev (libstdc++.so.6 + 0xaa4b7)
                #5  0x00007fdd66cf0769 __cxa_throw (libstdc++.so.6 + 0xaa769)
                #6  0x000055be5f7fcbae _ZN9MtpDeviceC2ER24LIBMTP_raw_device_struct.cold (jmtpfs + 0x6bae)
                #7  0x000055be5f804729 _ZN19ConnectedMtpDevices9GetDeviceEi (jmtpfs + 0xe729)
                #8  0x000055be5f7feb1e main (jmtpfs + 0x8b1e)
                #9  0x00007fdd66a64042 __libc_start_main (libc.so.6 + 0x27042)
                #10 0x000055be5f7ffe6e _start (jmtpfs + 0x9e6e)
                
                Stack trace of thread 63561:
                #0  0x00007fdd66b33aaf __poll (libc.so.6 + 0xf6aaf)
                #1  0x00007fdd66a319e2 linux_udev_event_thread_main (libusb-1.0.so.0 + 0x119e2)
                #2  0x00007fdd66c12432 start_thread (libpthread.so.0 + 0x9432)
                #3  0x00007fdd66b3e913 __clone (libc.so.6 + 0x101913)

Comment 1 Fedora Update System 2021-01-05 20:06:47 UTC
FEDORA-2021-5afd82bb39 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-5afd82bb39

Comment 2 Fedora Update System 2021-01-05 20:06:52 UTC
FEDORA-EPEL-2021-d2e48f2408 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-d2e48f2408

Comment 3 Fedora Update System 2021-01-05 20:06:57 UTC
FEDORA-2021-5727b9d170 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-5727b9d170

Comment 4 Fedora Update System 2021-01-06 01:10:31 UTC
FEDORA-2021-5afd82bb39 has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-5afd82bb39`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-5afd82bb39

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2021-01-06 01:30:23 UTC
FEDORA-2021-5727b9d170 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-5727b9d170`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-5727b9d170

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2021-01-06 01:53:26 UTC
FEDORA-EPEL-2021-d2e48f2408 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-d2e48f2408

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Robert Scheck 2021-01-07 15:00:24 UTC
As per https://bodhi.fedoraproject.org/updates/FEDORA-2021-5727b9d170#comment-1805486 this is still happening:

$ jmtpfs 
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device
terminate called after throwing an instance of 'MtpErrorCantOpenDevice'
  what():  Can't open device
Aborted (core dumped)
$ jmtpfs --version
jmtpfs version: 0.5
FUSE library version: 2.9.9
fusermount version: 2.9.9
using FUSE kernel interface version 7.19

Reported to upstream https://github.com/JasonFerrara/jmtpfs/issues/25

Comment 8 Robert Scheck 2021-01-07 15:02:54 UTC
Btw, https://github.com/JasonFerrara/jmtpfs/issues/19#issuecomment-685705205 mentions a possible workaround.

Comment 9 Robert Scheck 2021-01-07 19:18:41 UTC
Dominik, could you test https://koji.fedoraproject.org/koji/taskinfo?taskID=59119895, please? It should fix the crash.

Comment 10 Dominik 'Rathann' Mierzejewski 2021-01-08 10:39:34 UTC
Confirmed. It's no longer crashing and seems to work fine.

Comment 11 Dominik 'Rathann' Mierzejewski 2021-01-08 10:43:01 UTC
Sorry, I was too quick. It's still crashing if an MTP device is mounted already:
$ mount | grep mtp
jmtpfs on /tmp/SAMSUNG_SAMSUNG_Android_42003714f287a4a3 type fuse.jmtpfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
$ jmtpfs 
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device
terminate called after throwing an instance of 'MtpErrorCantOpenDevice'
  what():  Can't open device
Aborted (core dumped)
$ rpm -q jmtpfs
jmtpfs-0.5-1.1.fc33.x86_64

Comment 12 Dominik 'Rathann' Mierzejewski 2021-01-08 10:50:09 UTC
And it's still crashing if it's mounted by something else, e.g. GIO (a.k.a. GNOME VFS)
$ gio mount -l
...
Volume(0): SAMSUNG Android
  Type: GProxyVolume (GProxyVolumeMonitorMTP)
  Mount(0): SAMSUNG Android -> mtp://SAMSUNG_SAMSUNG_Android_42003714f287a4a3/
    Type: GProxyShadowMount (GProxyVolumeMonitorMTP)
Mount(1): mtp -> mtp://SAMSUNG_SAMSUNG_Android_42003714f287a4a3/
  Type: GDaemonMount
$ jmtpfs 
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device
terminate called after throwing an instance of 'MtpErrorCantOpenDevice'
  what():  Can't open device
Aborted (core dumped)

Comment 13 Robert Scheck 2021-01-08 11:56:14 UTC
My mistake, I didn't apply the patch. https://koji.fedoraproject.org/koji/taskinfo?taskID=59181035 applies it really.

Comment 14 Fedora Update System 2021-01-14 01:38:09 UTC
FEDORA-2021-5727b9d170 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2021-01-14 01:43:16 UTC
FEDORA-2021-5afd82bb39 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2021-01-20 02:17:11 UTC
FEDORA-EPEL-2021-62c72550e5 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-62c72550e5

Comment 17 Fedora Update System 2021-01-20 02:17:12 UTC
FEDORA-2021-052a32b217 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-052a32b217

Comment 18 Fedora Update System 2021-01-20 02:17:13 UTC
FEDORA-2021-d73a1ada4e has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-d73a1ada4e

Comment 19 Fedora Update System 2021-01-21 01:25:10 UTC
FEDORA-2021-052a32b217 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-052a32b217`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-052a32b217

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 20 Fedora Update System 2021-01-21 01:48:34 UTC
FEDORA-EPEL-2021-d2e48f2408 has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 21 Fedora Update System 2021-01-21 01:55:24 UTC
FEDORA-EPEL-2021-7095bb6a7d has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-7095bb6a7d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 22 Fedora Update System 2021-01-21 02:00:07 UTC
FEDORA-EPEL-2021-62c72550e5 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-62c72550e5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 23 Fedora Update System 2021-01-21 02:02:31 UTC
FEDORA-2021-d73a1ada4e has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-d73a1ada4e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-d73a1ada4e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 24 Fedora Update System 2021-01-29 02:18:43 UTC
FEDORA-2021-d73a1ada4e has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 25 Fedora Update System 2021-01-29 02:34:29 UTC
FEDORA-2021-052a32b217 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 26 Fedora Update System 2021-02-05 01:48:29 UTC
FEDORA-EPEL-2021-7095bb6a7d has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 27 Fedora Update System 2021-02-05 01:58:20 UTC
FEDORA-EPEL-2021-62c72550e5 has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.