Red Hat Bugzilla – Bug 153954
kernel panic when removing active USB serial converter used as serial console
Last modified: 2007-11-30 17:07:06 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.6) Gecko/20050322 Firefox/1.0.2
Description of problem:
Installed a belkin USB to serial converter into system, and set up to work as a serial console for the system.
Kernel recognises the adapter, and serial console works very well.
/etc/inittab contains the line:
cu:2345:respawn:/sbin/agetty -t60 -f /etc/issue.usb 19200 /dev/ttyUSB0
If the USB to serial converter is unplugged when an active agetty is running, the kernel panics.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Insert USB to serial adapter
2. If not already running, start agetty process on /dev/ttyUSB0 (or whatever tty)
3. unplug USB to serial adapter
Actual Results: System fall down go boom.
Kernel panic, system halted.
Expected Results: The kernel should recognise the event and bypass any processess attached to that tty
*** Bug 153967 has been marked as a duplicate of this bug. ***
FWIW, kernel trace as recorded (typed from notes, not exact grab):
die [kernel] 0x1b0
ia64_do_page_fault [kernel] 0x350
ia64_leave_kernel [kernel] 0x0
serial_write [kernel] 0x100
opost_block [kernel] 0x300
write_chan [kernel] 0x280
tty_write [kernel] 0x680
sys_write [kernel] 0x1c0
ia64_ret_from_syscall [kernel] 0x0
Note that problem cannot be reproduced with kernel 2.4.21-20-EL
Ah-ha, finally, a traceback! This helps a lot, I can see now that this
is likely to be the same problem as bug 132994. But please DO NOT DUP,
for two reasons. 1) May be not the same, and it's much easier to dup
than to divorce afterwards, 2) this bug crowns a chain of dups, which
may have unrelated symptoms.
Please download a test kernel 2.4.21-31.EL.usbserial.2 for a desirable
architecture (ia64) and run tests.
This test employs the small plug fix.
With kernel 2.4.21-31.EL.usbserial.3 the problem does not exist. Disconnecting
the USB converter simply kills the agetty process and the system seems to
continue as normal. Messages follow, my notes in 
[ USB Device inserted ]
hub.c: new USB device 00:1d.1-2, assigned address 2
usb.c: USB device 2 (vend/prod 0x50d/0x109) is not claimed by any active driver.
usb.c: registered new driver serial
usbserial.c: USB Serial support registered for Generic
usbserial.c: USB Serial Driver core v1.4
usbserial.c: USB Serial support registered for Magic Control Technology USB-RS232
usbserial.c: Magic Control Technology USB-RS232 converter detected
usbserial.c: Magic Control Technology USB-RS232 converter now attached to
ttyUSB0 (or usb/tts/0 for devfs)
mct_u232.c: Magic Control Technology USB-RS232 converter driver v1.1
[ USB Device unplugged with agetty running on /dev/ttyUSB0 ]
usb.c: USB disconnect on device 00:1d.1-2 address 2
usbserial.c: Magic Control Technology USB-RS232 converter now disconnected
Attached scsi generic sg2 at scsi0, channel 0, id 6, lun 0, type 3
[root@sandpit1 root]# uname -a
Linux sandpit1 2.4.21-31.EL.usbserial.3 #1 SMP Tue Mar 22 19:56:52 EST 2005 ia64
ia64 ia64 GNU/Linux
Created attachment 127694 [details]
Candidate #2 - "Little Rework"
This bug becomes the banner bug for the "Little Rework [of usbserial]".
A fix for this problem has just been committed to the RHEL3 U8
patch pool this evening (in kernel version 2.4.21-40.8.EL).
A kernel has been released that contains a patch for this problem. Please
verify if your problem is fixed with the latest available kernel from the RHEL3
public beta channel at rhn.redhat.com and post your results to this bugzilla.
Reverting to ON_QA.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.