NetBSD Problem Report #46565

From  Fri Jun  8 16:48:05 2012
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 106DB63B89C
	for <>; Fri,  8 Jun 2012 16:48:05 +0000 (UTC)
Message-Id: <>
Date: Fri,  8 Jun 2012 16:48:04 +0000 (UTC)
Subject: emulators/qemu (qemu-1.1.0) dumps core on NetBSD-5.1_STABLE/i386
X-Send-Pr-Version: www-1.0

>Number:         46565
>Category:       pkg
>Synopsis:       emulators/qemu (qemu-1.1.0) dumps core on NetBSD-5.1_STABLE/i386
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 08 16:50:01 +0000 2012
>Last-Modified:  Thu Jun 13 01:15:00 +0000 2013
>Originator:     John D. Baker
>Release:        NetBSD-5.1_STABLE/i386, pkgsrc-2012Q1 (w/some updated to -HEAD)
NetBSD slate.technoskunk.fur 5.1_STABLE NetBSD 5.1_STABLE (SLATE) #2: Sun Jun  3 21:44:59 CDT 2012  sysop@slate.technoskunk.fur:/d0/build/netbsd-5/obj/i386/sys/arch/i386/compile/SLATE i386

Following the update of emulators/qemu to 1.1.0 (shadowing wip/qemu),
I updated that package to -HEAD in my pkgsrc tree (is otherwise -2012Q1)
and built.

Attempting to run:

  $ qemu-system-i386 -cdrom /d0/build/netbsd-5/REL/iso/i386cd.iso wd0

Resulted in:

  Memory fault (core dumped)

Loading everything into gdb reveals:

Core was generated by `qemu-system-i386'.
Program terminated with signal 11, Segmentation fault.
#0  0xbba898dc in pthread_curcpu_np () from /usr/lib/
(gdb) bt
#0  0xbba898dc in pthread_curcpu_np () from /usr/lib/
#1  0xbb8f7478 in posix_memalign () from /usr/lib/
#2  0xbb8f7a83 in malloc () from /usr/lib/
#3  0xbbb56e29 in g_mem_set_vtable () from /usr/pkg/lib/
#4  0xbbb57242 in g_malloc0 () from /usr/pkg/lib/
#5  0x080945ce in ?? ()
#6  0x00000054 in ?? ()
#7  0x00000000 in ?? ()

The same result is had from 'qemu-system-sparc'.  I haven't tried any
other targets.
Update emulators/qemu to -HEAD.  Build and install on
NetBSD-5.1_STABLE/i386 (other host arches? other sub-branches of

(Was last observed to build and run fine on NetBSD-6.0_BETA2/i386.)

From: Peter Bex <>
Subject: Re: pkg/46565
Date: Thu, 14 Jun 2012 22:21:10 +0200

 Just an additional data point, it also segfaults on a NetBSD/amd64 6.0_BETA
 kernel with 5.1 userland.  The trace below happens when trying to load an
 Anyboot image with qemu-i386 (though I think I used it wrong; the working
 version just gives an error message):

 Program received signal SIGSEGV, Segmentation fault.
 0x00007f7ff666ac1a in __sigtimedwait () from /usr/lib/
 (gdb) bt
 #0  0x00007f7ff666ac1a in __sigtimedwait () from /usr/lib/
 #1  0x00007f7ff663580d in sigtimedwait () from /usr/lib/
 #2  0x00007f7ff7006365 in sigtimedwait () from /usr/lib/
 #3  0x00007f7ff66357a3 in sigwait () from /usr/lib/
 #4  0x000000000044ad23 in ?? ()
 #5  0x00007f7ff700bd92 in pthread_setcancelstate () from /usr/lib/
 #6  0x00007f7ff66545b0 in swapcontext () from /usr/lib/
 Cannot access memory at address 0x7f7ff0000000

 I talked to ASau on IRC and he mentioned it also crashed for him on
 NetBSD/i386 6.0_BETA

 As a workaround, he suggested using emulators/qemu0

From: Andreas Gustafsson <>
Subject: Re: pkg/46565: emulators/qemu (qemu-1.1.0) dumps core on NetBSD-5.1_STABLE/i386
Date: Thu, 27 Sep 2012 15:59:38 +0300

 To offer a couple of additional data points, the problem is also
 present in qemu 1.2.0nb1 on NetBSD 5.1_STABLE/amd64.  It does not
 affect qemu 1.2.0nb1 on NetBSD 6.0_RC2/amd64, nor qemu-0.15.1nb5 on
 NetBSD 5.1_STABLE/amd64.
 Andreas Gustafsson,

From: Nat Sloss <>
Subject: Re: pkg/46565
Date: Thu, 13 Jun 2013 10:47:15 +1000


 I have been using qemu 1.1.1 on NetBSD 5.0.1 for at least nine months and have 
 just recently built and tested qemu 1.3.1 from pkgsrc and it works as long as 
 you change the coroutine backend from ucontext which does not work on 

 So to get the package to work add 
 CONFIGURE_ARGS+=        --with-coroutine=gthread

 to the package Makefile.



NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.