Red Hat Bugzilla – Bug 146088
Panic in serial driver
Last modified: 2015-01-04 17:16:12 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1)
Description of problem:
The serial driver produces an badness message and panics in some
Kernel panic - not syncing: drivers/serial/serial_core.c:103:
spin_lock(drivers/serial/serial_core.c:c04055e0) already locked by
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
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
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
Version-Release number of selected component (if applicable):
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.
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
The baudrate of the serial port on the second computer seems to be not
A Fix for that issue is included in linux 2.6 BitKeeper Repository:
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'.
The problem has been fixed in Linux 2.6.11. On 2.6.11-1.27_FC3 it did not happen
mfg Martin KÃ¶gler