Hi, I think I found the following missing locking in libiohelp:
2002-05-11 Marcus Brinkmann <[EMAIL PROTECTED]> * handle_io_release_conch.c (iohelp_handle_io_release_conch): New variable USER_SH. Hold USER_SH->lock while checking conch status. See the below patch. However, this does not seem to be enough to get conchs working with exec. Uncommenting the io_map_cntl in exec/exec.c leads to a dead-lock when booting a second Hurd. exec hangs in io_get_conch, while ext2fs hangs in condition_wait waiting for the conch to be released. This happens when trying to start proc, or, if the -d option is given to boot, when trying to start console-run (in this latter case, proc and auth start up fine, which seems to indicate that there is some sort of race involved). The code however looks fine as far as I can tell. It just seems that the exec server and the ext2fs have a different idea on what the shared page looks like, despite the spin lock properly taken. While exec thinks that USER_HAS_NOT_CONCH is the status, ext2fs thinks that USER_RELEASE_CONCH is the status (which actually might be a prior USER_HAS_CONCH). Can this be a default pager/mach vm bug, too? It seems that the shared I/O code is not really tested and a bit dated. Thomas, do you remember any unresolved issues about it? Thanks, Marcus Index: handle_io_release_conch.c =================================================================== RCS file: /cvsroot/hurd/hurd/libiohelp/handle_io_release_conch.c,v retrieving revision 1.7 diff -u -p -r1.7 handle_io_release_conch.c --- handle_io_release_conch.c 6 May 1996 20:31:03 -0000 1.7 +++ handle_io_release_conch.c 11 May 2002 01:47:25 -0000 @@ -23,13 +23,16 @@ void iohelp_handle_io_release_conch (struct conch *c, void *user) { - + struct shared_io *user_sh = c->holder_shared_page; + + spin_lock (&user_sh->lock); if (c->holder_shared_page->conch_status != USER_HAS_NOT_CONCH) { c->holder_shared_page->conch_status = USER_HAS_NOT_CONCH; iohelp_fetch_shared_data (c->holder); } - + spin_unlock (&user_sh->lock); + if (c->holder == user) { c->holder = 0; -- `Rhubarb is no Egyptian god.' Debian http://www.debian.org [EMAIL PROTECTED] Marcus Brinkmann GNU http://www.gnu.org [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.marcus-brinkmann.de _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd