NetBSD Problem Report #49968

From hf@spg.tu-darmstadt.de  Fri Jun 12 16:00:55 2015
Return-Path: <hf@spg.tu-darmstadt.de>
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 88D0DA5B2E
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 12 Jun 2015 16:00:55 +0000 (UTC)
Message-Id: <201506121517.t5CFH9Th003675@Feuerkogel.nt.e-technik.tu-darmstadt.de>
Date: Fri, 12 Jun 2015 17:17:09 +0200 (CEST)
From: Hauke Fath <hf@spg.tu-darmstadt.de>
Reply-To: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org
Cc: Hauke Fath <hf@spg.tu-darmstadt.de>
Subject: ixg(4) related panic on Dom0
X-Send-Pr-Version: 3.95

>Number:         49968
>Category:       kern
>Synopsis:       ixg(4) related panic on Dom0
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    msaitoh
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 12 16:05:00 +0000 2015
>Closed-Date:    Thu Mar 09 08:28:26 +0000 2017
>Last-Modified:  Sat Mar 25 17:40:01 +0000 2017
>Originator:     Hauke Fath
>Release:        NetBSD 7.0_BETA
>Organization:

>Environment:


System: NetBSD Feuerkogel 7.0_BETA NetBSD 7.0_BETA (FEUERKOGEL_DOM0-$Revision$) #0: Fri Jun 12 16:49:04 CEST 2015 hf@Hochstuhl:/var/obj/netbsd-builds/7/amd64/sys/arch/amd64/compile/FEUERKOGEL_DOM0 amd64
Architecture: x86_64
Machine: amd64
>Description:

	On the above machine, a Dom0 kernel configured with 

ixg* at pci? dev ? function ?  # Intel 10 GbE NIC

	panics during autoconfiguration.

[...]
pci4 at ppb3 bus 4
ixg0 at pci4 dev 0 function 0: Intel(R) PRO/10GbE PCI-Express Network Driver, Version - 2.5.8 - HEAD
ixg0: clearing prefetchable bit
ixg0: Unable to create TX DMA map (12)
ixg0: Critical Failure setting up transmit buffers
uvm_fault(0xffffffff80c56360, 0x0, 1) -> e
fatal page fault in supervisor mode
trap type 6 code 0 rip ffffffff8024a9f5 cs e030 rflags 10246 cr2 4 ilevel 8 rsp ffffffff81024660
curlwp 0xffffffff80c0c780 pid 0.1 lowest kstack 0xffffffff810222c0
kernel: page fault trap, code=0
Stopped in pid 0.1 (system) at  netbsd:pirq_disestablish+0x8:   movl    4(%rdi),
%edi
pirq_disestablish() at netbsd:pirq_disestablish+0x8
ixgbe_free_pci_resourccccces() at netbsd:ixgbe_free_pci_resources+0x1b
ixgbe_attach() at netbsd:ixgbe_attach+0x4c4
config_attach_loc() at netbsd:config_attach_loc+0x16e
pci_probe_device() at netbsd:pci_probe_device+0x4ac
pci_enumerate_bus() at netbsd:pci_enumerate_bus+0x168
pcirescan() at netbsd:pcirescan+0x1c
pciattach() at netbsd:pciattach+0x193
config_attach_loc() at netbsd:config_attach_loc+0x16e
ppbattach() at netbsd:ppbattach+0x10a
config_attach_loc() at netbsd:config_attach_loc+0x16e
pci_probe_device() at netbsd:pci_probe_device+0x4ac
pci_enumerate_bus() at netbsd:pci_enumerate_bus+0x168
pcirescan() at netbsd:pcirescan+0x1c
pciattach() at netbsd:pciattach+0x193
config_attach_loc() at netbsd:config_attach_loc+0x16e
mp_pci_scan() at netbsd:mp_pci_scan+0xa4
hypervisor_attach() at netbsd:hypervisor_attach+0x186
config_attach_loc() at netbsd:config_attach_loc+0x16e
mainbus_attach() at netbsd:mainbus_attach+0xbf
config_attach_loc() at netbsd:config_attach_loc+0x16e
cpu_configure() at netbsd:cpu_configure+0x21
main() at netbsd:main+0x2a3
ds          3900
es          ec00
fs          0
gs          37d5
rdi         0
rsi         0
rbp         ffffffff81024668
rbx         0
rdx         1
rcx         ffffa00000e33900
rax         ffffffff80bac440    cpu_info_primary
r8          ffffa00001e59c20
r9          ffffa00000e33900
r10         7ff0
r11         73
r12         ffffa00001046008
r13         ffffa00000eba000
r14         ffffa00001f6b4a0
r15         586
rip         ffffffff8024a9f5    pirq_disestablish+0x8
cs          e030
rflags      10246
rsp         ffffffff81024660
ss          e02b
netbsd:pirq_disestablish+0x8:   movl    4(%rdi),%edi
db> t
pirq_disestablish() at netbsd:pirq_disestablish+0x8
ixgbe_free_pci_resources() at netbsd:ixgbe_free_pci_resources+0x1b
ixgbe_attach() at netbsd:ixgbe_attach+0x4c4
config_attach_loc() at netbsd:config_attach_loc+0x16e
pci_probe_device() at netbsd:pci_probe_device+0x4ac
pci_enumerate_bus() at netbsd:pci_enumerate_bus+0x168
pcirescan() at netbsd:pcirescan+0x1c
pciattach() at netbsd:pciattach+0x193
config_attach_loc() at netbsd:config_attach_loc+0x16e
ppbattach() at netbsd:ppbattach+0x10a
config_attach_loc() at netbsd:config_attach_loc+0x16e
pci_probe_device() at netbsd:pci_probe_device+0x4ac
pci_enumerate_bus() at netbsd:pci_enumerate_bus+0x168
pcirescan() at netbsd:pcirescan+0x1c
pciattach() at netbsd:pciattach+0x193
config_attach_loc() at netbsd:config_attach_loc+0x16e
mp_pci_scan() at netbsd:mp_pci_scan+0xa4
hypervisor_attach() at netbsd:hypervisor_attach+0x186
config_attach_loc() at netbsd:config_attach_loc+0x16e
mainbus_attach() at netbsd:mainbus_attach+0xbf
config_attach_loc() attttt netbsd:config_attach_loc+0x16e
cpu_configure() at netbsd:cpu_configure+0x21
main() at netbsd:main+0x2a3
db> 

	Interesting enough, with a GENERIC kernel, the interface
	configures properly

[...]
pci4 at ppb3 bus 4
ixg0 at pci4 dev 0 function 0: Intel(R) PRO/10GbE PCI-Express Network Driver, Version - 2.5.8 - HEAD
ixg0: clearing prefetchable bit
ixg0: interrupting at ioapic1 pin 8
ixg0: PCI Express Bus: Speed 5.0Gb/s Width x8
[...]

	and shows up in ifconfig output. In both cases, the interface
	was unplugged,


>How-To-Repeat:

	Augment a xen dom0 kernel config with 

ixg* at pci? dev ? function ?  # Intel 10 GbE NIC

	and watch it panic.


>Fix:

	Yes, please.


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->msaitoh
Responsible-Changed-By: msaitoh@NetBSD.org
Responsible-Changed-When: Mon, 03 Aug 2015 05:51:47 +0000
Responsible-Changed-Why:
mine.


From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/49968: ixg(4) related panic on Dom0
Date: Mon, 17 Aug 2015 15:53:55 +0200

 On Fri, 12 Jun 2015 16:05:00 +0000 (UTC), Hauke Fath wrote:
 > 	On the above machine, a Dom0 kernel configured with 
 > 
 > ixg* at pci? dev ? function ?  # Intel 10 GbE NIC
 > 
 > 	panics during autoconfiguration.

 On a similar machine, a beta2 non-xen kernel gave me a

 NetBSD 7.0_RC2 (FIFI-$Revision: 1.85 $) #0: Fri Aug  7 12:37:16 CEST 
 2015

 hf@Hochstuhl:/var/obj/netbsd-builds/7/amd64/sys/arch/amd64/compile/FIFI

 [...]

 ixg0 at pci1 dev 0 function 0: Intel(R) PRO/10GbE PCI-Express Network 
 Driver, Version - 2.5.8 - HEAD
 ixg0: clearing prefetchable bit
 ixg0: unable to map BAR0
 ixg0: Allocation of PCI resources failed
 uvm_fault(0xffffffff806eb920, 0x0, 1) -> e
 fatal page fault in supervisor mode
 trap type 6 code 0 rip ffffffff80203902 cs 8 rflags 10246 cr2 40 ilevel 
 8 rsp ffffffff8081d700
 curlwp 0xffffffff806c9e20 pid 0.1 lowest kstack 0xffffffff8081b2c0
 kernel: page fault trap, code=0
 Stopped in pid 0.1 (system) at  netbsd:intr_disestablish+0x14:  movq    
 40(%rbx)
 ,%r8
 db{0}> reboot

 and I had to remove the driver from the kernel configuration.

 If it helps, I might be able to come up with a stack trace.

 Cheerio,
 hauke

From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org
Cc: msaitoh@NetBSD.org, gnats-admin@NetBSD.org
Subject: Re: kern/49968: ixg(4) related panic on Dom0
Date: Fri, 13 May 2016 15:48:44 +0200

 As of today, -current fails to configure the nic, but does not crash:

 ixg0 at pci1 dev 0 function 0: Intel(R) PRO/10GbE PCI-Express Network 
 Driver, Version - 2.5.15
 ixg0: clearing prefetchable bit
 ixg0: Unable to create TX DMA map (12)
 ixg0: Critical Failure setting up transmit buffers

From: "SAITOH Masanobu" <msaitoh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49968 CVS commit: src/sys/dev/pci/ixgbe
Date: Wed, 18 Jan 2017 08:23:03 +0000

 Module Name:	src
 Committed By:	msaitoh
 Date:		Wed Jan 18 08:23:03 UTC 2017

 Modified Files:
 	src/sys/dev/pci/ixgbe: ixgbe.c

 Log Message:
  Use 64bit DMA tag. If not, a lot of bounce buffer is allocated.
 Fixes PR#49968 reported by Hauke.

 XXX pullup-[67].


 To generate a diff of this commit:
 cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/ixgbe/ixgbe.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: msaitoh@NetBSD.org
State-Changed-When: Thu, 19 Jan 2017 06:04:14 +0000
State-Changed-Why:
Could you test with ixgbe.c rev. 1.60's change?


From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49968 CVS commit: [netbsd-7] src/sys/dev/pci/ixgbe
Date: Thu, 9 Mar 2017 06:19:37 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Thu Mar  9 06:19:37 UTC 2017

 Modified Files:
 	src/sys/dev/pci/ixgbe [netbsd-7]: ixgbe.c

 Log Message:
 Pull up following revision(s) (requested by msaitoh in ticket #1370):
 	sys/dev/pci/ixgbe/ixgbe.c: revision 1.60
   Use 64bit DMA tag. If not, a lot of bounce buffer is allocated.
 Fixes PR#49968 reported by Hauke.


 To generate a diff of this commit:
 cvs rdiff -u -r1.14.2.6 -r1.14.2.7 src/sys/dev/pci/ixgbe/ixgbe.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: feedback->closed
State-Changed-By: msaitoh@NetBSD.org
State-Changed-When: Thu, 09 Mar 2017 08:28:26 +0000
State-Changed-Why:
Fixed and pulled-up. Thanks.


From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49968 CVS commit: [netbsd-6] src/sys/dev/pci/ixgbe
Date: Sat, 25 Mar 2017 17:35:56 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Sat Mar 25 17:35:56 UTC 2017

 Modified Files:
 	src/sys/dev/pci/ixgbe [netbsd-6]: ixgbe.c

 Log Message:
 Pull up following revision(s) (requested by msaitoh in ticket #1439):
 	sys/dev/pci/ixgbe/ixgbe.c: revision 1.60 via patch
 Use 64bit DMA tag. If not, a lot of bounce buffer is allocated.
 Fixes PR#49968 reported by Hauke.


 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.2.4.1 src/sys/dev/pci/ixgbe/ixgbe.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

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