Date: Thu, 7 Nov 1996 19:42:25 -0500 (EST) From: Bill Paul <wpaul@skynet.ctr.columbia.edu> To: asami@FreeBSD.ORG (Satoshi Asami) Cc: current@FreeBSD.ORG Subject: Re: yp_next failure Message-ID: <199611080042.TAA07832@skynet.ctr.columbia.edu> In-Reply-To: <199611080029.QAA07049@vader.cs.berkeley.edu> from "Satoshi Asami" at Nov 7, 96 04:29:51 pm
next in thread | previous in thread | raw e-mail | index | archive | help
Of all the gin joints in all the towns in all the world, Satoshi Asami
had to walk into mine and say:
> I was wrong about the patch making no difference, it did indeed turn
> off the messages. (So instead of seeing "oh my gosh...yp_next isn't
> feeling well...segmentation fault", it's simply seg faults.)
Hm. I think I may have missed a message in here somewhere. Haven't
received anything from the -current mailing list since early this
afternoon. (Freefall is reachable though. Anyway.)
> By the way, I recompiled sendmail with -g and this is what I got.
This is what I wanted to do myself, but I can't reach your machine
from here. :)
[chop]
> Program received signal SIGSEGV, Segmentation fault.
> 0x2008f036 in _yp_dobind (dom=0x200c88b0 "mammoth", ypdb=0xefbf9e60)
> at /a/src/lib/libc/yp/yplib.c:269
> 269 clnt_destroy(ysd->dom_client);
> (gdb) p ysd
> $1 = (struct dom_binding *) 0x5c000
> (gdb) p *ysd
> $2 = {dom_pnext = 0x0, dom_domain = "mammoth", '\000' <repeats 57 times>,
> dom_server_addr = {sin_len = 16 '\020', sin_family = 2 '\002',
> sin_port = 6659, sin_addr = {s_addr = 421929088},
> sin_zero = "\000\000\000\000\000\000\000"}, dom_server_port = 6659,
> dom_socket = -1, dom_client = 0x0, dom_local_port = 14083, dom_vers = -1}
> -------
>
> Since clnt_destroy is a macro that takes a pointer and deferences it,
> I guess that's the problem.
Ah. Hurm. Now I have to take a close look at this and see how dom_client
got to be NULL in the first place. I thought I'd covered all the cases
where this could happen.
> -------
> sock = ysd->dom_socket;
> save = dup(ysd->dom_socket);
> if (ysd->dom_client)
> clnt_destroy(ysd->dom_client);
> ysd->dom_vers = 0;
> ysd->dom_client = NULL;
> sock = dup2(save, sock);
> -------
>
> (hey, stop laughing).
I'm not laughing; I'm positively ecstatic. :)
> Now things seem to have "calmed down", at least
> sendmail/ssh/from/mailq don't seg fault any more. I'll have to beat
> on it a little more, I'm now going to reboot the machine with the new
> libc and see how it goes.
Okay, I'm going to see if I can figure out what puts _yp_dobind()
into this state. I'll try to get something into the tree tonight.
I don't think FreeBSD 2.1.x is vulnerable to this but I'll take
a peek there too.
Thanks for the debugging effort.
-Bill
--
=============================================================================
-Bill Paul (212) 854-6020 | System Manager, Master of Unix-Fu
Work: wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home: wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
"If you're ever in trouble, go to the CTR. Ask for Bill. He will help you."
=============================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611080042.TAA07832>
