Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Apr 2001 20:06:29 -0400
From:      "David E. Cross" <crossd@cs.rpi.edu>
To:        freebsd-hackers@freebsd.org
Subject:   ypserv: a resolution (i think)
Message-ID:  <200104170006.UAA29563@cs.rpi.edu>

next in thread | raw e-mail | index | archive | help
After some more intensive debugging, and a leap of faith, I _think_ I have
the problem licked, but I would appreciate some more brains to examine the
logic. 

The original cause of ypserv's problems was the sharing of DBPs between 
the parent and child.  The resolution to this was to close all of them, in
the child.   This appears to be where the problem lies, it was assumed to
be safe to call the dbclose in the child... apparently dbclose does some
stuff that is still dangerous.  So, my solution is to move the close routine
_before_ the fork (so far *crossed fingers* this is working). However,
since yp_all is called fairly frequently, this is bad(TM) for the parent.
My second solution was to have the child call yp_init_dbs() instead
of yp_flush_all()  (the former would just nuke the references to the FDs, but
actually keep them open).  This didn't work.  Can anyone provide any clues
as to why?  Does the DB library keep its own cache, and unless they are
"really" closed it will just loop back to the open ones anyway?   The
current solution is suboptimal since for many cases it removes the DBCACHE
entirely, but I don't know what other solution exists.

I know some others who use ypserv heavily have run into these problems, if
you need the patch, I can provide it if you are willing to give it a test ;)

JKH:  I think this _really_ needs to get into 4.3-RELEASE, this has been 
a vexing bug for over a year.  The current solution may be sub-optimal, but
it is more optimal than:

pid 75351 (ypserv), uid 0: exited on signal 11 (core dumped)
pid 75364 (ypserv), uid 0: exited on signal 11 (core dumped)
pid 75365 (ypserv), uid 0: exited on signal 11 (core dumped)
pid 75370 (ypserv), uid 0: exited on signal 11 (core dumped)
pid 75377 (ypserv), uid 0: exited on signal 11 (core dumped)
pid 75379 (ypserv), uid 0: exited on signal 11 (core dumped)
pid 75215 (ypserv), uid 0: exited on signal 11 (core dumped)

;)

--
David Cross                               | email: crossd@cs.rpi.edu 
Lab Director                              | Rm: 308 Lally Hall
Rensselaer Polytechnic Institute,         | Ph: 518.276.2860            
Department of Computer Science            | Fax: 518.276.4033
I speak only for myself.                  | WinNT:Linux::Linux:FreeBSD

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104170006.UAA29563>