Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 140356

Summary: SCSI subsystem locks up when unplugging external firewire devices
Product: [Fedora] Fedora Reporter: Didier <d.bz-redhat>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED CANTFIX QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 3CC: flynnj, pfrields, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-12-07 07:57:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/var/log/messages
none
dmesg attach/detach log extract none

Description Didier 2004-11-22 16:14:06 UTC
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):
kernel-2.6.9-1.681_FC3

How reproducible:
Always

Steps to Reproduce:
1. attach external SCSI device, watch udev create links
2. remove external SCSI device
3. cat /proc/scsi/scsi

  
Actual results:
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
/proc/scsi/scsi
root     11235  0.0  0.0  1436  380 pts/7    D+   17:11   0:00 rmmod sbp2



Additional info:
- Could this be related to bug #136255 ?
- udev creates symlinks in /dev, but not in /media (bug #139171 ?).

Comment 1 Didier 2004-11-22 16:16:48 UTC
Created attachment 107186 [details]
/var/log/messages

Nov 22 17:03:05  :  attach firewire device
Nov 22 17:06:01  :  detach firewire device

Comment 2 Didier 2004-11-22 16:18:13 UTC
Created attachment 107187 [details]
dmesg attach/detach log extract

Comment 3 Didier 2004-11-28 19:17:14 UTC
"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[8249]: 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.

Comment 4 Didier 2004-12-08 09:13:19 UTC
SCSI subsystem still locking up with kernel-2.6.9-1.698_FC3.

Comment 5 Dave Jones 2004-12-08 17:21:19 UTC
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.

Comment 6 Didier 2004-12-08 20:18:25 UTC
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).

Comment 7 Didier 2005-05-24 09:24:45 UTC
Unfortunately, this bug did not disappear magically : still present with FC4t3
2.6.11-1.1340_FC4.

Seems I'll really have to report upstream.  ;)


(for the record : SATA drive /dev/sda keeps functioning, newly attached USB keys
are not recognized.)

Comment 8 Bradd W. Szonye 2005-05-31 13:25:40 UTC
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:".

Comment 9 John Flynn 2005-06-15 19:28:05 UTC
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!

-Z

Comment 10 Dave Jones 2005-07-15 20:21:55 UTC
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'.

Thank you.

Comment 11 Bradd W. Szonye 2005-08-17 01:21:28 UTC
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.)

Comment 12 Dave Jones 2005-12-07 07:57:59 UTC
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.

Thank you.