From owner-freebsd-threads@FreeBSD.ORG Wed Jul 16 01:42:52 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6906E37B42F; Wed, 16 Jul 2003 01:42:50 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0366643FA3; Wed, 16 Jul 2003 01:42:50 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from davidw2k (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with SMTP id h6G8ggUp075350; Wed, 16 Jul 2003 01:42:45 -0700 (PDT) (envelope-from davidxu@freebsd.org) Message-ID: <00ca01c34b76$b6a3ad30$f001a8c0@davidw2k> From: "David Xu" To: , "David Schultz" References: Date: Wed, 16 Jul 2003 16:46:06 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 cc: Craig Rodrigues cc: freebsd-threads@freebsd.org Subject: Re: Threads regression tests (was: Re: ACE Proactor and libkse) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2003 08:42:52 -0000 ----- Original Message -----=20 From: "Daniel Eischen" To: "David Schultz" Cc: "Craig Rodrigues" ; "David Xu" = ; 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 > > #include > > #include > >=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" >