From owner-freebsd-bugs Fri Apr 30 10: 7: 4 1999 Delivered-To: freebsd-bugs@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 618) id DDB3015152; Fri, 30 Apr 1999 10:07:02 -0700 (PDT) To: sclawson@cs.utah.edu, wpaul@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG From: wpaul@FreeBSD.ORG Subject: Re: bin/10971 Message-Id: <19990430170702.DDB3015152@hub.freebsd.org> Date: Fri, 30 Apr 1999 10:07:02 -0700 (PDT) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Synopsis: ypserv segfaults regularly (really: Race condition in the Berkeley db library). State-Changed-From-To: open->closed State-Changed-By: wpaul State-Changed-When: Fri Apr 30 10:00:20 PDT 1999 State-Changed-Why: Okay, put _two_ 'stupid' stickers next to my name. The simplest solution for ypserv is just to call yp_flush_all() in ypproc_all_2_svc() right after the fork(). This closes all the DB handles in the child; yp_select_map() will re-open the correct one for the transfer later. This is another problem that I was never able to trip on my test machine. _However_ I'm really cheesed off at this one because I did run into it on another platform: I ported ypserv to IRIX at one point, though I used ndbm there instead of Berkeley DB. I traced down this exact problem and fixed it with this exact patch (I just checked the code) but I forgot about it, possibly thinking that Berkeley DB didn't suffer from the same limitation as ndbm. Bah. If anybody inconvenienved by this shows up in New York, track me down because I owe you an apology and a free meal. -Bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message