[M3devel] I386_OPENBSD hangs in stubgen

Jay K jay.krell at cornell.edu
Mon Jul 19 16:34:02 CEST 2010


I386_OPENBSD hangs in stubgen

Problem seems to be in the "rewritten" user threads (ie: using the sigaltstack approach
instead of poking at the jmpbuf)

here:

    sigemptyset(&sigs);
    sigaddset(&sigs, SIGUSR1);
    sigprocmask(SIG_BLOCK, &sigs, &osigs);
...
    kill(getpid(), SIGUSR1);
    sigfillset(&sigs);
    sigdelset(&sigs, SIGUSR1);
    while (!mctx_called)
        sigsuspend(&sigs);


The kill seems to come in immdiately, even though sigusr1 is blocked.
And then sigsuspend hangs waiting forever.
I forgot to eheck if mctx_called has changed, or if the check is optimized out.
It seems ok if the kill comes in right away actually.


I thought I had tested all this already on OpenBSD/x86 but I guess maybe not.
I thought maybe the -pthread vs. -lpthread did it, but it seems not.
I'll poke around more.
I might resort to putting back the jmpbuf hacking, which would be unfortunate.
(OpenBSD doesn't implement get/set/make/swapcontext, at least as of previous release 4.6.)



 - Jay




 		 	   		  


More information about the M3devel mailing list