Opened 18 years ago

Closed 18 years ago

#1024 closed bug (fixed)

System Freeze When consoled Closes Keyboard FD

Reported by: bonefish Owned by: axeld
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: x86

Description

With hrev20135 the problem can be reproduced by running

consoled /bin/sh --login

in a terminal and "exit" the shell started in consoled. consoled's main thread eventually tries to close the FD for the keyboard ("/dev/keyboard"). At that point the system visually freezes (no more mouse moves, the Deskbar time is not updated).

Entering KDL via F12 still worked. Everytime I did that, consoled's keyboard reader thread (performing a read() on the keyboard FD) was in state running. A stack crawl showed it to be in the keyboard driver in keyboard_read() somewhere in the "retry:" endless loop (different locations: mutex_lock()/unlock(), acquire_sem_etc()).

At the same time consoled's main thread (performing the close() on the keyboard FD) was shown to be in state ready. A stack trace located it in the keyboard driver in keyboard_close() in delete_sem(). continuing the system and re-entering KDL later did not advance the position of the main thread any further.

Tested in VMWare.

Change History (1)

comment:1 by axeld, 18 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev20140. I'll have a deeper look at the scheduler though.

Note: See TracTickets for help on using tickets.