-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
facter panics in captureTouchpads. This happens both at v0.3.0 and HEAD. The trace below is from HEAD:
2025/01/03 21:18:29 INFO building report system=x86_64-linux version=1
2025/01/03 21:18:29 INFO scanning hardware features="[memory pci net serial cpu bios monitor scsi usb prom sbus sys sysfs udev block wlan]"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xa pc=0x520f86]
goroutine 1 [running]:
github.com/numtide/nixos-facter/pkg/hwinfo.captureTouchpads(0x4a)
github.com/numtide/nixos-facter/pkg/hwinfo/input.go:21 +0xc6
github.com/numtide/nixos-facter/pkg/hwinfo.Scan({0xc000098080, 0x10, 0x6f5780?})
github.com/numtide/nixos-facter/pkg/hwinfo/hwinfo.go:82 +0x59c
github.com/numtide/nixos-facter/pkg/facter.(*Scanner).Scan(0x6d3c00)
github.com/numtide/nixos-facter/pkg/facter/facter.go:76 +0x273
github.com/numtide/nixos-facter/cmd.Execute()
github.com/numtide/nixos-facter/cmd/root.go:118 +0x2fd
main.main()
github.com/numtide/nixos-facter/main.go:8 +0xf
To Reproduce
Steps to reproduce the behavior:
nix run --option experimental-features "nix-command flakes" #nixos-facter -- -o facter.json
Expected behavior
nixos-facter produces facter.json without segfaulting.
System information
Instead here are the list of parts, and I am also attaching a facter.json generated with v0.2.0.
- Asrock B550m Pro 4
- Ryzen 5 Pro 5650GE
- 2x Kingston KSM32ED8/32HC 32GB
- Kioxia Exceria G2 1TB (boot drive)
- 6x PM863A 3.84TB
- Connectx4-Lx 2*25Gb with a single 10G fiber transceiver
- HDPLEX 250W GaN Passive
- Streacom FC10 ST-FC10B-ALPHA
I git bisect-ed it down to b7473dd, which doesn't really help since it's the commit that adds input.go.
I thought maybe it would help if it had a peripheral, but plugging a keyboard didn't change anything. This is a headless and fanless system, so the keyboard and the bootable USB stick are the only things plugged in.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working