Date: Sun, 08 Nov 1998 17:07:12 +0100 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: dg@root.com Cc: Eivind Eklund <eivind@yes.no>, John Fieber <jfieber@indiana.edu>, current@FreeBSD.ORG Subject: Re: The infamous dying daemons bug Message-ID: <16650.910541232@critter.freebsd.dk> In-Reply-To: Your message of "Sun, 08 Nov 1998 07:17:11 PST." <199811081517.HAA03267@root.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <199811081517.HAA03267@root.com>, David Greenman writes: >>On Sun, Nov 08, 1998 at 09:22:50AM -0500, John Fieber wrote: >>> One question: Is the problem "sticky"? By that I mean, if it is >>> triggered by a memomry shortage, is something in the kernel >>> corrupted that tends to kill/corrupt daemons from that point in >>> time on, or is it just something that affects isolated processes. >> >>All daemons running at that point seems to get something corrupted. >>If you restart the daemon, it won't happen again until you again run >>out of memory (or whatever it is that trigger the corruption). > > brk(2) will fail and return ENOMEM if the system is low on swap space. If >the application (phk malloc or the caller of malloc?) isn't prepared for this, >it may end up with a NULL pointer that it doesn't expect - perhaps not even >tripping over it until sometime later. This would be (semi-)easy to check for: ln -s A /etc/malloc.conf will make malloc call abort() rather than return a NULL pointer. Trouble is that fd#2 from daemons isn't always available for barfing into for malloc [*] Poul-Henning [*] I've often wished that we had a syslog(2), ie system call, which didn't require you to go through all the open/bind/send/ gyrations. Come to think of it, I son't see any reason apart from the ideological aspect for not having that. It would improve the reliability and security of syslog a fair bit. -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." "ttyv0" -- What UNIX calls a $20K state-of-the-art, 3D, hi-res color terminal To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16650.910541232>