From owner-freebsd-stable Wed Jun 6 13:47:49 2001 Delivered-To: freebsd-stable@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id DB26E37B405 for ; Wed, 6 Jun 2001 13:47:43 -0700 (PDT) (envelope-from jdp@wall.polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.11.3/8.11.1) with ESMTP id f56Kla201041; Wed, 6 Jun 2001 13:47:36 -0700 (PDT) (envelope-from jdp@wall.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.11.3/8.11.0) id f56KlZB44913; Wed, 6 Jun 2001 13:47:35 -0700 (PDT) (envelope-from jdp) Date: Wed, 6 Jun 2001 13:47:35 -0700 (PDT) Message-Id: <200106062047.f56KlZB44913@vashon.polstra.com> To: stable@freebsd.org From: John Polstra Cc: ohartman@klima.physik.uni-mainz.de, andre.albsmeier@mchp.siemens.de Subject: Re: NIS/YP still broken! In-Reply-To: References: Organization: Polstra & Co., Seattle, WA Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article , Hartmann, O. wrote: > :>> > FreeBSD 4.3-STABLE has still a broken NIS/YP! If there are more than > :>> > one slave servers ypxfrd should spread its tables, push seems to > :>> > lock up and get a timeout. > :>> > > :>> > This was reported earlier here and I got a 'fix' for this but this fix > :>> > hasn't been merged in due it targets a sypmtome, not the cause itself. [...] > Well, this problem occurs on ALL systems running here and configured as > NIS/YP server and running the recent FreeBSD 4.3-STABLE. It should be > able to reproduce the problem! Offline I have been working with Andre Albsmeier on this problem. Andre gave me a detailed description of what he has discovered and observed, as well as a recipe for reproducing the bug. Unfortunately, the recipe didn't make the bug appear for me. I think it must fail only in Germany. :-) HOWEVER, based on what Andre told me, I inspected the relevant code in yppush_main.c. I am pretty sure I have found the bug. There is a struct sigaction on the stack which is not fully initialized; in particular, the sa_flags member is uninitialized. It contains whatever garbage was on the stack, and that garbage would be influenced by many things, including the actions of the dynamic linker. Furthermore, certain flag bits such as SA_RESETHAND, if set, would cause exactly the symptoms you guys have described. Please apply the patch below to "/usr/src/usr.sbin/yppush/yppush_main.c" and let me know if it fixes the problem. The patch is relative to -stable. Thanks, John Index: yppush_main.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/yppush/yppush_main.c,v retrieving revision 1.11 diff -u -r1.11 yppush_main.c --- yppush_main.c 1999/08/28 01:21:09 1.11 +++ yppush_main.c 2001/06/06 20:26:12 @@ -651,6 +651,7 @@ sigaddset(&sa.sa_mask, SIGALRM); sigaddset(&sa.sa_mask, SIGINT); sa.sa_handler = async_handler; + sa.sa_flags = 0; sigaction(SIGIO, &sa, NULL); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message