Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 May 1998 19:43:12 +1000
From:      Sue Blake <sue2@welearn.com.au>
To:        Sue Blake <sue@welearn.com.au>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Answer to: junk pointer, too low to make sense
Message-ID:  <19980503194311.10910@welearn.com.au>
In-Reply-To: <19980503135101.41667@welearn.com.au>; from Sue Blake on Sun, May 03, 1998 at 01:51:01PM %2B1000
References:  <19980502212231.18540@welearn.com.au> <85d8dw4s3l.fsf@localhost.zilker.net> <19980503135101.41667@welearn.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
If you're not a newbie, go ahead and laugh, I don't mind. It'd take you ten
minutes to work out what I've spent most of today on :-)

Since last July there have been questions about the message
   inetd in realloc(): warning: junk pointer, too low to make sense.
appearing to users who try to telnet, ftp, or rlogin to a FreeBSD machine.
It doesn't seem to occur with ssh. It may allow telnet to proceed, but it
prevents ftp. This has been reported for several versions from 2.2.1 to
2.2.5-STABLE.

Several people solved this by rebooting, but we didn't hear much from the
others. It seems easier to report problems than successes. Don't reboot.
All that is necessary is to kill and restart inetd.

Well, how to stop it happening again? For that we have to understand why.
If I'm right the short answer is to never, even once, let the machine run
out of swap (is that possible?), or wait until whatever is causing this is
fixed. Problem Report bin/5098 of last November seems to be describing the
problem. Don't ask me how I stumbled upon that one, I don't know! It just
appeared in lynx after a few hours of button-pushing :-)

Here's my idea of what's going on, which is sure to be a bit wrong but it's
enough to keep my newbie brain happy.

If swap ever fills up, inetd does naughty things with stuff called
"pointers" and "realloc()" and after that it just can't ever get back on the
rails again. Throw it all the memory you like and it'll just look at you
with a face like the one I had on this morning. The only thing you can do is
put the poor thing out of its misery. Rebooting works but is unnecessary.
Killing inetd and starting a new one is the way to go.

If you're like me and only ever use ssh, you might not notice this
condition. Even with ftp and telnet, it is not logged (that I can see) on
the FreeBSD system and only appears on the remote user's screen, probably
appearing to them as if it's coming from their own system, not the FreeBSD
machine.

I must run out of swap pretty often. How would I know? There's no little box
saying "Please close something NOW or I won't play any more!" I suspect that
inetd isn't the only thing that behaves strangely when you wring the life
out of a few megs of RAM, but it does seem to be particularly bad at
recovering.

Until I learn how to monitor this swap business, or some better way, my
solution will be to periodically attemtp to ftp from outside to check, and
then restart inetd if it starts pointing at nonsensical junk like realloc().

Phew. Now there will be something in the archives to search for.

-- 

Regards,
        -*Sue*-


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



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