pdtm version:
Latest (installed via go install github.com/projectdiscovery/pdtm/cmd/pdtm@latest)
Commit/version unknown due to crash on startup
Current Behavior:
Running pdtm immediately crashes with a segmentation fault (SIGSEGV) during initialization before any CLI output is shown.
The crash occurs inside the go-m1cpu dependency during CGO execution:
github.com/shoenig/go-m1cpu._Cfunc_initialize()
SIGSEGV: segmentation violation
PC=... addr=0x0
signal arrived during cgo execution
This happens instantly when executing:
Expected Behavior:
pdtm should start normally and display help output, version information, or available commands without crashing.
Steps To Reproduce:
- Install pdtm:
go install github.com/projectdiscovery/pdtm/cmd/pdtm@latest
- Ensure binary is in PATH:
export PATH=$HOME/go/bin:$PATH
- Run:
- Observe immediate crash:
ya3raj@Aryans-MacBook-Pro ~ % pdtm --version
SIGSEGV: segmentation violation
PC=0x18bc2d78c m=0 sigcode=2 addr=0x0
signal arrived during cgo execution
goroutine 1 gp=0x5883e9c6a1e0 m=0 mp=0x105a34120 [syscall, locked to thread]:
runtime.cgocall(0x104e02184, 0x5883e9d08e08)
/usr/local/go/src/runtime/cgocall.go:167 +0x44 fp=0x5883e9d08dd0 sp=0x5883e9d08d90 pc=0x104729d04
github.com/shoenig/go-m1cpu._Cfunc_initialize()
_cgo_gotypes.go:138 +0x2c fp=0x5883e9d08e00 sp=0x5883e9d08dd0 pc=0x104c2daec
github.com/shoenig/go-m1cpu.init.0()
/Users/ya3raj/go/pkg/mod/github.com/shoenig/go-m1cpu@v0.1.6/cpu.go:148 +0x1c fp=0x5883e9d08e10 sp=0x5883e9d08e00 pc=0x104c2db2c
runtime.doInit1(0x1058d3a50)
/usr/local/go/src/runtime/proc.go:8103 +0xc4 fp=0x5883e9d08f30 sp=0x5883e9d08e10 pc=0x1047094e4
runtime.doInit(...)
/usr/local/go/src/runtime/proc.go:8070
runtime.main()
/usr/local/go/src/runtime/proc.go:258 +0x244 fp=0x5883e9d08fd0 sp=0x5883e9d08f30 pc=0x1046f96a4
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1447 +0x4 fp=0x5883e9d08fd0 sp=0x5883e9d08fd0 pc=0x104734704
goroutine 2 gp=0x5883e9c6ad20 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
/usr/local/go/src/runtime/proc.go:462 +0xbc fp=0x5883e9cf4f90 sp=0x5883e9cf4f70 pc=0x10472cfec
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:468
runtime.forcegchelper()
/usr/local/go/src/runtime/proc.go:375 +0xb4 fp=0x5883e9cf4fd0 sp=0x5883e9cf4f90 pc=0x1046f9a34
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1447 +0x4 fp=0x5883e9cf4fd0 sp=0x5883e9cf4fd0 pc=0x104734704
created by runtime.init.7 in goroutine 1
/usr/local/go/src/runtime/proc.go:363 +0x24
goroutine 3 gp=0x5883e9c6b680 m=nil [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
/usr/local/go/src/runtime/proc.go:462 +0xbc fp=0x5883e9cf5770 sp=0x5883e9cf5750 pc=0x10472cfec
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:468
runtime.bgsweep(0x5883e9cfc000)
/usr/local/go/src/runtime/mgcsweep.go:279 +0x9c fp=0x5883e9cf57b0 sp=0x5883e9cf5770 pc=0x1046e3bfc
runtime.gcenable.gowrap1()
/usr/local/go/src/runtime/mgc.go:214 +0x20 fp=0x5883e9cf57d0 sp=0x5883e9cf57b0 pc=0x1046d5110
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1447 +0x4 fp=0x5883e9cf57d0 sp=0x5883e9cf57d0 pc=0x104734704
created by runtime.gcenable in goroutine 1
/usr/local/go/src/runtime/mgc.go:214 +0x6c
goroutine 4 gp=0x5883e9c6b860 m=nil [GC scavenge wait]:
runtime.gopark(0x5883e9cfc000?, 0x10507b570?, 0x1?, 0x0?, 0x5883e9c6b860?)
/usr/local/go/src/runtime/proc.go:462 +0xbc fp=0x5883e9cf5f60 sp=0x5883e9cf5f40 pc=0x10472cfec
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:468
runtime.(*scavengerState).park(0x105a32760)
/usr/local/go/src/runtime/mgcscavenge.go:425 +0x5c fp=0x5883e9cf5f90 sp=0x5883e9cf5f60 pc=0x1046e17ec
runtime.bgscavenge(0x5883e9cfc000)
/usr/local/go/src/runtime/mgcscavenge.go:653 +0x44 fp=0x5883e9cf5fb0 sp=0x5883e9cf5f90 pc=0x1046e1d24
runtime.gcenable.gowrap2()
/usr/local/go/src/runtime/mgc.go:215 +0x20 fp=0x5883e9cf5fd0 sp=0x5883e9cf5fb0 pc=0x1046d50d0
runtime.goexit({})
/usr/local/go/src/runtime/asm_arm64.s:1447 +0x4 fp=0x5883e9cf5fd0 sp=0x5883e9cf5fd0 pc=0x104734704
created by runtime.gcenable in goroutine 1
/usr/local/go/src/runtime/mgc.go:215 +0xac
r0 0x14
r1 0x0
r2 0xfffffffffffffff0
r3 0x16b752c50
r4 0xffffffff9cb3cd80
r5 0x10
r6 0x48
r7 0x0
r8 0x7004a3a3792c00bb
r9 0x7004a3a3792c00bb
r10 0x7ffffffffffff8
r11 0x0
r12 0x3
r13 0xbc2
r14 0x5c
r15 0x80008
r16 0x18baf7ef8
r17 0x1f9259d98
r18 0x0
r19 0x0
r20 0x465000
r21 0x10828f940
r22 0x105a6db2c
r23 0x1f7c1f760
r24 0x0
r25 0x3d
r26 0x1058d3a58
r27 0x820
r28 0x105a32ea0
r29 0x16b752c80
lr 0x18baf7f1c
sp 0x16b752c70
pc 0x18bc2d78c
fault 0x0
Environment:
- OS: macOS 26.5.1 (Apple Silicon)
- Architecture: arm64
- Go version: go1.26.4 darwin/arm64
- CPU: Apple Silicon (M-series)
- Installation method:
go install
Anything else:
The crash appears to originate from the github.com/shoenig/go-m1cpu dependency during initialization.
The binary is correctly built for arm64, and reinstalling or clearing Go caches does not resolve the issue.
Stack trace suggests incompatibility between go-m1cpu and macOS 26 system-level APIs or sysctl behavior, causing a null pointer dereference during CGO initialization.
pdtm version:
Latest (installed via
go install github.com/projectdiscovery/pdtm/cmd/pdtm@latest)Commit/version unknown due to crash on startup
Current Behavior:
Running
pdtmimmediately crashes with a segmentation fault (SIGSEGV) during initialization before any CLI output is shown.The crash occurs inside the
go-m1cpudependency during CGO execution:This happens instantly when executing:
Expected Behavior:
pdtmshould start normally and display help output, version information, or available commands without crashing.Steps To Reproduce:
Environment:
go installAnything else:
The crash appears to originate from the
github.com/shoenig/go-m1cpudependency during initialization.The binary is correctly built for arm64, and reinstalling or clearing Go caches does not resolve the issue.
Stack trace suggests incompatibility between
go-m1cpuand macOS 26 system-level APIs or sysctl behavior, causing a null pointer dereference during CGO initialization.