From owner-freebsd-current Sun Nov 8 08:11:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA23733 for freebsd-current-outgoing; Sun, 8 Nov 1998 08:11:03 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA23719 for ; Sun, 8 Nov 1998 08:10:58 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.1/8.8.5) with ESMTP id RAA16652; Sun, 8 Nov 1998 17:07:12 +0100 (CET) To: dg@root.com cc: Eivind Eklund , John Fieber , current@FreeBSD.ORG Subject: Re: The infamous dying daemons bug In-reply-to: Your message of "Sun, 08 Nov 1998 07:17:11 PST." <199811081517.HAA03267@root.com> Date: Sun, 08 Nov 1998 17:07:12 +0100 Message-ID: <16650.910541232@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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