NetBSD Problem Report #46565

From www@NetBSD.org  Fri Jun  8 16:48:05 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 106DB63B89C
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  8 Jun 2012 16:48:05 +0000 (UTC)
Message-Id: <20120608164804.2211A63B882@www.NetBSD.org>
Date: Fri,  8 Jun 2012 16:48:04 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@NetBSD.org
Subject: emulators/qemu (qemu-1.1.0) dumps core on NetBSD-5.1_STABLE/i386
X-Send-Pr-Version: www-1.0

>Number:         46565
>Notify-List:    gson@gson.org
>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
>Closed-Date:    
>Last-Modified:  Sat Jan 17 14:25:09 +0000 2015
>Originator:     John D. Baker
>Release:        NetBSD-5.1_STABLE/i386, pkgsrc-2012Q1 (w/some updated to -HEAD)
>Organization:
>Environment:
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

>Description:
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/libpthread.so.0
(gdb) bt
#0  0xbba898dc in pthread_curcpu_np () from /usr/lib/libpthread.so.0
#1  0xbb8f7478 in posix_memalign () from /usr/lib/libc.so.12
#2  0xbb8f7a83 in malloc () from /usr/lib/libc.so.12
#3  0xbbb56e29 in g_mem_set_vtable () from /usr/pkg/lib/libglib-2.0.so.0
#4  0xbbb57242 in g_malloc0 () from /usr/pkg/lib/libglib-2.0.so.0
#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.
>How-To-Repeat:
Update emulators/qemu to -HEAD.  Build and install on
NetBSD-5.1_STABLE/i386 (other host arches? other sub-branches of
netbsd-5?).

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

>Release-Note:

>Audit-Trail:
From: Peter Bex <Peter.Bex@xs4all.nl>
To: gnats-bugs@netbsd.org
Cc: 
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/libc.so.12
 (gdb) bt
 #0  0x00007f7ff666ac1a in __sigtimedwait () from /usr/lib/libc.so.12
 #1  0x00007f7ff663580d in sigtimedwait () from /usr/lib/libc.so.12
 #2  0x00007f7ff7006365 in sigtimedwait () from /usr/lib/libpthread.so.0
 #3  0x00007f7ff66357a3 in sigwait () from /usr/lib/libc.so.12
 #4  0x000000000044ad23 in ?? ()
 #5  0x00007f7ff700bd92 in pthread_setcancelstate () from /usr/lib/libpthread.so.0
 #6  0x00007f7ff66545b0 in swapcontext () from /usr/lib/libc.so.12
 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 <gson@gson.org>
To: gnats-bugs@netbsd.org
Cc: 
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, gson@gson.org

From: Nat Sloss <nathanialsloss@yahoo.com.au>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/46565
Date: Thu, 13 Jun 2013 10:47:15 +1000

 Hi.

 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 
 NetBSD-5.

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

 to the package Makefile.

 Regards,

 Nat.

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 27 Dec 2014 03:16:35 +0000
State-Changed-Why:
My understanding is that this is fixed upstream now - at least, I've been
using pkgsrc qemu (and not qemu0) for at least some months now and it's been
working fine.

Are you still having problems?


From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/46565 (emulators/qemu (qemu-1.1.0) dumps core on
 NetBSD-5.1_STABLE/i386)
Date: Sat, 27 Dec 2014 15:50:38 -0600 (CST)

 On Sat, 27 Dec 2014, dholland@NetBSD.org wrote:

 > Synopsis: emulators/qemu (qemu-1.1.0) dumps core on NetBSD-5.1_STABLE/i386
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: dholland@NetBSD.org
 > State-Changed-When: Sat, 27 Dec 2014 03:16:35 +0000
 > State-Changed-Why:
 > My understanding is that this is fixed upstream now - at least, I've been
 > using pkgsrc qemu (and not qemu0) for at least some months now and it's been
 > working fine.
 > 
 > Are you still having problems?

 I no-longer have any netbsd-5 systems operating so I do not know if a
 problem remains.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 27 Dec 2014 22:43:04 +0000
State-Changed-Why:
Submitter can't test; anyone have a -5 box on hand to try with?


>Unformatted:

NetBSD Home
NetBSD PR Database Search

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