mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* hang due to console driver
@ 2004-01-05 14:40 Anand Suvernkar
  0 siblings, 0 replies; only message in thread
From: Anand Suvernkar @ 2004-01-05 14:40 UTC (permalink / raw)
  To: linux-kernel



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





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-01-05 14:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-05 14:40 hang due to console driver Anand Suvernkar

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®