Description of problem: # eject -v -T /dev/sdc eject: device name is `/dev/sdc' eject: /dev/sdc: not mounted eject: /dev/sdc: is whole-disk device eject: /dev/sdc: toggling tray Aborted (core dumped) /dev/sdc is a formatted USB flash drive: # lsusb -d 0781:5583 Bus 004 Device 002: ID 0781:5583 SanDisk Corp. Ultra Fit # lsblk /dev/sdc NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdc 8:32 1 28.7G 0 disk ├─sdc1 8:33 1 1.6G 0 part └─sdc2 8:34 1 2.2M 0 part Version-Release number of selected component: util-linux-2.30.2-3.fc27 Additional info: reporter: libreport-2.9.3 backtrace_rating: 4 cmdline: eject -v -T /dev/sdc cpuinfo: crash_function: toggle_tray environ: executable: /usr/bin/eject journald_cursor: s=424c9cf61ccc4d73b5d2ce944293027c;i=2035f;b=7bebd68ba4234b9893d8f48988d02737;m=38068ed9;t=579dd55a07dd8;x=3c703de19f9522d9 kernel: 4.18.16-100.fc27.x86_64 maps: mountinfo: open_fds: rootdir: / runlevel: N 5 type: CCpp uid: 0 Truncated backtrace: Thread no. 1 (1 frames) #2 toggle_tray at sys-utils/eject.c:441
Created attachment 1501488 [details] File: backtrace
Created attachment 1501489 [details] File: cgroup
Created attachment 1501490 [details] File: core_backtrace
Created attachment 1501491 [details] File: dso_list
Created attachment 1501492 [details] File: limits
Created attachment 1501493 [details] File: proc_pid_status
These operations work as expected: # eject -v /dev/sdc eject: device name is `/dev/sdc' eject: /dev/sdc: not mounted eject: /dev/sdc: is whole-disk device eject: /dev/sdc: trying to eject using CD-ROM eject command eject: CD-ROM eject command failed eject: /dev/sdc: trying to eject using SCSI commands eject: SCSI eject succeeded # eject -v -t /dev/sdc eject: device name is `/dev/sdc' eject: /dev/sdc: not mounted eject: /dev/sdc: is whole-disk device eject: /dev/sdc: closing tray
# lsusb -v -d 0781:5583 Bus 004 Device 002: ID 0781:5583 SanDisk Corp. Ultra Fit Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 3.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 9 idVendor 0x0781 SanDisk Corp. idProduct 0x5583 Ultra Fit bcdDevice 1.00 iManufacturer 1 SanDisk iProduct 2 Ultra Fit iSerial 3 4C530001210512121060 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 44 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 896mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk-Only iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 Binary Object Store Descriptor: bLength 5 bDescriptorType 15 wTotalLength 22 bNumDeviceCaps 2 USB 2.0 Extension Device Capability: bLength 7 bDescriptorType 16 bDevCapabilityType 2 bmAttributes 0x00000002 HIRD Link Power Management (LPM) Supported SuperSpeed USB Device Capability: bLength 10 bDescriptorType 16 bDevCapabilityType 3 bmAttributes 0x00 wSpeedsSupported 0x000e Device can operate at Full Speed (12Mbps) Device can operate at High Speed (480Mbps) Device can operate at SuperSpeed (5Gbps) bFunctionalitySupport 1 Lowest fully-functional device speed is Full Speed (12Mbps) bU1DevExitLat 10 micro seconds bU2DevExitLat 256 micro seconds can't get debug descriptor: Resource temporarily unavailable Device Status: 0x000c (Bus Powered) U1 Enabled U2 Enabled
Reproduced with a different USB flash drive in a different port: # lsusb -d 13fe:3800 Bus 003 Device 003: ID 13fe:3800 Kingston Technology Company Inc. Rage XT Flash Drive # lsblk /dev/sdc NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdc 8:32 1 7.5G 0 disk └─sdc1 8:33 1 1.5G 0 part
# strace eject -v -T /dev/sdc ... write(1, "eject: /dev/sdc: toggling tray\n", 31eject: /dev/sdc: toggling tray ) = 31 openat(AT_FDCWD, "/dev/sdc", O_RDWR|O_NONBLOCK) = 3 ioctl(3, CDROM_DRIVE_STATUS, 0x802) = -1 EINVAL (Invalid argument) rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0 ...
It seems eject's reaction to invalid ioctl is pretty crazy in this case: switch (ioctl(fd, CDROM_DRIVE_STATUS)) { ... default: abort(); } ... any error message and exit() would be better than abort(). Thanks for your report. Fixed by upstream commit a6f99be44796086c73c03a91464407a2ff74dadd.
(In reply to Karel Zak from comment #11) ... > Fixed by upstream commit a6f99be44796086c73c03a91464407a2ff74dadd. Thanks, Karel: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/sys-utils/eject.c?id=a6f99be44796086c73c03a91464407a2ff74dadd
This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '27'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.