NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/55674: ld(4) should attempt to allocate ld(4) for 0 size disks



>Number:         55674
>Category:       kern
>Synopsis:       ld(4) should attempt to allocate ld(4) for 0 size disks
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 21 09:20:00 +0000 2020
>Originator:     kardel%netbsd.org@localhost
>Release:        NetBSD 9.99.55+ and older
>Organization:
	
>Environment:
	
	
System: NetBSD Toblerone 9.99.55 NetBSD 9.99.55 (XEN3_DOM0) #1: Thu Apr 9 11:39:49 CEST 2020 kardel@Toblerone:/usr/src/sys/arch/amd64/compile/obj/XEN3_DOM0 amd64
Architecture: x86_64
Machine: amd64
>Description:
	After upgrading the firmware of a U.2 NVMe disk it grew 128 name spaces :-)
	NetBSD reacted with:

...
ld26 at nvme0 nsid 27
ld27 at nvme0 nsid 28
ld28 at nvme0 nsid 29
ld29 at nvme0 nsid 30
...
ld125 at nvme0 nsid 126
ld126 at nvme0 nsid 127
ld127 at nvme0 nsid 128
ppb32 at pci34 dev 1 function 2: vendor 1022 product 1483 (rev. 0x00)
ppb32: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x4 @ 8.0GT/s
pci36 at ppb32 bus 194
pci36: i/o space, memory space enabled
nvme1 at pci36 dev 0 function 0: vendor 8086 product 0a54 (rev. 0x00)
nvme1: NVMe 1.2
nvme1: interrupting at ioapic1 pin 4
nvme1: INTEL SSDPE2KX040T8, firmware VDV10170, serial X----X
ld128 at nvme1 nsid 1
ld128: 3726 GB, 486401 cyl, 255 head, 63 sec, 512 bytes/sect x 7814037168 sectors
ld129 at nvme1 nsid 2
ld130 at nvme1 nsid 3
ld131 at nvme1 nsid 4
...
ld254 at nvme1 nsid 127
ld255 at nvme1 nsid 128
ppb33 at pci34 dev 1 function 3: vendor 1022 product 1483 (rev. 0x00)
ppb33: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x4 @ 8.0GT/s
pci37 at ppb33 bus 195
pci37: i/o space, memory space enabled
nvme2 at pci37 dev 0 function 0: vendor 8086 product 0a54 (rev. 0x00)
nvme2: NVMe 1.2
nvme2: interrupting at ioapic1 pin 8
nvme2: INTEL SSDPE2KX040T8, firmware VDV10170, serial X----X
ld256 at nvme2 nsid 1
ld256: 3726 GB, 486401 cyl, 255 head, 63 sec, 512 bytes/sect x 7814037168 sectors
ld257 at nvme2 nsid 2
ld258 at nvme2 nsid 3
...
i...
ld382 at nvme2 nsid 127
ld383 at nvme2 nsid 128

	Consequently devpubd created 13056(minus already existing devices) entries
	in /dev.
	sysctl shows a little better picture:
sysctl hw.disknames gives:
hw.disknames = ld0 ld128 ld256 dk0 dk1 dk2 dk3 vnd0
	All additional names spaces are of 0 size - we should not allocate
	a non functional ld entry for that.
nvmectl identify nvme0
Controller Capabilities/Features
================================
Vendor ID:                  8086
Subsystem Vendor ID:        8086
Serial Number:              X----X
Model Number:               INTEL SSDPE2KX020T8
Firmware Version:           VDV10170
Recommended Arb Burst:      0
IEEE OUI Identifier:        e4 d2 5c
Multi-Interface Cap:        00
Max Data Transfer Size:     131072
Controller ID:              0x00

Admin Command Set Attributes
============================
Security Send/Receive:       Not Supported
Format NVM:                  Supported
Firmware Activate/Download:  Supported
Namespace Managment:         Supported
Abort Command Limit:         4
Async Event Request Limit:   4
Number of Firmware Slots:    4
Firmware Slot 1 Read-Only:   No
Per-Namespace SMART Log:     No
Error Log Page Entries:      64
Number of Power States:      1

NVM Command Set Attributes
==========================
Submission Queue Entry Size
  Max:                       64
  Min:                       64
Completion Queue Entry Size
  Max:                       16
  Min:                       16
Number of Namespaces:        128
Compare Command:             Not Supported
Write Uncorrectable Command: Supported
Dataset Management Command:  Supported
Write Zeroes Command:        Not Supported
Features Save/Select Field:  Not Supported
Reservation:                 Not Supported
Volatile Write Cache:        Not Present

Namespace Drive Attributes
==========================
NVM total cap:                  2000398934016 
NVM unallocated cap:            0 

nvmectl identify nvme0ns1
Size (in LBAs):              3907029168 (3726M)
Capacity (in LBAs):          3907029168 (3726M)
Utilization (in LBAs):       3907029168 (3726M)
Thin Provisioning:           Not Supported
Number of LBA Formats:       2
Current LBA Format:          LBA Format #00
LBA Format #00: Data Size:   512  Metadata Size:     0
LBA Format #01: Data Size:  4096  Metadata Size:     0

nvmectl identify nvme0ns2
Size (in LBAs):              0 (0M)
Capacity (in LBAs):          0 (0M)
Utilization (in LBAs):       0 (0M)
Thin Provisioning:           Not Supported
Number of LBA Formats:       1
Current LBA Format:          LBA Format #00
LBA Format #00: Data Size:     1  Metadata Size:     0
>How-To-Repeat:
	Have an NVMe device with multiple zero sized name spaces and see 
	ld devices allocated to zero sized name spaces.
>Fix:
	skip allocation of ld(4) devices for zero sized name spaces.

>Unformatted:
 	
 	


Home | Main Index | Thread Index | Old Index