Bug 146088 - Panic in serial driver
Summary: Panic in serial driver
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 3
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Dave Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-25 10:24 UTC by Martin Koegler
Modified: 2015-01-04 22:16 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-07-15 23:16:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Program producing the panic (1.72 KB, text/plain)
2005-01-25 10:26 UTC, Martin Koegler
no flags Details

Description Martin Koegler 2005-01-25 10:24:48 UTC
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.

Comment 1 Martin Koegler 2005-01-25 10:26:27 UTC
Created attachment 110187 [details]
Program producing the panic

Comment 2 Martin Koegler 2005-01-26 12:29:10 UTC
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

Comment 3 Martin Koegler 2005-02-08 09:28:40 UTC
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

Comment 4 Dave Jones 2005-07-15 20:01:04 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 5 Martin Koegler 2005-07-15 22:31:00 UTC
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


Note You need to log in before you can comment on or make changes to this bug.