Date: 15 Nov 1995 02:12:40 +0800 From: peter@haywire.dialix.com (Peter Wemm) To: freebsd-current@freebsd.org Subject: Re: kern_sysctl.c Message-ID: <48am6o$7eb$1@haywire.DIALix.COM> References: <199511141423.BAA15830@asstdc.scgt.oz.au>
next in thread | previous in thread | raw e-mail | index | archive | help
imb@scgt.oz.au (michael butler) writes: >The recent changes to kern_sysctl.c appear to have broken (at least) mountd, >mount_nfs, rwhod and gated. The last two fail on reboot with a warning >message: "gethostname: Cannot allocate memory". gated, mountd and mount_nfs >also core dump into the root directory :-( > michael The following will fix it completely: Index: kern_sysctl.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_sysctl.c,v retrieving revision 1.49 diff -c -r1.49 kern_sysctl.c *** kern_sysctl.c 1995/11/14 09:42:22 1.49 --- kern_sysctl.c 1995/11/14 15:59:14 *************** *** 293,301 **** --- 293,303 ---- { int error=0; + #if 0 if (arg2) error = SYSCTL_OUT(req, arg1, arg2); else + #endif error = SYSCTL_OUT(req, arg1, strlen((char *)arg1)+1); if (error || !req->newptr || !arg2) Also, beware that mountd's parent (after forking the child into daemon mode) will still core dump after applying this fix. You need to manually kill the mountd child and start it by hand. It'll work from bootup quite happily then. I have not investigated why this is the case, I suspect that mountd is corrupting it's state file when gethostname() is failing, causing it to crash next time, even after the kernel bug is fixed. -Peter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48am6o$7eb$1>