Red Hat Bugzilla – Bug 140356
SCSI subsystem locks up when unplugging external firewire devices
Last modified: 2015-01-04 17:12:55 EST
Description of problem:
Physically detaching an external IEEE1394 device (DVD-writer) by e.g.
unplugging the firewire cable causes the kernel scsi subsystem to
completely lock up (no dmesg, no oopses).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. attach external SCSI device, watch udev create links
2. remove external SCSI device
3. cat /proc/scsi/scsi
SCSI-related processes (cat /proc/scsi/scsi, rmmod sbp2, etc.) hang.
root 10801 0.0 0.0 3700 412 pts/6 D+ 17:06 0:00 cat
root 11235 0.0 0.0 1436 380 pts/7 D+ 17:11 0:00 rmmod sbp2
- Could this be related to bug #136255 ?
- udev creates symlinks in /dev, but not in /media (bug #139171 ?).
Created attachment 107186 [details]
Nov 22 17:03:05 : attach firewire device
Nov 22 17:06:01 : detach firewire device
Created attachment 107187 [details]
dmesg attach/detach log extract
"rmmod sbp2" while the IEEE1394 device is still atached, yields the
same erroneous behaviour (= scsi subsystem lockup).
1. in console :
# rmmod sbp2
(the console hangs)
2. in another console :
# tail /var/log/messages
Nov 28 20:16:16 dmbr042 kernel: ieee1394: sbp2: Logged out of SBP-2 device
Nov 28 20:16:16 dmbr042 udev: removing device node '/dev/scd0'
# ps aux
root 8235 0.0 0.0 1436 380 pts/5 D+ 20:16 0:00 rmmod sbp2
--> SCSI locked up until next reboot.
SCSI subsystem still locking up with kernel-2.6.9-1.698_FC3.
what a surprise, the firewire subsystem didnt improve with age.
I've picked up a firewire device myself, so I might tackle this at
some point in the future, but it's not top of my todo list.
Reporting this problem to the upstream ieee1394 developers might be
useful for you in the meantime.
I'll report upstream, and refer to this bug report.
Please note firewire is sometimes the only high-speed alternative for
(slightly aging) laptops without USB2.
PCMCIA USB2 could be a solution for non-camera (e.g. storage) devices,
but I noticed random device disconnections with the latest
kernel-2.6.9-1.698_FC3 (would not know how to further diagnose and put
this in a bug report, though).
Unfortunately, this bug did not disappear magically : still present with FC4t3
Seems I'll really have to report upstream. ;)
(for the record : SATA drive /dev/sda keeps functioning, newly attached USB keys
are not recognized.)
I'm seeing the same symptoms with 2.6.11-1.1363_FC4smp. Specifically, I'm seeing
the problem reported on the "IEEE 1394 for Linux" sourceforge project, bug
number 1008416. After unplugging my Macally AC100, dmesg usually shows
"Synchronizing SCSI cache for disk sdd:" after which anything depending on
/proc/scsi/scsi will hang. I did manage to replug the device once or twice, but
the problem almost always manifests after unplugging.
Once the problem occurs, "cat /proc/scsi/scsi" not only hangs, it results in an
unkillable process. Furthermore, the system hangs during shutdown, again with
the message "Synchronizing SCSI cache for disk sdd:".
I used to see this too.
I actually had to compile my own custom kernel with the "Synchronizing SCSI
cache" code commented out to "solve" this problem. Since I did that, no more
lockups; firewire works beautifully.
I believe the "Synchronizing SCSI cache" message and code is for RAID
controllers that have onboard delayed-write caching; it ensures that any pending
writes are completed before power is cut. This is obviously pointless for
external firewire drives, as once the drive is unplugged, it's physically gone
and no amount of attempting to synchronize will help.
I hope this is fixed soon; firewire disks under Linux are effectively broken
with this bug!
An update has been released for Fedora Core 3 (kernel-2.6.12-1.1372_FC3) which
may contain a fix for your problem. Please update to this new kernel, and
report whether or not it fixes your problem.
If you have updated to Fedora Core 4 since this bug was opened, and the problem
still occurs with the latest updates for that release, please change the version
field of this bug to 'fc4'.
I don't have easy access to Fedora Core 3, but I did update to Fedora Core 4
(2.6.12-1.1398_FC4smp). I haven't yet noticed the "Synchronizing SCSI ..."
message yet, but I'm still having the same basic problem: reading
/proc/scsi/scsi hangs the process unkillably, and re-plugging is not possible.
(I'm not the owner, so I can't update the version field.)
This bug has been mass-closed along with all other bugs that
have been in NEEDINFO state for several months.
Due to the large volume of inactive bugs in bugzilla, this
is the only method we have of cleaning out stale bug reports
where the reporter has disappeared.
If you can reproduce this bug with current FC3 updates, please
reopen this bug.
If you are not the reporter, you can add a comment requesting
it be reopened, and someone will get to it asap.
If you are not the reporter, but can reproduce this problem against
FC4, please open a new bug.