NetBSD Problem Report #50139

From www@NetBSD.org  Sun Aug  9 17:06:54 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(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 F0A42A6551
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  9 Aug 2015 17:06:54 +0000 (UTC)
Message-Id: <20150809170653.B6B73A6558@mollari.NetBSD.org>
Date: Sun,  9 Aug 2015 17:06:53 +0000 (UTC)
From: edwin@etorok.net
Reply-To: edwin@etorok.net
To: gnats-bugs@NetBSD.org
Subject: Install on KVM/amd64 with cpus>1 results in kernel panic: ffs_valloc: dup alloc
X-Send-Pr-Version: www-1.0

>Number:         50139
>Category:       kern
>Synopsis:       Install on KVM/amd64 with cpus>1 results in kernel panic: ffs_valloc: dup alloc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 09 17:10:03 +0000 2015
>Last-Modified:  Mon Aug 10 08:25:00 +0000 2015
>Originator:     Török Edwin
>Release:        6.1.5
>Organization:
Skylable Ltd.
>Environment:
Linux debian 4.1.0-1-amd64 #1 SMP Debian 4.1.3-1 (2015-08-03) x86_64 GNU/Linux
>Description:
During installation of NetBSD-6.1.5/amd64 and NetBSD-7.0-RC2/amd64 
on KVM/virtio I get a kernel panic every time:

mode 816d mode 816d dgen 797498f0 gen 797498f0
size 1c3ea blocks e4
ino 833732 ipref 829441
panic: ffs_valloc: dup alloc
fatal breakpoint trap in supervisor mode
trap type 1 code 0 rip ffffffff80281d1d cs 8 rflags 246 cr2 ffff800049c60000 ilevel 0 rsp fffffe804101ca68
curlwp 0xffffffe813eab12a0 pid 114.1 lowest kstack 0xfffffe804101a2c0
Stopped in pid 114.1 (tar) at netbsd:breakpoint+0x5: leave
db{0}>

Here are screenshots and a DDB backtrace from 6.1.5:
https://imgy.org/753YQL3X
https://imgy.org/zX2AKMow
And here is another panic from 7.0-RC2: https://imgy.org/1qJxwmo9


The host CPU is: AMD FX(tm)-8350 Eight-Core Processor
virt-manager version: 1.0.1
host QEMU: version 2.1.2 (Debian 1:2.1+dfsg-12+deb8u1)
Host kernel: Linux debian 4.1.0-1-amd64 #1 SMP Debian 4.1.3-1 (2015-08-03) x86_64 GNU/Linux


>How-To-Repeat:
Start virt-manager on Debian Jessie, choose to use a local ISO with NetBSD-6.1.5 amd64, select 'FreeBSD 10.x or later' as the OS type (otherwise you get some ACPI related panics).
Allocate the default (8 GiB) disk space, 4 GiB of memory, and 4 CPUs.
Start the installation and accept the defaults where possible (use full disk, default partition sizes, install sets from CD).
When the installer extracts the sets the kernel panics. Not always on the same set, but definetely during the extraction of the sets.

The problem also reproduces with 2 GiB of memory and 2 CPUs, and with NetBSD-7.0-RC2/amd64 too.

>Fix:
As a workaround I have set the number of cpus to 1, and the installation of NetBSD-6.1.5 has finished successfully. 

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/50139: Install on KVM/amd64 with cpus>1 results in kernel panic: ffs_valloc: dup alloc
Date: Sun, 9 Aug 2015 21:36:23 +0200

 Is this maybe the same issue as PR kern/48739 ?

 Martin

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/50139: Install on KVM/amd64 with cpus>1 results in kernel
 panic: ffs_valloc: dup alloc
Date: Mon, 10 Aug 2015 00:23:49 +0000

 On Sun, Aug 09, 2015 at 07:40:00PM +0000, Martin Husemann wrote:
  >  Is this maybe the same issue as PR kern/48739 ?

 It might be related, but it's not the same as that one's a trap inside
 ld_virtio.

 Note that the "dup alloc" panic means a corrupted filesystem; but
 obviously if the filesystem corrupts itself while installing, it
 constitutes a Problem.

 -- 
 David A. Holland
 dholland@netbsd.org

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/50139: Install on KVM/amd64 with cpus>1 results in kernel panic: ffs_valloc: dup alloc
Date: Mon, 10 Aug 2015 10:22:16 +0200

 Yes, obviously it is not the same panic - I meant to say something like: 
 maybe these bugs have the same underlying issue as the root cause (as
 we never see this on real hardware AFAICT).

 Martin

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.