NetBSD Problem Report #54261

From www@netbsd.org  Sun Jun  2 05:58:08 2019
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 "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id EB59F7A1D6
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  2 Jun 2019 05:58:07 +0000 (UTC)
Message-Id: <20190602055806.A868D7A1F0@mollari.NetBSD.org>
Date: Sun,  2 Jun 2019 05:58:06 +0000 (UTC)
From: davshao@gmail.com
Reply-To: davshao@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Marvell Yukon-2 probe uvm_fault on Intel EagleLake machine
X-Send-Pr-Version: www-1.0

>Number:         54261
>Category:       kern
>Synopsis:       Marvell Yukon-2 probe uvm_fault on Intel EagleLake machine
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    msaitoh
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 02 06:00:00 +0000 2019
>Closed-Date:    Mon Jun 03 09:13:49 +0000 2019
>Last-Modified:  Mon Jun 03 09:13:49 +0000 2019
>Originator:     David shao
>Release:        NetBSD 8.99.42
>Organization:
>Environment:
NetBSD xxxxxx.xxx 8.99.41 NetBSD 8.99.41 (GENERIC) #59: Sun May 26 22:52:49 PDT 2019  xxxxxx@xxxxxx.xxx:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
Booting an Intel Eaglelake machine with Marvell Yukon-2 ends with:

jmide0: 1 PATA port
jmide0: interrupting at ioapic0 pin 16
jmide0: PCI IDE interface used
jmide0: primary channel wired to native-PCI- mode
jmide0: primary channel is PATA
atabus0 at jmide0 channel 0
jmide0: secondary channel wired to native-PCI mode
jmide0: secondary channel is unused
ppb1 at pci0 dev 28 function 2: vendor 8086 product 3a44 (rev. 0x00)
pbi1: PCI Express capability version <Root Port of PCI-E Root Complex> x1 @ 2.5GT/s
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
mskc0 at pci2 dev 0 function 0 0allocated pic msi1 type edge pin 0 level 6 to cpu0 slot 17 idt entry 101
, Yukon-2 EC Ultra rev. B1 (0x5): msi1 vec 0
msk0 at mskc0 port A: Ethernet address 00:30:1b:bd:74:7c
uvm_fault(0xffffffff81782720, 0x0,2) -> e
fatal page fault in supervisor mode
trap type 6 code 0x2 rip 0xffffffff8022784c cs 0x8 rflags 0x10246cr2 0 ilevel 0x8 rsp 0xffffffff81b7d328
curlwp 0xffffffff8165bec0 pid 0.1 lowest kstack 0xffffffff81b792c0
kernel: page fault trap, code=0
Stoppped in pid 0.1 (system) at netbsd:mutex_enter+0xc: lock cmpxchgq   %rcx,0(%rdi)

db{0}> bt
mutex_enter() at netbsd:mutex_enter+0xc
msk_init_yukon() at netbsd:msk_init_yukon+0x2a8
msk_attach() at netbsd:msk_attach+0x38f
config_attach_loc() at netbsd:config_attach_loc+0x1a5
config_found_sm_loc()
mskc_attach() at netbsd:mskc_attach+0x646
config_attach_loc()
config_found_sm_loc()
pci_probe_device()
pci_enumerate_bus()
pcirescan()
pciattach()
config_attach_loc()
config_found_sm_loc()
ppbattach()
config_attach_loc()
config_found_sm_loc()
pci_probe_device()
pci_enumerate_bus()
pcirescan()
pciattach()
config_attach_loc
config_found_sm_loc
mp_pci_scan() at netbsd:mp_pci_scan+0xaa
amd64_mainbus_attach at netbsd:amd64_mainbus_attach+0x22c
mainbus_attach() at netbsd:mainbus_attach+0x74
config_attach_loc() at netbsd;config_attach_loc+0x1a5
cpu_configure() at netbsd:cpu_configure+0x2b
main() at netbsd:main+0x301

dmesg from 8.99.41 kernel from May 26 that boots fine:

[     1.000000] NetBSD 8.99.41 (GENERIC) #59: Sun May 26 22:52:49 PDT 2019
[     1.000000]         xxxxxx@xxxxxx.xxx:/usr/obj/sys/arch/amd64/compile/GENERIC
[     1.000000] total memory = 8124 MB
[     1.000000] avail memory = 7862 MB
[     1.000000] WARNING: module error: module `ffs' pushed by boot loader already exists
[     1.000000] timecounter: Timecounters tick every 10.000 msec
[     1.000000] Kernelized RAIDframe activated
[     1.000000] running cgd selftest aes-xts-256 aes-xts-512 done
[     1.000000] timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
[     1.000003] Shuttle Inc SG45 (V10)
[     1.000003] mainbus0 (root)
[     1.000003] ACPI: RSDP 0x00000000000F7EE0 000014 (v00 Shuttl)
[     1.000003] ACPI: RSDT 0x00000000BBCE3000 00003C (v01 Shuttl Shuttle  42302E31 AWRD 00000000)
[     1.000003] ACPI: FACP 0x00000000BBCE3080 000084 (v02 Shuttl Shuttle  42302E31 AWRD 00000000)
[     1.000003] Firmware Warning (ACPI): Optional FADT field Pm2ControlBlock has valid Address but zero Length: 0x0000000000000450/0x0 (20190405/tbfadt-693)
[     1.000003] Firmware Warning (ACPI): Invalid length for FADT/Pm2ControlBlock: 0, using default 8 (20190405/tbfadt-745)
[     1.000003] ACPI: DSDT 0x00000000BBCE3140 004E30 (v01 SHUTTL SG45V10  00001000 MSFT 03000000)
[     1.000003] ACPI: FACS 0x00000000BBC90000 000040
[     1.000003] ACPI: HPET 0x00000000BBCE8040 000038 (v01 Shuttl Shuttle  42302E31 AWRD 00000098)
[     1.000003] ACPI: MCFG 0x00000000BBCE8080 00003C (v01 Shuttl Shuttle  42302E31 AWRD 00000000)
[     1.000003] ACPI: SLIC 0x00000000BBCE80C0 000176 (v01 Shuttl Shuttle  42302E31 AWRD 00000000)
[     1.000003] ACPI: APIC 0x00000000BBCE7F80 000084 (v01 Shuttl Shuttle  42302E31 AWRD 00000000)
[     1.000003] ACPI: SSDT 0x00000000BBCE8B60 000590 (v01 PmRef  CpuPm    00003000 INTL 20041203)
[     1.000003] ACPI: 2 ACPI AML tables successfully acquired and loaded
[     1.000003] ioapic0 at mainbus0 apid 4: pa 0xfec00000, version 0x20, 24 pins
[     1.000003] cpu0 at mainbus0 apid 0

...

[     1.038434] pci1 at ppb0 bus 1
[     1.038434] pci1: i/o space, memory space enabled, rd/line, wr/inv ok
[     1.038434] jmide0 at pci1 dev 0 function 0: vendor 197b product 2368 (rev. 0x00)
[     1.038434] jmide0: 1 PATA port
[     1.038434] allocated pic ioapic0 type level pin 16 level 6 to cpu0 slot 1 idt entry 97
[     1.038434] jmide0: interrupting at ioapic0 pin 16
[     1.038434] jmide0: PCI IDE interface used
[     1.038434] jmide0: bus-master DMA support present
[     1.038434] jmide0: primary channel wired to native-PCI mode
[     1.038434] jmide0: primary channel is PATA
[     1.038434] atabus0 at jmide0 channel 0
[     1.038434] jmide0: secondary channel wired to native-PCI mode
[     1.038434] jmide0: secondary channel is unused
[     1.038434] ppb1 at pci0 dev 28 function 2: vendor 8086 product 3a44 (rev. 0x00)
[     1.038434] ppb1: PCI Express capability version 1 <Root Port of PCI-E Root Complex> x1 @ 2.5GT/s
[     1.038434] pci2 at ppb1 bus 2
[     1.038434] pci2: i/o space, memory space enabled, rd/line, wr/inv ok
[     1.038434] mskc0 at pci2 dev 0 function 0allocated pic msi1 type edge pin 0 level 6 to cpu0 slot 17 idt entry 101
[     1.038434] , Yukon-2 EC Ultra rev. B1 (0x5): msi1 vec 0
[     1.038434] msk0 at mskc0 port A: Ethernet address 00:30:1b:bd:74:7c
[     1.038434] makphy0 at msk0 phy 0: Marvell 88E1149 Gigabit PHY, rev. 1
[     1.038434] makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
[     1.038434] uhci3 at pci0 dev 29 function 0: vendor 8086 product 3a34 (rev. 0x00)
[     1.038434] allocated pic ioapic0 type level pin 23 level 6 to cpu0 slot 5 idt entry 102
[     1.038434] uhci3: interrupting at ioapic0 pin 23


>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org, msaitoh@netbsd.org
Subject: re: kern/54261: Marvell Yukon-2 probe uvm_fault on Intel EagleLake machine
Date: Sun, 02 Jun 2019 16:41:04 +1000

 > db{0}> bt
 > mutex_enter() at netbsd:mutex_enter+0xc
 > msk_init_yukon() at netbsd:msk_init_yukon+0x2a8
 > msk_attach() at netbsd:msk_attach+0x38f
 > config_attach_loc() at netbsd:config_attach_loc+0x1a5

 ah, this is related to if_msk.c rev 1.90:

 msk_attach() calls msk_init_yukon() calls msk_setmulti()
 now calls ETHER_LOCK() but the lock isn't initialised yet.

 msaitoh?


 .mrg.

Responsible-Changed-From-To: kern-bug-people->msaitoh
Responsible-Changed-By: msaitoh@NetBSD.org
Responsible-Changed-When: Mon, 03 Jun 2019 05:10:17 +0000
Responsible-Changed-Why:
mine.


From: "SAITOH Masanobu" <msaitoh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54261 CVS commit: src/sys/dev/pci
Date: Mon, 3 Jun 2019 05:22:57 +0000

 Module Name:	src
 Committed By:	msaitoh
 Date:		Mon Jun  3 05:22:57 UTC 2019

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

 Log Message:
  I think it's not required to call msk_init_yukon() in msk_attach().
 Fixes PR kern/54261 reported by David shao.


 To generate a diff of this commit:
 cvs rdiff -u -r1.90 -r1.91 src/sys/dev/pci/if_msk.c

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

From: Masanobu SAITOH <msaitoh@execsw.org>
To: gnats-bugs@netbsd.org, kern-bug-people@netbsd.org,
 gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, davshao@gmail.com
Cc: msaitoh@execsw.org
Subject: Re: kern/54261: Marvell Yukon-2 probe uvm_fault on Intel EagleLake
 machine
Date: Mon, 3 Jun 2019 14:25:17 +0900

 Hello, David.

 On 2019/06/02 15:45, matthew green wrote:
 > The following reply was made to PR kern/54261; it has been noted by GNATS.
 > 
 > From: matthew green <mrg@eterna.com.au>
 > To: gnats-bugs@netbsd.org
 > Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
 >     netbsd-bugs@netbsd.org, msaitoh@netbsd.org
 > Subject: re: kern/54261: Marvell Yukon-2 probe uvm_fault on Intel EagleLake machine
 > Date: Sun, 02 Jun 2019 16:41:04 +1000
 > 
 >  > db{0}> bt
 >  > mutex_enter() at netbsd:mutex_enter+0xc
 >  > msk_init_yukon() at netbsd:msk_init_yukon+0x2a8
 >  > msk_attach() at netbsd:msk_attach+0x38f
 >  > config_attach_loc() at netbsd:config_attach_loc+0x1a5
 >  
 >  ah, this is related to if_msk.c rev 1.90:
 >  
 >  msk_attach() calls msk_init_yukon() calls msk_setmulti()
 >  now calls ETHER_LOCK() but the lock isn't initialised yet.
 >  
 >  msaitoh?
 >  
 >  
 >  .mrg.

 Could you try the latest if_msk.c (rev. 1.91)?

  Thanks.

 -- 
 -----------------------------------------------
                 SAITOH Masanobu (msaitoh@execsw.org
                                  msaitoh@netbsd.org)

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/54261: Marvell Yukon-2 probe uvm_fault on Intel EagleLake machine
Date: Mon, 3 Jun 2019 02:08:02 -0700

 Post commit

 Subject: CVS commit: src/sys/dev/pci
 Date: Mon, 3 Jun 2019 05:22:57 +0000

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

 Log Message:
  I think it's not required to call msk_init_yukon() in msk_attach().

 the Intel Eaglelake machine with Marvell Yukon-2  successfully boots,
 successfully
 obtains an IPv4 address using DHCP, and successfully uses CVS to update.
 Thanks for such a rapid diagnosis and fix!

State-Changed-From-To: open->closed
State-Changed-By: msaitoh@NetBSD.org
State-Changed-When: Mon, 03 Jun 2019 09:13:49 +0000
State-Changed-Why:
The submitter reported the problem was fixed.
Thanks!


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