[Haifux] Login console freezes: Eli's weekly riddle

Shachar Shemesh shachar at shemesh.biz
Sat Nov 6 22:17:35 MSK 2010

On 29/10/10 17:04, Eli Billauer wrote:
>     /* find a device that is not in use. */
>     printk(KERN_ALERT  "34: pty_open to lock\n");
>     tty_lock();
>     printk(KERN_ALERT  "35: pty_open locked\n");
> <snip>
Set a global variable right before the tty_lock call, and clear it 
immediately after. Inside tty_lock (and probably tty_unlock too), set up 
many printks conditional on this global variable being set. Print any 
relevant identifier you can find (such as the device ID). This should 
help you find out WHY the device takes so long to lock. and hopefully, 
who the contention is with.

Also, in tty_lock, save to a global variable who is holding the lock, 
and print that variable from the code above.


Shachar Shemesh
Lingnu Open Source Consulting Ltd.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://haifux.org/pipermail/haifux/attachments/20101106/ee27d18d/attachment.html 

More information about the Haifux mailing list