Subject: Re: -current, mmaps, and clisp
To: David Howland <dhowland@users.sourceforge.net>
From: Arnaud Degroote <degroote@netbsd.org>
List: tech-kern
Date: 11/25/2007 01:54:01
On Sat, Nov 24, 2007 at 07:26:42PM -0500, David Howland wrote:
> I was running 4.99.19 for quite some time and I was happy.  I decided to 
> run a more recent kernel and have run into a problem.
> 
> clisp, which I use for pkgmanager, refuses to run with the new kernel. 
> I have tried 4.99.36 and 4.99.37.
> 
> It has some kind of problems mapping memory, so it seems.
> 
> Here is a snipped of the problem taken from the clisp build process:
> ================
> cd trampoline_r; /usr/bin/make all
> ./lisp.run -B . -N locale -E 1:1 -Efile UTF-8 -Eterminal UTF-8 -norc -m 
> 1800KW -x "(and (load \"init.lisp\") (sys::%saveinitmem) (ext::exit)) 
> (ext::exit t)"
> Cannot map memory to address 0xc958d000 .
> [spvw_mmap.d:359] errno = EFBIG: File too large.
> Trying to make room through a GC...
> Cannot map memory to address 0xc958d000 .
> [spvw_mmap.d:359] errno = EFBIG: File too large.
> Trying to make room through a GC...
> ================
> and so on for many hundreds of lines.
> 
> It was fine with the old system.
> 
> # uname -a
> NetBSD micron 4.99.37 NetBSD 4.99.37 (GENERIC) #35: Sat Nov 24 10:08:19 
> EST 2007  root@micron:/usr/obj/sys/arch/i386/compile/GENERIC i386
> 
> I was hoping someone would recognize the problem off hand.  My kernel 
> hacking kung-fu is weak.
> 
> -d

I have experimented the same issue but it is not kernel related. It is
due to the use of jemalloc in current instead of the old malloc
implementation. Clisp seems to do some evil assumption about what malloc
does.

There is two workaround possible. Rebuild libc using USE_JEMALLOC=NO or
use the good configure flag for clisp ( --with-gmalloc ). The clisp
package has been updated to use this flag so I think that if you rebuild
clisp, everything will be fine.

-- 
Arnaud Degroote
degroote@netbsd.org