NetBSD Problem Report #48078

From www@NetBSD.org  Wed Jul 24 03:15:01 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id ABDA4709A7
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 24 Jul 2013 03:15:01 +0000 (UTC)
Message-Id: <20130724031459.BA907709A7@mollari.NetBSD.org>
Date: Wed, 24 Jul 2013 03:14:59 +0000 (UTC)
From: marcotte@panix.com
Reply-To: marcotte@panix.com
To: gnats-bugs@NetBSD.org
Subject: xen LOCKDEBUG immediate panic when vcpus=2
X-Send-Pr-Version: www-1.0

>Number:         48078
>Category:       port-xen
>Synopsis:       xen LOCKDEBUG immediate panic when vcpus=2
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-xen-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 24 03:20:00 +0000 2013
>Closed-Date:    Sun Jan 13 06:15:25 +0000 2019
>Last-Modified:  Sun Jan 13 06:15:25 +0000 2019
>Originator:     Brian Marcotte
>Release:        6.1
>Organization:
Public Access Networks, Corp.
>Environment:
NetBSD dw15.panix.com 6.1 NetBSD 6.1 (PANIX-XEN-WEB-DEBUG) #0: Tue Jul 23 22:09:01 EDT 2013  root@juggler.panix.com:/misc/obj/misc/devel/netbsd/6.1/src/sys/arch/i386/compile/PANIX-XEN-WEB-DEBUG i386
>Description:
When booting NetBSD/xen with options DEBUG, DIAGNOSTIC, LOCKDEBUG and
vcpus=2, I get an immediate panic.

I added those options to try to get more information about this occasional
panic:

  uvm_fault(0xc1f27a30, 0, 1) -> 0xe
  fatal page fault in supervisor mode
  trap type 6 code 0 eip c01c0d97 cs 9 eflags 10246 cr2 44 ilevel 0
  panic: trap
  cpu0: Begin traceback...
  panic(c03adbe4,cf0c3a98,cf0c3a98,c01c0d97,9,10246,44,0,44,0) at netbsd:panic+0x18
  trap() at netbsd:trap+0xb51
  --- trap (number 6) ---
  kauth_cred_geteuid(cf0c3c9c,0,bf7fdde4,cf0c3cbc,bf7fdf4c,100,cf0c3c8c,c22c6020,c0c5a8a0,4) at netbsd:kauth_cred_geteuid+0x7
  sysctl_dispatch(cf0c3c8c,4,bf7fdde4,cf0c3cbc,bf7fdf4c,100,cf0c3c8c,c22c6020,c0c5a8a0,cf0c3cbc) at netbsd:sysctl_dispatch+0xb7
  sys___sysctl(c22c6020,cf0c3d00,cf0c3d28,ca,bb782000,0,cf0c3d00,c2212384,2,bb7a6ef7) at netbsd:sys___sysctl+0xea
  syscall(cf0c3d48,bb7900b3,ab,bf7f001f,bb79001f,4,bf7fdde4,bf7fddb0,bb7c65bc,bf7fdde0) at netbsd:syscall+0xaa
  cpu0: End traceback...

I can open a separate ticket on that later.

Here is the 6.1 boot and panic:

NetBSD 6.1 (XEN3PAE_DOMU_DEBUG) #0: Tue Jul 23 22:25:49 EDT 2013
      root@juggler.panix.com:/misc/obj/misc/devel/netbsd/6.1/src/sys/arch/i386/compile/XEN3PAE_DOMU_DEBUG
total memory = 500 MB
avail memory = 483 MB
cprng kernel: WARNING insufficient entropy at creation.
mainbus0 (root)
hypervisor0 at mainbus0: Xen version 4.2.2
vcpu0 at hypervisor0: Intel(R) Xeon(R) CPU           E5410  @ 2.33GHz, id 0x10676
vcpu1 at hypervisor0: Intel(R) Xeon(R) CPU           E5410  @ 2.33GHz, id 0x10676
xenbus0 at hypervisor0: Xen Virtual Bus Interface
xencons0 at hypervisor0: Xen Virtual Console Driver
npx0 at hypervisor0: using exception 16
panic: lockdebug_lookup: uninitialized lock (lock=0xc134e4a8, from=c044839a)
fatal breakpoint trap in supervisor mode
trap type 1 code 0 eip c0137814 cs 9 eflags 246 cr2 0 ilevel 8
Stopped in pid 0.1 (system) at  netbsd:breakpoint+0x4:  popl    %ebp
breakpoint(c04ce50f,c050e5e0,c04ce6f8,c07cbaec,c0474143,c134e4a8,c04f2b80,c044839a,c07cbae0,c0378f08) at netbsd:breakpoint+0x4
vpanic(c04ce6f8,c07cbaec,c07cbb14,c0370a64,c04ce6f8,c134e4a8,c044839a,0,c07cbb00,6) at netbsd:vpanic+0x218
panic(c04ce6f8,c134e4a8,c044839a,0,c07cbb00,6,c04e8c14,0,c134d000,c134e4a8) at netbsd:panic+0x18
lockdebug_wantlock(c134e4a8,c044839a,0,0,c0231102,c04e9faa,c044836d,0,c134d000,c050cb00) at netbsd:lockdebug_wantlock+0x1b4
mutex_enter(c134e4a8,5,47216003,5,0,5c8,5c8,0,47138000,5) at netbsd:mutex_enter+0x36c
xen_kpm_sync(c050cb00,6b9,47216003,5,3,0,0,c03709ba,c07cbbdc,c04467a3) at netbsd:xen_kpm_sync+0x13a
pmap_growkernel(d7958000,d7158000,800000,c07cbc78,c0514540,0,0,1,41727,0) at netbsd:pmap_growkernel+0x34d
uvm_map_prepare(c05146c0,d7158000,800000,c0514540,0,0,1,41727,c07cbca4,0) at netbsd:uvm_map_prepare+0x26e
uvm_map(c05146c0,c051456c,800000,c0514540,0,0,1,41727,6400,c07cbd40) at netbsd:uvm_map+0x85
ubc_init(c04b0dab,6,3,0,c064c560,c0626d14,7cc000,c0658200,c07cbd38,c0240ce7) at netbsd:ubc_init+0x198
main(0,0,0,0,0,0,0,0,0,0) at netbsd:main+0x2a7
ds          c0370011    lockdebug_lock_cpus+0x11
es          c07c0011
fs          c07c0031
gs          c04c0011    copyright+0x222b1
edi         c07cbaec
esi         c04ce6f8    copyright+0x30998
ebp         c07cbaa8
ebx         104
edx         0
ecx         8
eax         1
eip         c0137814    breakpoint+0x4
cs          9
eflags      246
esp         c07cbaa8
ss          11
netbsd:breakpoint+0x4:  popl    %ebp
db{0}>

>How-To-Repeat:
I added these options to XEN3PAE_DOMU:

options         DIAGNOSTIC
options         DEBUG
options         LOCKDEBUG
makeoptions     DEBUG="-g"      # compile full symbol table

set vcpus=2

When I remove LOCKDEBUG or set vcpus=1 it boots.
It also panics on -current

>Fix:
Unknown.

>Release-Note:

>Audit-Trail:
From: Brian Marcotte <marcotte@panix.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/48078: xen LOCKDEBUG immediate panic when vcpus=2
Date: Tue, 23 Jul 2013 23:34:56 -0400

 I should add that my dom0 is Xen 4.2.2 and Linux 3.4.49 (with patches
 to fix the problems caused by XSA-39).

 If you can't reproduce the problem on your systems, I can probably give
 you a domU here.

 Thanks.

 --
 - Brian

Responsible-Changed-From-To: kern-bug-people->port-xen-bug-people
Responsible-Changed-By: jdolecek@NetBSD.org
Responsible-Changed-When: Tue, 14 Aug 2018 17:29:47 +0000
Responsible-Changed-Why:
This is xen specific


State-Changed-From-To: open->feedback
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Tue, 14 Aug 2018 17:30:00 +0000
State-Changed-Why:
Can you try this with 8.0? Sorry for taking 5 years.


Responsible-Changed-From-To: port-xen-bug-people->port-xen-maintainer
Responsible-Changed-By: jdolecek@NetBSD.org
Responsible-Changed-When: Tue, 28 Aug 2018 18:38:39 +0000
Responsible-Changed-Why:
Fixing to port-xen-maintainer


From: Brian Marcotte <marcotte@panix.com>
To: jdolecek@NetBSD.org
Cc: port-xen-bug-people@NetBSD.org, netbsd-bugs@netbsd.org,
	gnats-admin@netbsd.org, gnats-bugs@NetBSD.org
Subject: Re: port-xen/48078 (xen LOCKDEBUG immediate panic when vcpus=2)
Date: Sat, 12 Jan 2019 20:02:11 -0500

 > Can you try this with 8.0? Sorry for taking 5 years.

 I've finally had a reason to use LOCKDEBUG again.

 It's working fine in 8.0, though when I made the original bug report,
 we were 32-bit and now all our systems are 64-bit.

 Thanks.

 --
 - Brian

State-Changed-From-To: feedback->closed
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Sun, 13 Jan 2019 06:15:25 +0000
State-Changed-Why:
Confirmed to no longer be problem. Thanks for report.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.