From owner-freebsd-hackers Mon Dec 21 12:09:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA16139 for freebsd-hackers-outgoing; Mon, 21 Dec 1998 12:09:33 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from super-g.inch.com (super-g.com [207.240.140.161]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA15994 for ; Mon, 21 Dec 1998 12:09:29 -0800 (PST) (envelope-from spork@super-g.com) Received: from localhost (localhost [127.0.0.1]) by super-g.inch.com (8.8.8/8.8.5) with SMTP id PAA22109; Mon, 21 Dec 1998 15:08:52 -0500 (EST) Date: Mon, 21 Dec 1998 15:08:52 -0500 (EST) From: spork X-Sender: spork@super-g.inch.com To: Luis =?iso-8859-1?Q?Mu=F1oz?= cc: Kaleb Keithley , hackers@FreeBSD.ORG Subject: Re: inetd in realloc(): warning: junk pointer, too low to make sense. In-Reply-To: <3.0.6.32.19981221160025.008547d0@pop.cantv.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by hub.freebsd.org id MAA16134 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Well, here's what sendmail does here, it's pretty scary, with those truncated messages about spwd.db: Dec 17 15:42:27 super-g Dec 17 15:42:27sendmail[: NOQUEUE Dec 17 15:51:11 super-g Dec 17 15:51:11sendmail[: /etc/spwd.db Dec 17 15:51:11 super-g sendmail[16594]: NOQUEUE: SYSERR(root): Out of memory!!: Cannot allocate memory Dec 17 16:30:01 super-g Dec 17 16:30:00sendmail[: /etc/spwd.db Dec 17 16:30:16 super-g /kernel: pid 20618 (sendmail), uid 0: exited on signal 11 Dec 17 16:30:57 super-g Dec 17 16:30:57sendmail[: /etc/spwd.db Dec 17 16:30:57 super-g Dec 17 16:30:57sendmail[: NOQUEUE Dec 17 16:30:57 super-g Dec 17 16:30:57sendmail[: /etc/spwd.db Charles --- Charles Sprickman spork@super-g.com On Mon, 21 Dec 1998, Luis [iso-8859-1] Muņoz wrote: > At 02:00 PM 21/12/98 -0500, spork wrote: > >FWIW, on a 2.2-stable snap, I started getting this soon after installing > >KDE. In other words, I was running dangerously low on swap... Dumping > >128M in the machine fixed the problem. Is this really anything besides a > >rather confusing way of inetd saying "can't allocate memory"? > > I've seen a very similar behavior in sendmail after applying some > perl related patches. I believe this code is actually in the > libraries and not in inetd. A free() or realloc() when fed with > a wrong pointer would output this message to STDERR, which in inetd > is already pointed to the socket assigned to the process to be fork()'ed. > > Killing and restarting inetd fixes this in a 2.2.x machine, but will > eventually reappear. It definitely is related to vm (not enough vm I > mean). > > Look... > > bash-2.01# pwd > /usr/src/lib/libc > bash-2.01# egrep 'too high' */*.c > stdlib/malloc.c: wrtwarning("junk pointer, too high to make sense.\n"); > stdlib/malloc.c: wrtwarning("junk pointer, too high to make sense.\n"); > bash-2.01# egrep 'too low' */*.c > stdlib/malloc.c: wrtwarning("junk pointer, too low to make sense.\n"); > stdlib/malloc.c: wrtwarning("junk pointer, too low to make sense.\n"); > > and in stdlib/malloc.c... > > static void > wrtwarning(char *p) > { > char *q = " warning: "; > if (malloc_abort) > wrterror(p); > write(STDERR_FILENO, __progname, strlen(__progname)); > write(STDERR_FILENO, malloc_func, strlen(malloc_func)); > write(STDERR_FILENO, q, strlen(q)); > write(STDERR_FILENO, p, strlen(p)); > } > > It would be easy to stop this error, perhaps by some malloc() > option or via an additional call (or even commenting or > selective compilation of this function). > > Hope this helps. > > -lem > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message