Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jan 2002 15:58:42 +1100
From:      Gregory Bond <gnb@itga.com.au>
To:        stable@FreeBSD.ORG
Subject:   Re: stunnel fails to run after upgrade to 4.5-PRERELEASE #6 
Message-ID:  <200201110458.PAA26736@lightning.itga.com.au>
In-Reply-To: Your message of Thu, 10 Jan 2002 22:22:50 -0500.

next in thread | raw e-mail | index | archive | help
>  58589 stunnel  CALL  mmap(0xbfade000,0x10000,0x3,0x400,0xffffffff,0,0,0)
>  58589 stunnel  RET   mmap -1 errno 12 Cannot allocate memory

This looks like something is trying to force the use of a particular virtual 
address (0xbfade000) and the kernel is refusing (ENOMEM, errno 12), probably 
because the requested address is in use (see mmap(2)).

It is in general a bad idea to use a non-nil address. It is not surprising that
the list of available spaces changes when the kernel updates.

However, stunnel doesn't call mmap at all.  Futzing around with link options
and nm shows that the mmap is called from libc_r::malloc().  But looking at the
source code to malloc.c, it only ever calls mmap with 0 as the first argument.

So I cannot for the life of me work out what this ktrace is telling us.

Here Be Dragons and I retire gracefully and let someone more experienced than 
me have a hack at it.

Aside:  The mmap(2) man page has fewer args than shown above in the ktrace()
output.  What is the difference and where would I look to find this out?  
sys/vm/vm_mmap.c is remarkably devoid of "#ifdef KTRACE" lines....

Greg,
wannabe kernel hacker.





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




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