From owner-freebsd-stable Thu Jan 10 20:58:47 2002 Delivered-To: freebsd-stable@freebsd.org Received: from ns.itga.com.au (ns.itga.com.au [202.53.40.210]) by hub.freebsd.org (Postfix) with ESMTP id 04D0E37B402 for ; Thu, 10 Jan 2002 20:58:44 -0800 (PST) Received: from lightning.itga.com.au (lightning.itga.com.au [192.168.71.20]) by ns.itga.com.au (8.9.3/8.9.3) with ESMTP id PAA04406 for ; Fri, 11 Jan 2002 15:58:42 +1100 (EST) (envelope-from gnb@itga.com.au) Received: from lightning.itga.com.au (localhost [127.0.0.1]) by lightning.itga.com.au (8.9.3/8.9.3) with ESMTP id PAA26736; Fri, 11 Jan 2002 15:58:42 +1100 (EST) Message-Id: <200201110458.PAA26736@lightning.itga.com.au> X-Mailer: exmh version 2.4 05/15/2001 with nmh-1.0.4 From: Gregory Bond To: stable@FreeBSD.ORG Subject: Re: stunnel fails to run after upgrade to 4.5-PRERELEASE #6 In-reply-to: Your message of Thu, 10 Jan 2002 22:22:50 -0500. Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 11 Jan 2002 15:58:42 +1100 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > 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