All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pat LaVarre <p.lavarre@ieee.org>
To: linux-scsi@vger.kernel.org
Subject: sg MiB writes scheduling while atomic
Date: 10 Sep 2003 12:49:37 -0600	[thread overview]
Message-ID: <1063219776.3669.72.camel@patehci2> (raw)
In-Reply-To: <1063217791.3669.43.camel@patehci2>


In reply to `modprobe -r sg`, linux-2.6.0-test5 dmesg tells me:

Debug: sleeping function called from invalid context at
include/linux/rwsem.h:66
...
bad: scheduling while atomic!

Those lines appear in the log below.  The ... ellipses you see were
typed by me, sorry I don't have a more complete intact log, nor have I
yet repeated this result myself.

To provoke this log overnight I ran a shell script to repeat something
like:
pldd of=/dev/sg1 if=/dev/zero bs=1m

The "usb 1-1: sg_complete, unlink --> -19" appeared when or before an
ioctl SG_IO hung.  The Debug/ Call Trace appeared in response to a
`modprobe -r sg` that hung.  I'm confident the cable was not unplugged
because rebooting the system made sg work again.  I'm confident the
drive power was not cycled because reboot provoked only an SK ASC = x 6
29 Reset unit attention, without an SK ASC = x 6 28 GoneReady unit
attention.

[usb-storage] folk tell me some linux-scsi folk may appreciate me
mentioning this.

Pat LaVarre

...
usb-storage: Command WRITE_10 (10 bytes)
usb-storage:  2a 00 00 ce 26 00 00 02 00 00
usb-storage: Bulk Command S 0x43425355 T 0x439c9 L 1048576 F 0 Trg 0 LUN 0 CL 10
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_bulk_transfer_sglist: xfer 1048576 bytes, 32 entries
usb-storage: Status code 0; transferred 1048576/1048576
usb-storage: -- transfer complete
usb-storage: Bulk data transfer result 0x0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x439c9 R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Command WRITE_10 (10 bytes)
usb-storage:  2a 00 00 ce 28 00 00 02 00 00
usb-storage: Bulk Command S 0x43425355 T 0x439ca L 1048576 F 0 Trg 0 LUN 0 CL 10
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_bulk_transfer_sglist: xfer 1048576 bytes, 32 entries
usb-storage: Status code 0; transferred 1048576/1048576
usb-storage: -- transfer complete
usb-storage: Bulk data transfer result 0x0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x439ca R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Command WRITE_10 (10 bytes)
usb-storage:  2a 00 00 ce 2a 00 00 02 00 00
usb-storage: Bulk Command S 0x43425355 T 0x439cb L 1048576 F 0 Trg 0 LUN 0 CL 10
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_bulk_transfer_sglist: xfer 1048576 bytes, 32 entries
usb 1-1: sg_complete, unlink --> -19
usb 1-1: sg_complete, unlink --> -19
usb 1-1: sg_complete, unlink --> -19
usb 1-1: sg_complete, unlink --> -19
usb 1-1: sg_complete, unlink --> -19
usb 1-1: sg_complete, unlink --> -19
usb 1-1: sg_complete, unlink --> -19
usb 1-1: sg_complete, unlink --> -19
usb 1-1: sg_complete, unlink --> -19
usb 1-1: sg_complete, unlink --> -19
usb 1-1: sg_complete, unlink --> -19
...

Debug: sleeping function called from invalid context at
include/linux/rwsem.h:66
Call Trace:
 [<c0121f16>] __might_sleep+0x5f/0x72
 [<c0280ec0>] scsi_device_put+0x3c/0xfe
 [<df9179bc>] sg_remove+0x146/0x1bd [sg]
 [<c024db2f>] class_interface_unregister+0x7c/0xc0
 [<df91a7b3>] exit_sg+0x17/0x56 [sg]
 [<c013b533>] sys_delete_module+0x18e/0x1d1
 [<c0151695>] sys_munmap+0x58/0x77
 [<c010b46d>] sysenter_past_esp+0x52/0x71
 
bad: scheduling while atomic!
Call Trace:
 [<c012018e>] schedule+0x57a/0x57f
 [<c01251d6>] printk+0x180/0x1cc
 [<c01eca67>] rwsem_down_write_failed+0xa3/0x15c
 [<c010c279>] dump_stack+0x1e/0x22
 [<c0281189>] .text.lock.scsi+0xa7/0xce
 [<df9179bc>] sg_remove+0x146/0x1bd [sg]
 [<c024db2f>] class_interface_unregister+0x7c/0xc0
 [<df91a7b3>] exit_sg+0x17/0x56 [sg]
 [<c013b533>] sys_delete_module+0x18e/0x1d1
 [<c0151695>] sys_munmap+0x58/0x77
 [<c010b46d>] sysenter_past_esp+0x52/0x71
...



  reply	other threads:[~2003-09-10 18:48 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-09 19:49 [2.6-test] Bug in usb-storage or scsi? Georgi Chorbadzhiyski
2003-09-09 20:51 ` [linux-usb-devel] " Alan Stern
2003-09-09 21:17   ` Georgi Chorbadzhiyski
2003-09-10 16:23     ` Alan Stern
2003-09-10 18:16       ` [usb-storage] " Pat LaVarre
2003-09-10 18:49         ` Pat LaVarre [this message]
2003-09-10 19:30           ` sg MiB writes scheduling while atomic Pat LaVarre
2003-09-16  6:35             ` Douglas Gilbert
2003-09-16 11:42               ` Matthew Wilcox
2003-09-16 12:58                 ` Christoph Hellwig
2003-10-14 23:36                 ` Pat LaVarre
2003-09-10 20:08           ` [PATCH] mount -w of dvd+rw etc. in vanilla 2.6 Pat LaVarre
2003-09-10 22:49             ` Patrick Mansfield
2003-09-22 14:52           ` max GiB written per boot Pat LaVarre
2003-09-10 20:51         ` unsolicited sense in 2.6.0-test5 usb-storage.ko Pat LaVarre
2003-09-10 21:03           ` [usb-storage] " Alan Stern
2003-09-10 21:24             ` Pat LaVarre
2003-09-10 21:52               ` Matthew Dharm
2003-09-10 22:08                 ` Pat LaVarre
2003-09-12  0:21                   ` Pat LaVarre
2003-09-12  0:29                     ` Pat LaVarre
2003-09-16 11:28                 ` Douglas Gilbert
2003-09-11  0:02       ` [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi? Patrick Mansfield
2003-09-11 20:04         ` [usb-storage] " Pat LaVarre
2003-09-11 20:05         ` Alan Stern
2003-09-11 20:19           ` James Bottomley
2003-09-12 21:17             ` Alan Stern
2003-09-11 20:42           ` Pat LaVarre
2003-09-11 23:18             ` [PATCH] 2.4.22 precedes 0.9.9 in module-init-tools of course Pat LaVarre
2003-09-12 19:59             ` [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi? Alan Stern
2003-09-12 19:18           ` Pat LaVarre
2003-09-12 18:43         ` Pat LaVarre
2003-09-12 20:56           ` Patrick Mansfield
2003-09-12 21:53             ` Pat LaVarre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1063219776.3669.72.camel@patehci2 \
    --to=p.lavarre@ieee.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.