From: Anand Suvernkar <asuvernk@vxindia.veritas.com>
To: linux-kernel@vger.kernel.org
Subject: hang due to console driver
Date: 05 Jan 2004 20:10:15 +0530 [thread overview]
Message-ID: <1073313615.19275.4734.camel@badam> (raw)
Hi all,
I faced a problem in the kernel module I am working on.
The context of the problem is..
There are two kernel threads running in the system. One
thread is printing a message on the console using printk
every 100 milli seconds. And the other thread at some time faces some
error and tries to print the error and gets hung. It remains
in the hung state until I change the log levels to disallow
printing on the serial console.
I artificially created a panic and found following stack trace.
[<c01c6920>] serial_console_write [kernel] 0x0 (0xedf0ddc4)
[<c01c0739>] serial_in [kernel] 0x19 (0xedf0dde8)
[<c01c69a0>] serial_console_write [kernel] 0x80 (0xedf0ddf8)
[<c0128473>] __call_console_drivers [kernel] 0x63 (0xedf0de20)
[<c0128596>] call_console_drivers [kernel] 0x86 (0xedf0de3c)
[<c0128975>] release_console_sem [kernel] 0x55 (0xedf0de60)
[<c0128893>] printk [kernel] 0x143 (0xedf0de74)
[<f98fecf2>] .rodata.str1.32 [vxio] 0x4ce72 (0xedf0de80)
[<f9830979>] ack_timeout [vxio] 0xc9 (0xedf0de94)
ack_timeout is a function in my module which calls printk.
and gets hung.
So I am not able to find out the reason for this hang. The apparent
culprit is the second thread which is continuously printing some
messages. The implementation of printk is such that if the console
semaphore is held by someone, printk issued by other threads simply
writes the data in the log buffer and returns. It is the
responsibility of the console semaphore holder to print these messages
before it releases the lock.
So the only plausible reason I can find is deadlock for the log
buffer.
Has anyone faced this problem before ? I will be greatly thankful if
someone has something to say about this problem.
Since I am not a subscribed member I wish to be personally CC'ed the
answers/comments posted to the list in response to my mail
Thanks
Anand
reply other threads:[~2004-01-05 14:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1073313615.19275.4734.camel@badam \
--to=asuvernk@vxindia.veritas.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®