qemu: freebsd6_mmap -1 errno 12 Cannot allocate memory

Eugene Grosbein eugen at grosbein.pp.ru
Fri Dec 7 07:49:07 PST 2007


Hi!

There is FreeBSD box that was 6.2-STABLE before, now it became
7.0-BETA3 via source upgrade. The kernel has 'options COMPAT_FREEBSD6'
compiled in. However, qemu-0.8.2s.20061225_1 stopped to work,
it dumps core when started with an error:

Fatal error 'Cannot allocate red zone for initial thread' at line 384 in
file /usr/local/obj/src/lib/libthr/thread/thr_init.c (errno = 12)

ktrace shows that freebsd6_mmap() syscall fails:

 22114 qemu     CALL freebsd6_mmap(0xbf9ff000,0x1000,PROT_NONE,MAP_ANON,0xffffffff,0,0,0)
 22114 qemu     RET  freebsd6_mmap -1 errno 12 Cannot allocate memory

Is it a bug in kernel's COMPAT_FREEBSD6 feature?

Rebuilding of qemu requires downloading and building of gcc-3.4
that's what I would avoid to do. 

Eugene Grosbein


More information about the freebsd-stable mailing list