Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Dec 1998 16:00:25 -0400
From:      Luis =?iso-8859-1?Q?Mu=F1oz?= <lem@cantv.net>
To:        spork <spork@super-g.com>, Kaleb Keithley <kaleb@ics.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: inetd in realloc(): warning: junk pointer, too low to make sense.
Message-ID:  <3.0.6.32.19981221160025.008547d0@pop.cantv.net>
In-Reply-To: <Pine.BSF.4.00.9812211359220.892-100000@super-g.inch.com>
References:  <199812191330.IAA26067@sunoco>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.6.32.19981221160025.008547d0>