From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020918 Description of problem: The serial driver produces an badness message and panics in some situations: Kernel panic - not syncing: drivers/serial/serial_core.c:103: spin_lock(drivers/serial/serial_core.c:c04055e0) already locked by drivers/serial/8250.c/1170 The program runs as normal user account, which has read and write access to /dev/ttyS0. All the program does, is setting the low latency mode, and then waiting, until a certain state of the handshake lines is reached, then it sends a bytes and waits for a byte. Then it changes the handshake lines again and the process starts again. The problem seems to be a race condition, as it happens not always. On the other end of the serial line, there is a SIEMENS 5WG1 148 1AB2 EIB Buscoupler. Photos of a panic screen are available under http://www.auto.tuwien.ac.at/~mkoegler/linux/, serial_oops.c in the directory is the problematic programm. Under FC2 Kernels, the problem is the same. The problem is also reproducesable with a normal linux pc on the other end of the serial line. If I run the programm, connect the serial with a null modem cable and run echo x>/dev/ttyS0 on the other computer, I get a similar panic message. The serial port configuration on the other computer is: $stty -a -F/dev/ttyS0 speed 38400 baud; rows 0; columns 0; line = 0; intr = M-G; quit = ^_; erase = ^M; kill = h; eof = <undef>; eol = 4; eol2 = M-c; start = M-c; stop = #; susp = @; rprnt = M-~; werase = @; lnext = <undef>; flush = #; min = 1; time = 5; -parenb -parodd cs8 -hupcl -cstopb cread clocal crtscts ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echokeport Martin Kögler e9925248.ac.at Version-Release number of selected component (if applicable): 2.6.10-1.741_FC3 How reproducible: Not every time (with the Siemens bus coupler), but the using a second pc worked every time for the three times, I tried it.
Created attachment 110187 [details] Program producing the panic
The problem is a general problem in the linux kernel. The knoppix kernel 2.6.7 (Knoppix 2.6) shows also this problem. With enabled smp support, the computer only hangs. In all my tries, I can hang a computer: 1)Connect two computers with a null modem cable 2)Start the programm (in Comment #1) on one computer 3)send some characters from the other computer to the program (eg. echo x>/dev/ttyS0) Then in all my tests, the first computer hanged. The oldest kernel, I tested, is a 2.6.5-1.385 (FC2 Kernel), which is also vulernable. The baudrate of the serial port on the second computer seems to be not important. Martin Kögler e9925248.ac.at
A Fix for that issue is included in linux 2.6 BitKeeper Repository: http://linux.bkbits.net:8080/linux-2.6/cset%4042084ee5WBMJKW89M3BdT38Ykkl5eA?nav=index.html|ChangeSet@-1d
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.
The problem has been fixed in Linux 2.6.11. On 2.6.11-1.27_FC3 it did not happen any more. mfg Martin Kögler