NetBSD Problem Report #50554

From www@NetBSD.org  Tue Dec 15 01:37:06 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.NetBSD.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C14917ACAA
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 15 Dec 2015 01:37:06 +0000 (UTC)
Message-Id: <20151215013705.80B0F7ACB8@mollari.NetBSD.org>
Date: Tue, 15 Dec 2015 01:37:05 +0000 (UTC)
From: jpb@jimby.name
Reply-To: jpb@jimby.name
To: gnats-bugs@NetBSD.org
Subject: panic on install with qemu 2.4.0  (amd64 install)
X-Send-Pr-Version: www-1.0

>Number:         50554
>Category:       install
>Synopsis:       panic on install with qemu 2.4.0  (amd64 install)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 15 01:40:00 +0000 2015
>Last-Modified:  Thu Dec 17 13:35:01 +0000 2015
>Originator:     Jim B.
>Release:        NetBSD 7.0 RELEASE
>Organization:
BSD Certification Group
>Environment:
NetBSD 7.0 NetBSD 7.0 (GENERIC.201509250726Z) amd64
>Description:

Panic on NetBSD 7.0 install using option 3 (no SMP, no ACPI)
qemu-system-x86_64  (details below)

db{0} bt
memcpy() at netbsd:memcpy+0x14
ld_virtio_start() at netbsd:ld_virtio_start+0x14b
ldstart() at netbsd:ldstart+0x6b
ldstrategy() at netbsd:ldstrategy+0x101
bdev_strategy() at netbsd:bdev_strategy+0x5b
spec_strategy() at netbsd:spec_strategy+0x2c
VOP_STRATEGY() at netbsd:VOP_STRATEGY+0x33
bwrite() at netbsd:bwrite+0x16f
VOP_BWRITE at netbsd:VOP_BWRITE+0x30
ffs_nodealloccg() at netbsd:ffs_nodealloccg+0x5c4
ffs_hashalloc() at netbsd:ffs_hashalloc+0x2b
ffs_valloc() at netbsd:ffs_valloc+0x108
ufs_makeinode() at netbsd:ufs_makeinode+0x5e
ufs_create() at netbsd:ufs_create+0x5b
VOP_CREATE() at netbsd:VOP_CREATE+0x38
vn_open() at netbsd:vn_open+0x330
do_open() at netbsd:do_open+0x111
do_sys_openat() at netbsd:do_sys_openat+0x68
sys_open() at netbsd:sys_open+0x24
syscall() at netbsd:syscall+0x9a
--- syscall (number 5) ---
7f7ff703c40a:
db{0}>
-------------

qemu-img command line:

qemu-img create -f raw -o size=15G,preallocation=full  nbsd_QA_hda.img
-------------


QEMU command line  (run under sudo)

#!/bin/sh
/usr/local/bin/qemu-system-x86_64 -monitor none \
  -cpu Broadwell \
  -vga cirrus \
  -m 4096      \
  -localtime \
  -cdrom /usr/home/jpb/ISO/NBSD/7.0/NetBSD-7.0-amd64.iso \
  -boot order=cd,menu=on \
  -drive if=none,id=drive0,cache=none,aio=native,format=raw,file=/usr/home/jpb/VM.OFF/nbsd_QA_hda.img \
  -device virtio-blk,drive=drive0  \
  -net nic,vlan=0,macaddr=00:d4:3b:55:00:32 \
  -net tap,script=no,ifname=tap8,downscript=no -name "nbsd_QA"

----------

hardware is a Lenovo T530 with 16G ram
>How-To-Repeat:

install from .iso as shown above
>Fix:
A workaround was noted on #netbsd - use less memory.  Apprently the panic happens on a buffer copy.

By changing my qemu memory parameter to 

  -m 1024

I was able to avoid the panic and boot the system.

>Audit-Trail:
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, install-manager@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: 
Subject: Re: install/50554: panic on install with qemu 2.4.0  (amd64 install)
Date: Mon, 14 Dec 2015 21:35:07 -0500

 On Dec 15,  1:40am, jpb@jimby.name (jpb@jimby.name) wrote:
 -- Subject: install/50554: panic on install with qemu 2.4.0  (amd64 install)

 | qemu-img command line:
 |  
 | qemu-img create -f raw -o size=15G,preallocation=full  nbsd_QA_hda.img
 | -------------
 |  
 |  
 | QEMU command line  (run under sudo)
 |  
 | #!/bin/sh
 | /usr/local/bin/qemu-system-x86_64 -monitor none \
 |   -cpu Broadwell \
 |   -vga cirrus \
 |   -m 4096      \
 |   -localtime \
 |   -cdrom /usr/home/jpb/ISO/NBSD/7.0/NetBSD-7.0-amd64.iso \
 |   -boot order=cd,menu=on \
 |   -drive if=none,id=drive0,cache=none,aio=native,format=raw,file=/usr/home/jpb/VM.OFF/nbsd_QA_hda.img \
 |   -device virtio-blk,drive=drive0  \
 |   -net nic,vlan=0,macaddr=00:d4:3b:55:00:32 \
 |   -net tap,script=no,ifname=tap8,downscript=no -name "nbsd_QA"
 |  
 | ----------
 |  
 | hardware is a Lenovo T530 with 16G ram
 | >How-To-Repeat:
 | 
 | install from .iso as shown above
 | >Fix:
 | A workaround was noted on #netbsd - use less memory.  Apprently the panic happens on a buffer copy.
 | 
 | By changing my qemu memory parameter to 
 | 
 |   -m 1024

 Yes, this has to do with bounce buffer handling which is broken in -7.
 It is supposed to be fixed with this pullup:

 https://releng.netbsd.org/cgi-bin/req-7.cgi?show=1011

 What does: "ident /netbsd | grep bus_dma" say? Do you have the updated
 version?

 christos

From: "Jim B." <jpb@jimby.name>
To: gnats-bugs@NetBSD.org
Cc: install-manager@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: install/50554: panic on install with qemu 2.4.0  (amd64 install)
Date: Wed, 16 Dec 2015 22:20:09 -0500

 * Christos Zoulas <christos@zoulas.com> [2015-12-14 21:40]:
 > The following reply was made to PR install/50554; it has been noted by GNATS.
 > 
 > From: christos@zoulas.com (Christos Zoulas)
 > To: gnats-bugs@NetBSD.org, install-manager@netbsd.org, 
 > 	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
 > Cc: 
 > Subject: Re: install/50554: panic on install with qemu 2.4.0  (amd64 install)
 > Date: Mon, 14 Dec 2015 21:35:07 -0500
 > 
 >  On Dec 15,  1:40am, jpb@jimby.name (jpb@jimby.name) wrote:
 >  -- Subject: install/50554: panic on install with qemu 2.4.0  (amd64 install)
 >  
 >  | qemu-img command line:
 >  |  
 >  | qemu-img create -f raw -o size=15G,preallocation=full  nbsd_QA_hda.img
 >  | -------------
 >  |  
 >  |  
 >  | QEMU command line  (run under sudo)
 >  |  
 >  | #!/bin/sh
 >  | /usr/local/bin/qemu-system-x86_64 -monitor none \
 >  |   -cpu Broadwell \
 >  |   -vga cirrus \
 >  |   -m 4096      \
 >  |   -localtime \
 >  |   -cdrom /usr/home/jpb/ISO/NBSD/7.0/NetBSD-7.0-amd64.iso \
 >  |   -boot order=cd,menu=on \
 >  |   -drive if=none,id=drive0,cache=none,aio=native,format=raw,file=/usr/home/jpb/VM.OFF/nbsd_QA_hda.img \
 >  |   -device virtio-blk,drive=drive0  \
 >  |   -net nic,vlan=0,macaddr=00:d4:3b:55:00:32 \
 >  |   -net tap,script=no,ifname=tap8,downscript=no -name "nbsd_QA"
 >  |  
 >  | ----------
 >  |  
 >  | hardware is a Lenovo T530 with 16G ram
 >  | >How-To-Repeat:
 >  | 
 >  | install from .iso as shown above
 >  | >Fix:
 >  | A workaround was noted on #netbsd - use less memory.  Apprently the panic happens on a buffer copy.
 >  | 
 >  | By changing my qemu memory parameter to 
 >  | 
 >  |   -m 1024
 >  
 >  Yes, this has to do with bounce buffer handling which is broken in -7.
 >  It is supposed to be fixed with this pullup:
 >  
 >  https://releng.netbsd.org/cgi-bin/req-7.cgi?show=1011
 >  
 >  What does: "ident /netbsd | grep bus_dma" say? Do you have the updated
 >  version?
 >  
 >  christos
 >  

 Helly Christos,

 The command "ident /netbsd | grep bus_dma" returns the following:

   $NetBSD: bus_cma.c,v 1.71 2013/12/24 15:42:56 christos Exp $
   $NetBSD: ttm_bus_dma.c,v 1.1 2014/07/16 20:59:58 riastradh Exp $


 I've applied your earlier guidance about reducing the amount of memory on the
 initial install to 2048M.  This works for now and will be sufficient
 for me to get the BSDCG Study DVD out the door this week.

 We update the DVD when new releases come out so, if there is a new fix
 it will be in the next issue of the DVD.  However, if this is a critical
 bug that would impact the operation of NetBSD *after* the install,
 please advise and we will take action to update as soon as possible.

 Thanks for your assistance!

 Jim B.
 BSDCG



From: christos@zoulas.com (Christos Zoulas)
To: "Jim B." <jpb@jimby.name>, gnats-bugs@NetBSD.org
Cc: install-manager@netbsd.org, gnats-admin@netbsd.org, 
	netbsd-bugs@netbsd.org
Subject: Re: install/50554: panic on install with qemu 2.4.0  (amd64 install)
Date: Thu, 17 Dec 2015 08:30:46 -0500

 On Dec 16, 10:20pm, jpb@jimby.name ("Jim B.") wrote:
 -- Subject: Re: install/50554: panic on install with qemu 2.4.0  (amd64 insta

 | * Christos Zoulas <christos@zoulas.com> [2015-12-14 21:40]:
 | > The following reply was made to PR install/50554; it has been noted by GNATS.
 | > 
 | > From: christos@zoulas.com (Christos Zoulas)
 | > To: gnats-bugs@NetBSD.org, install-manager@netbsd.org, 
 | > 	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
 | > Cc: 
 | > Subject: Re: install/50554: panic on install with qemu 2.4.0  (amd64 install)
 | > Date: Mon, 14 Dec 2015 21:35:07 -0500
 | > 
 | >  On Dec 15,  1:40am, jpb@jimby.name (jpb@jimby.name) wrote:
 | >  -- Subject: install/50554: panic on install with qemu 2.4.0  (amd64 install)
 | >  
 | >  | qemu-img command line:
 | >  |  
 | >  | qemu-img create -f raw -o size=15G,preallocation=full  nbsd_QA_hda.img
 | >  | -------------
 | >  |  
 | >  |  
 | >  | QEMU command line  (run under sudo)
 | >  |  
 | >  | #!/bin/sh
 | >  | /usr/local/bin/qemu-system-x86_64 -monitor none \
 | >  |   -cpu Broadwell \
 | >  |   -vga cirrus \
 | >  |   -m 4096      \
 | >  |   -localtime \
 | >  |   -cdrom /usr/home/jpb/ISO/NBSD/7.0/NetBSD-7.0-amd64.iso \
 | >  |   -boot order=cd,menu=on \
 | >  |   -drive if=none,id=drive0,cache=none,aio=native,format=raw,file=/usr/home/jpb/VM.OFF/nbsd_QA_hda.img \
 | >  |   -device virtio-blk,drive=drive0  \
 | >  |   -net nic,vlan=0,macaddr=00:d4:3b:55:00:32 \
 | >  |   -net tap,script=no,ifname=tap8,downscript=no -name "nbsd_QA"
 | >  |  
 | >  | ----------
 | >  |  
 | >  | hardware is a Lenovo T530 with 16G ram
 | >  | >How-To-Repeat:
 | >  | 
 | >  | install from .iso as shown above
 | >  | >Fix:
 | >  | A workaround was noted on #netbsd - use less memory.  Apprently the panic happens on a buffer copy.
 | >  | 
 | >  | By changing my qemu memory parameter to 
 | >  | 
 | >  |   -m 1024
 | >  
 | >  Yes, this has to do with bounce buffer handling which is broken in -7.
 | >  It is supposed to be fixed with this pullup:
 | >  
 | >  https://releng.netbsd.org/cgi-bin/req-7.cgi?show=1011
 | >  
 | >  What does: "ident /netbsd | grep bus_dma" say? Do you have the updated
 | >  version?
 | >  
 | >  christos
 | >  
 | 
 | Helly Christos,
 | 
 | The command "ident /netbsd | grep bus_dma" returns the following:
 | 
 |   $NetBSD: bus_cma.c,v 1.71 2013/12/24 15:42:56 christos Exp $
 |   $NetBSD: ttm_bus_dma.c,v 1.1 2014/07/16 20:59:58 riastradh Exp $
 | 
 | 
 | I've applied your earlier guidance about reducing the amount of memory on the
 | initial install to 2048M.  This works for now and will be sufficient
 | for me to get the BSDCG Study DVD out the door this week.
 | 
 | We update the DVD when new releases come out so, if there is a new fix
 | it will be in the next issue of the DVD.  However, if this is a critical
 | bug that would impact the operation of NetBSD *after* the install,
 | please advise and we will take action to update as soon as possible.
 | 
 | Thanks for your assistance!

 You should update if you are going to use NetBSD under qemu; the version
 of bus_dma.c in the branch is:

     $NetBSD: bus_dma.c,v 1.71.4.1 2015/11/08 00:31:00 riz Exp $

 christos

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.