From owner-freebsd-hackers Mon Dec 21 12:00:48 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA14451 for freebsd-hackers-outgoing; Mon, 21 Dec 1998 12:00:48 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from rs1s2.datacenter.cha.cantv.net (rs1s2.datacenter.cha.cantv.net [200.44.32.51]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA14446 for ; Mon, 21 Dec 1998 12:00:45 -0800 (PST) (envelope-from lem@cantv.net) Received: from lg (tc1r9-117.ras.cha.cantv.net [200.44.7.117]) by rs1s2.datacenter.cha.cantv.net (8.9.1a/8.9.1/1.0) with SMTP id QAA22655; Mon, 21 Dec 1998 16:00:34 -0400 (VET) Message-Id: <3.0.6.32.19981221160025.008547d0@pop.cantv.net> X-Sender: lem@pop.cantv.net X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Mon, 21 Dec 1998 16:00:25 -0400 To: spork , Kaleb Keithley From: Luis =?iso-8859-1?Q?Mu=F1oz?= Subject: Re: inetd in realloc(): warning: junk pointer, too low to make sense. Cc: hackers@FreeBSD.ORG In-Reply-To: References: <199812191330.IAA26067@sunoco> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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