Skip site navigation (1)Skip section navigation (2)
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>

next in thread | previous in thread | raw e-mail | index | archive | help

----- Original Message -----=20
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.
>=20
> > #include <err.h>
> > #include <signal.h>
> > #include <stdlib.h>
> >=20
> > int main() {
> >=20
> > sigset_t mask;
> > int sig;
> >=20
> > sigemptyset(&mask);
> > sigaddset(&mask, SIGALRM);
> > if (sigprocmask(SIG_BLOCK, &mask, NULL) < 0)
> > err(1, "sigprocmask");
> >=20
> > if (raise(SIGALRM) < 0)
> > err(1, "raise");
> >=20
> > if (sigwait(&mask, &sig) < 0)
> > err(1, "sigwait");
> >        =20
> > return (0);
> > }
>=20
> 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.
>=20

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.

> --=20
> Dan Eischen
>=20
> _______________________________________________
> 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"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00ca01c34b76$b6a3ad30$f001a8c0>