Messages in this thread | | | Date | Sun, 17 Jan 1999 08:42:33 +0100 (CET) | From | Mike Galbraith <> | Subject | [PROGRESS!] A simple way to lock up 2.2.0-pre7 |
| |
On Fri, 15 Jan 1999, Theodore Y. Ts'o wrote:
> From: sliwa@theta1.cft.edu.pl (Cezary Sliwa) > Date: Fri, 15 Jan 1999 17:31:30 +0100 (MET) > > Just press ^C to stop this loop: > > while true; do (cat /dev/tty > /dev/null &); done > > (I tried this at the console). > > Umm.... I get "cat: /dev/tty: Input/output error" repeated many times. > No lock up.....
Hi Ted,
Since oopsing the kernel wasn't producing anything useful (damn), I took another route. I wrapped __wake_up() and inserted a booboo test ala...
while (next != head) { struct task_struct *p = next->task; next = next->next; if(next->next==next) { /*MIKEDIDIT*/ printk(KERN_ERR "__wake_up: Called from %s:%d\n",AT->file,AT->line); read_unlock(&waitqueue_lock); break; } if (p->state & mode) wake_up_process(p); }
...and did the 'while true; do (cat /dev/tty > /dev/null &); done'. When the bug triggered, I received '__wake_up: Called from n_tty.c:711'
FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND 100 515 168 1 0 0 2012 1168 down_failed S 6 0:00 -bash 0 515 268 1 0 0 1096 320 read_chan S 6 0:00 cat /dev/
Armed with this, I took a wild guess (intuitive reasoning:) and did the following to read_chan in n_tty.c. I don't _even_ think that this is correct mind you, but it might serve to illuminate the little beastie. With this in, I can no longer induce the error, and the tty still works.
925 add_wait_queue(&tty->read_wait, &wait); 926 927 if (down_interruptible(&tty->atomic_read)) { 928 remove_wait_queue(&tty->read_wait, &wait); /*MIKEDIDIT*/ 929 return -ERESTARTSYS; 930 }
Hope this helps,
-Mike
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |