linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug 207877] New: ASMedia drive (174c:55aa) hangs in ioctl CDROM_DRIVE_STATUS when mounting a DVD
@ 2020-05-24 16:50 bugzilla-daemon
  2020-05-24 18:30 ` [Bug 207877] " bugzilla-daemon
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: bugzilla-daemon @ 2020-05-24 16:50 UTC (permalink / raw)
  To: linux-scsi

https://bugzilla.kernel.org/show_bug.cgi?id=207877

            Bug ID: 207877
           Summary: ASMedia drive (174c:55aa) hangs in ioctl
                    CDROM_DRIVE_STATUS when mounting a DVD
           Product: IO/Storage
           Version: 2.5
    Kernel Version: 5.6.14-arch1-1
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: SCSI
          Assignee: linux-scsi@vger.kernel.org
          Reporter: zfigura@codeweavers.com
        Regression: No

Created attachment 289267
  --> https://bugzilla.kernel.org/attachment.cgi?id=289267&action=edit
dmesg including backtrace of hang

The device has USB vendor/product 174c:55aa, and is described by its USB
product string as "ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge,
ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge".

When attempting to mount via "mount /dev/sr0 /mnt", strace shows the following
sequence (tail of log):

openat(AT_FDCWD, "/dev/sr0", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = 3
fadvise64(3, 0, 0, POSIX_FADV_RANDOM)   = 0
fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(0xb, 0), ...}) = 0
ioctl(3, BLKGETSIZE64, [8351399936])    = 0
openat(AT_FDCWD, "/sys/dev/block/11:0", O_RDONLY|O_CLOEXEC) = 4
openat(4, "dm/uuid", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or
directory)
close(4)                                = 0
openat(AT_FDCWD, "/sys/dev/block/11:0", O_RDONLY|O_CLOEXEC) = 4
faccessat(4, "partition", F_OK)         = -1 ENOENT (No such file or directory)
openat(4, "dm/uuid", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or
directory)
close(4)                                = 0
ioctl(3, CDROM_GET_CAPABILITY, 0)       = 2227183
ioctl(3, CDROM_DRIVE_STATUS

The last ioctl hangs in the kernel forever. mount cannot be killed even with
SIGKILL. dmesg shows a hang in multiple kernel thread which has been attached.

This problem occurs with at least one DVD I have tested, but I was able to
successfully mount, access, and unmount another CD-ROM.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 207877] ASMedia drive (174c:55aa) hangs in ioctl CDROM_DRIVE_STATUS when mounting a DVD
  2020-05-24 16:50 [Bug 207877] New: ASMedia drive (174c:55aa) hangs in ioctl CDROM_DRIVE_STATUS when mounting a DVD bugzilla-daemon
@ 2020-05-24 18:30 ` bugzilla-daemon
  2020-05-24 20:57 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2020-05-24 18:30 UTC (permalink / raw)
  To: linux-scsi

https://bugzilla.kernel.org/show_bug.cgi?id=207877

Bart Van Assche (bvanassche@acm.org) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bvanassche@acm.org

--- Comment #1 from Bart Van Assche (bvanassche@acm.org) ---
This may have been fixed by commit 51a858817dcd ("scsi: sr: get rid of sr
global mutex") + commit 72655c0ebd1d ("scsi: sr: Fix sr_block_release()"). Both
commits will be included in kernel v5.7 (not yet released). How about testing
whether this has been fixed in kernel v5.7-rc6
(https://git.kernel.org/torvalds/t/linux-5.7-rc6.tar.gz)?

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 207877] ASMedia drive (174c:55aa) hangs in ioctl CDROM_DRIVE_STATUS when mounting a DVD
  2020-05-24 16:50 [Bug 207877] New: ASMedia drive (174c:55aa) hangs in ioctl CDROM_DRIVE_STATUS when mounting a DVD bugzilla-daemon
  2020-05-24 18:30 ` [Bug 207877] " bugzilla-daemon
@ 2020-05-24 20:57 ` bugzilla-daemon
  2020-05-24 23:48 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2020-05-24 20:57 UTC (permalink / raw)
  To: linux-scsi

https://bugzilla.kernel.org/show_bug.cgi?id=207877

--- Comment #2 from Zebediah Figura (zfigura@codeweavers.com) ---
Created attachment 289273
  --> https://bugzilla.kernel.org/attachment.cgi?id=289273&action=edit
dmesg including backtrace of hang, from 5.7-rc6

(In reply to Bart Van Assche from comment #1)
> This may have been fixed by commit 51a858817dcd ("scsi: sr: get rid of sr
> global mutex") + commit 72655c0ebd1d ("scsi: sr: Fix sr_block_release()").
> Both commits will be included in kernel v5.7 (not yet released). How about
> testing whether this has been fixed in kernel v5.7-rc6
> (https://git.kernel.org/torvalds/t/linux-5.7-rc6.tar.gz)?

Unfortunately, 5.7-rc6 doesn't fix the bug. It hangs on the same ioctl, with
what looks like the same stack trace.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 207877] ASMedia drive (174c:55aa) hangs in ioctl CDROM_DRIVE_STATUS when mounting a DVD
  2020-05-24 16:50 [Bug 207877] New: ASMedia drive (174c:55aa) hangs in ioctl CDROM_DRIVE_STATUS when mounting a DVD bugzilla-daemon
  2020-05-24 18:30 ` [Bug 207877] " bugzilla-daemon
  2020-05-24 20:57 ` bugzilla-daemon
@ 2020-05-24 23:48 ` bugzilla-daemon
  2020-05-28 16:28 ` bugzilla-daemon
  2020-05-28 19:29 ` bugzilla-daemon
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2020-05-24 23:48 UTC (permalink / raw)
  To: linux-scsi

https://bugzilla.kernel.org/show_bug.cgi?id=207877

--- Comment #3 from Bart Van Assche (bvanassche@acm.org) ---
I think there are fewer processes involved in the v5.7-rc6 hang. Anyway, please
report this on the appropriate USB mailing list. It seems to me that the
following USB code is involved in the hang:

static int device_reset(struct scsi_cmnd *srb)
{
        struct us_data *us = host_to_us(srb->device->host);
        int result;

        usb_stor_dbg(us, "%s called\n", __func__);

        /* lock the device pointers and do the reset */
        mutex_lock(&(us->dev_mutex));
        result = us->transport_reset(us);
        mutex_unlock(&us->dev_mutex);

        return result < 0 ? FAILED : SUCCESS;
}

and also

static int usb_stor_control_thread(void * __us)
{
                [ ... ]
                mutex_lock(&(us->dev_mutex));
                [ ... ]
                        fill_inquiry_response(us, data_ptr, 36);
                [ ... ]
                mutex_unlock(&us->dev_mutex);
                [ ... ]
}

The following mailing list may be appropriate:

usb-storage@lists.one-eyed-alien.net

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 207877] ASMedia drive (174c:55aa) hangs in ioctl CDROM_DRIVE_STATUS when mounting a DVD
  2020-05-24 16:50 [Bug 207877] New: ASMedia drive (174c:55aa) hangs in ioctl CDROM_DRIVE_STATUS when mounting a DVD bugzilla-daemon
                   ` (2 preceding siblings ...)
  2020-05-24 23:48 ` bugzilla-daemon
@ 2020-05-28 16:28 ` bugzilla-daemon
  2020-05-28 19:29 ` bugzilla-daemon
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2020-05-28 16:28 UTC (permalink / raw)
  To: linux-scsi

https://bugzilla.kernel.org/show_bug.cgi?id=207877

--- Comment #4 from Zebediah Figura (zfigura@codeweavers.com) ---
Created attachment 289385
  --> https://bugzilla.kernel.org/attachment.cgi?id=289385&action=edit
usbmon trace

Attaching a usbmon trace including the hang. The drive is bus 1, device 3. The
last bulk input submission apparently never receives a response (I watched it
for a while, and after several minutes it was still stuck on the last line.)

Is this a sign of a broken device?

Even if it is, is the kernel mishandling this by hanging forever? (I'd be
inclined to say yes, but maybe there's only so much the kernel can do with
broken devices...)

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 207877] ASMedia drive (174c:55aa) hangs in ioctl CDROM_DRIVE_STATUS when mounting a DVD
  2020-05-24 16:50 [Bug 207877] New: ASMedia drive (174c:55aa) hangs in ioctl CDROM_DRIVE_STATUS when mounting a DVD bugzilla-daemon
                   ` (3 preceding siblings ...)
  2020-05-28 16:28 ` bugzilla-daemon
@ 2020-05-28 19:29 ` bugzilla-daemon
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2020-05-28 19:29 UTC (permalink / raw)
  To: linux-scsi

https://bugzilla.kernel.org/show_bug.cgi?id=207877

--- Comment #5 from Zebediah Figura (zfigura@codeweavers.com) ---
Created attachment 289389
  --> https://bugzilla.kernel.org/attachment.cgi?id=289389&action=edit
dmesg (from journalctl -k) including backtrace of hang and usb-storage
debugging

More testing, in response to questions/instructions from the mailing list.

Sometimes mount hangs forever in openat instead. I guess probably some kernel
thread is getting stuck for reasons not directly related to mount, and mount is
hanging as a result.

I built with 5.7-rc7 and CONFIG_USB_STORAGE_DEBUG enabled. I got a hang in
openat; I've attached kernel logs. usbmon shows a similar bulk input transfer
which never completes (even after waiting several minutes); I can attach that
output if it's helpful.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-28 19:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-24 16:50 [Bug 207877] New: ASMedia drive (174c:55aa) hangs in ioctl CDROM_DRIVE_STATUS when mounting a DVD bugzilla-daemon
2020-05-24 18:30 ` [Bug 207877] " bugzilla-daemon
2020-05-24 20:57 ` bugzilla-daemon
2020-05-24 23:48 ` bugzilla-daemon
2020-05-28 16:28 ` bugzilla-daemon
2020-05-28 19:29 ` bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).