Bug 1645920 - [abrt] util-linux: toggle_tray(): eject killed by SIGABRT
Summary: [abrt] util-linux: toggle_tray(): eject killed by SIGABRT
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:bb5be3ad5c2b589fc84525be2d9...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-04 21:38 UTC by Steve
Modified: 2018-11-30 23:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-30 23:38:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (14.33 KB, text/plain)
2018-11-04 21:38 UTC, Steve
no flags Details
File: cgroup (289 bytes, text/plain)
2018-11-04 21:38 UTC, Steve
no flags Details
File: core_backtrace (984 bytes, text/plain)
2018-11-04 21:38 UTC, Steve
no flags Details
File: dso_list (998 bytes, text/plain)
2018-11-04 21:39 UTC, Steve
no flags Details
File: limits (1.29 KB, text/plain)
2018-11-04 21:39 UTC, Steve
no flags Details
File: proc_pid_status (1.27 KB, text/plain)
2018-11-04 21:39 UTC, Steve
no flags Details

Description Steve 2018-11-04 21:38:52 UTC
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

Comment 1 Steve 2018-11-04 21:38:57 UTC
Created attachment 1501488 [details]
File: backtrace

Comment 2 Steve 2018-11-04 21:38:58 UTC
Created attachment 1501489 [details]
File: cgroup

Comment 3 Steve 2018-11-04 21:38:59 UTC
Created attachment 1501490 [details]
File: core_backtrace

Comment 4 Steve 2018-11-04 21:39:00 UTC
Created attachment 1501491 [details]
File: dso_list

Comment 5 Steve 2018-11-04 21:39:01 UTC
Created attachment 1501492 [details]
File: limits

Comment 6 Steve 2018-11-04 21:39:02 UTC
Created attachment 1501493 [details]
File: proc_pid_status

Comment 7 Steve 2018-11-04 21:48:09 UTC
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

Comment 8 Steve 2018-11-04 21:52:07 UTC
# 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

Comment 9 Steve 2018-11-04 22:08:41 UTC
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

Comment 10 Steve 2018-11-05 03:28:50 UTC
# 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
...

Comment 11 Karel Zak 2018-11-05 09:36:42 UTC
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.

Comment 12 Steve 2018-11-05 11:05:31 UTC
(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

Comment 13 Ben Cotton 2018-11-27 13:40:13 UTC
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.

Comment 14 Ben Cotton 2018-11-30 23:38:49 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.