Date: Wed, 16 Jul 2003 16:46:06 +0800 From: "David Xu" <davidxu@freebsd.org> To: <deischen@freebsd.org>, "David Schultz" <das@freebsd.org> Cc: freebsd-threads@freebsd.org Subject: Re: Threads regression tests (was: Re: ACE Proactor and libkse) Message-ID: <00ca01c34b76$b6a3ad30$f001a8c0@davidw2k> References: <Pine.GSO.4.10.10307160407570.12570-100000@pcnet5.pcnet.com>
index | next in thread | previous in thread | raw e-mail
----- Original Message -----
From: "Daniel Eischen" <eischen@vigrid.com>
To: "David Schultz" <das@freebsd.org>
Cc: "Craig Rodrigues" <rodrigc@crodrigues.org>; "David Xu" <davidxu@freebsd.org>; <freebsd-threads@freebsd.org>
Sent: Wednesday, July 16, 2003 4:22 PM
Subject: Re: Threads regression tests (was: Re: ACE Proactor and libkse)
> That's why lib{c_r|pthread|thr}/test/ exists.
>
> > #include <err.h>
> > #include <signal.h>
> > #include <stdlib.h>
> >
> > int main() {
> >
> > sigset_t mask;
> > int sig;
> >
> > sigemptyset(&mask);
> > sigaddset(&mask, SIGALRM);
> > if (sigprocmask(SIG_BLOCK, &mask, NULL) < 0)
> > err(1, "sigprocmask");
> >
> > if (raise(SIGALRM) < 0)
> > err(1, "raise");
> >
> > if (sigwait(&mask, &sig) < 0)
> > err(1, "sigwait");
> >
> > return (0);
> > }
>
> This seems to be kernel bug (if it is a bug). If you build
> it without linking any of the threads libraries it still
> exits the program without sigwait receiving the signal.
>
Yes, kern_sig.c's kern_sigtimedwait has bug, it shouldn't
terminate process. However libkse current relies on this bug,
unless I extend kse_thr_interrupt, fixing this bug would break
libkse. I have already worked out a patch for kse_thr_interrupt,
so when UTS receives a signal and finds that signal action is
SIG_DFL, it would call kse_thr_interrupt to terminate process
with signal, and possible core dumps itself.
Coming commit will fix libkse to not rely on this bug.
> --
> Dan Eischen
>
> _______________________________________________
> freebsd-threads@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-threads
> To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org"
>
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00ca01c34b76$b6a3ad30$f001a8c0>
