Eugene Grosbein
2007-Dec-07 07:49 UTC
qemu: freebsd6_mmap -1 errno 12 Cannot allocate memory
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
Boris Samorodov
2007-Dec-07 08:33 UTC
qemu: freebsd6_mmap -1 errno 12 Cannot allocate memory
On Fri, 7 Dec 2007 22:48:52 +0700 Eugene Grosbein wrote:> 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'How did you upgrade the OS? Did you use "make delete-old-libs"? Did you install compat-6x?> compiled in. However, qemu-0.8.2s.20061225_1 stopped to work,Seems to be a rather old qemu version...> 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.WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve
Kostik Belousov
2007-Dec-07 22:02 UTC
qemu: freebsd6_mmap -1 errno 12 Cannot allocate memory
On Sat, Dec 08, 2007 at 12:55:37PM +0700, Eugene Grosbein wrote:> On Sat, Dec 08, 2007 at 07:45:52AM +0200, Kostik Belousov wrote: > > > > But I do not see this: > > > > > > # ldd `which qemu` > > > /usr/local/bin/qemu: > > [skip] > > > > libpthread.so.2 => /lib/libpthread.so.2 (0x481f5000) > > RELENG_6 libpthread > > > libc.so.6 => /lib/libc.so.6 (0x4821c000) > > RELENG_6 libc > > [skip] > > > > libthr.so.3 => /lib/libthr.so.3 (0x48546000) > > RELENG_7 libpthread > > > libc.so.7 => /lib/libc.so.7 (0x48558000) > > RELENG_7 libc > > Thank you. Now I wonder, how such thing may happen > if qemu was built under 6.2 where there were no > libthr.so.3 and libc.so.7?Most likely, you have rebuilt some library that brough in the dependencies. Check with readelf -d (look for NEEDED tags). -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20071208/ef79b0a4/attachment.pgp