JuliaEcosystem / PackageAnalyzer.jl

https://juliaecosystem.github.io/PackageAnalyzer.jl/dev/
MIT License
58 stars 5 forks source link

Occasional go panic on apple silicon #77

Closed ericphanson closed 4 months ago

ericphanson commented 1 year ago

xref https://github.com/JuliaPackaging/Yggdrasil/pull/5612#issuecomment-1264392859

I have seen it occasionally since then, e.g. running the tests twice in a row on Julia 1.8.3, apple m1 macbook:

julia> include("test/runtests.jl")
┌ Warning: Skipping contributors tests since `PackageAnalyzer.github_auth()` is anonymous
└ @ Main ~/PackageAnalyzer.jl/test/runtests.jl:297
Test Summary:   | Pass  Total   Time
PackageAnalyzer |  161    161  24.3s
Test.DefaultTestSet("PackageAnalyzer", Any[Test.DefaultTestSet("Basic", Any[], 22, false, false, true, 1.669392415456484e9, 1.669392423761484e9), Test.DefaultTestSet("find_packages_in_manifest", Any[], 4, false, false, true, 1.669392423761518e9, 1.669392423906875e9), Test.DefaultTestSet("`analyze`", Any[], 73, false, false, true, 1.669392423906897e9, 1.6693924267449e9), Test.DefaultTestSet("`find_packages` with `analyze`", Any[], 17, false, false, true, 1.669392426744925e9, 1.669392427612922e9), Test.DefaultTestSet("`analyze`", Any[], 3, false, false, true, 1.669392427612941e9, 1.669392428080022e9), Test.DefaultTestSet("`subdir` support", Any[], 9, false, false, true, 1.669392428080118e9, 1.669392431151904e9), Test.DefaultTestSet("`parse_project`", Any[], 6, false, false, true, 1.669392431151946e9, 1.669392431164362e9), Test.DefaultTestSet("`show`", Any[], 7, false, false, true, 1.669392431164397e9, 1.669392431300926e9), Test.DefaultTestSet("analyze from `Added`", Any[], 4, false, false, true, 1.669392431300946e9, 1.669392433403312e9), Test.DefaultTestSet("analyze from `Dev`", Any[], 4, false, false, true, 1.669392433403331e9, 1.669392433414586e9), Test.DefaultTestSet("0-arg analyze", Any[], 2, false, false, true, 1.6693924334146e9, 1.669392433457685e9), Test.DefaultTestSet("Contributors", Any[], 0, false, false, true, 1.669392433457702e9, 1.669392433473453e9), Test.DefaultTestSet("`find_packages_in_manifest`: advanced", Any[], 4, false, false, true, 1.669392433473482e9, 1.66939243904222e9), Test.DefaultTestSet("Multi-registry `find_package`", Any[], 5, false, false, true, 1.669392439042248e9, 1.669392439738644e9), Test.DefaultTestSet("Thread-safety", Any[], 1, false, false, true, 1.669392439738666e9, 1.669392439738691e9)], 0, false, false, true, 1.669392415448642e9, 1.669392439738695e9)

julia> include("test/runtests.jl")
signal 16 received but handler not on signal stack
fatal error: non-Go code set up signal handler without SA_ONSTACK flag

runtime stack:
runtime.throw({0x166e8726b?, 0x14000051680?})
        /opt/x86_64-linux-musl/go/src/runtime/panic.go:1047 +0x40 fp=0x14002169630 sp=0x14002169600 pc=0x166dfa580
runtime.sigNotOnStack(0x10)
        /opt/x86_64-linux-musl/go/src/runtime/signal_unix.go:1020 +0x5c fp=0x14002169650 sp=0x14002169630 pc=0x166e0f70c
runtime.adjustSignalStack(0x10, 0x14000050000, 0x140021696f8)
        /opt/x86_64-linux-musl/go/src/runtime/signal_unix.go:581 +0x250 fp=0x140021696c0 sp=0x14002169650 pc=0x166e0ea10
runtime.sigtrampgo(0x10, 0x14002169860, 0x140021698c8)
        /opt/x86_64-linux-musl/go/src/runtime/signal_unix.go:469 +0x174 fp=0x14002169740 sp=0x140021696c0 pc=0x166e0e664
runtime.sigtrampgo(0x10, 0x14002169860, 0x140021698c8)
        <autogenerated>:1 +0x1c fp=0x14002169770 sp=0x14002169740 pc=0x166e27d1c
runtime.sigtramp()
        /opt/x86_64-linux-musl/go/src/runtime/sys_darwin_arm64.s:227 +0x4c fp=0x14002169830 sp=0x14002169770 pc=0x166e272cc

goroutine 18 [syscall, locked to thread]:
runtime.goexit()
        /opt/x86_64-linux-musl/go/src/runtime/asm_arm64.s:1165 +0x4 fp=0x1400005ffe0 sp=0x1400005ffe0 pc=0x166e26534

goroutine 6 [GC worker (idle), 1 minutes]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:363 +0xe4 fp=0x1400004e740 sp=0x1400004e720 pc=0x166dfcec4
runtime.gcBgMarkWorker()
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1235 +0xec fp=0x1400004e7d0 sp=0x1400004e740 pc=0x166de15cc
runtime.goexit()
        /opt/x86_64-linux-musl/go/src/runtime/asm_arm64.s:1165 +0x4 fp=0x1400004e7d0 sp=0x1400004e7d0 pc=0x166e26534
created by runtime.gcBgMarkStartWorkers
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1159 +0x28

goroutine 17 [running, locked to thread]:
        goroutine running on other thread; stack unavailable

goroutine 2 [force gc (idle), 1 minutes]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:363 +0xe4 fp=0x1400004cfa0 sp=0x1400004cf80 pc=0x166dfcec4
runtime.goparkunlock(...)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:369
runtime.forcegchelper()
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:302 +0xb4 fp=0x1400004cfd0 sp=0x1400004cfa0 pc=0x166dfcd54
runtime.goexit()
        /opt/x86_64-linux-musl/go/src/runtime/asm_arm64.s:1165 +0x4 fp=0x1400004cfd0 sp=0x1400004cfd0 pc=0x166e26534
created by runtime.init.6
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:290 +0x24

goroutine 3 [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:363 +0xe4 fp=0x1400004d770 sp=0x1400004d750 pc=0x166dfcec4
runtime.goparkunlock(...)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:369
runtime.bgsweep(0x0?)
        /opt/x86_64-linux-musl/go/src/runtime/mgcsweep.go:297 +0x10c fp=0x1400004d7b0 sp=0x1400004d770 pc=0x166dead7c
runtime.gcenable.func1()
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:178 +0x28 fp=0x1400004d7d0 sp=0x1400004d7b0 pc=0x166ddf3d8
runtime.goexit()
        /opt/x86_64-linux-musl/go/src/runtime/asm_arm64.s:1165 +0x4 fp=0x1400004d7d0 sp=0x1400004d7d0 pc=0x166e26534
created by runtime.gcenable
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:178 +0x70

goroutine 4 [GC scavenge wait]:
runtime.gopark(0x28050e6?, 0x6553f100?, 0x0?, 0x0?, 0x0?)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:363 +0xe4 fp=0x1400004df50 sp=0x1400004df30 pc=0x166dfcec4
runtime.goparkunlock(...)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:369
runtime.(*scavengerState).park(0x1672a2760)
        /opt/x86_64-linux-musl/go/src/runtime/mgcscavenge.go:389 +0x5c fp=0x1400004df80 sp=0x1400004df50 pc=0x166de8cdc
runtime.bgscavenge(0x0?)
        /opt/x86_64-linux-musl/go/src/runtime/mgcscavenge.go:622 +0xac fp=0x1400004dfb0 sp=0x1400004df80 pc=0x166de92dc
runtime.gcenable.func2()
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:179 +0x28 fp=0x1400004dfd0 sp=0x1400004dfb0 pc=0x166ddf378
runtime.goexit()
        /opt/x86_64-linux-musl/go/src/runtime/asm_arm64.s:1165 +0x4 fp=0x1400004dfd0 sp=0x1400004dfd0 pc=0x166e26534
created by runtime.gcenable
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:179 +0xb4

goroutine 5 [finalizer wait, 1 minutes]:
runtime.gopark(0x60000000000000?, 0x0?, 0x8?, 0xc1?, 0x2000000000?)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:363 +0xe4 fp=0x1400004c580 sp=0x1400004c560 pc=0x166dfcec4
runtime.goparkunlock(...)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:369
runtime.runfinq()
        /opt/x86_64-linux-musl/go/src/runtime/mfinal.go:180 +0x128 fp=0x1400004c7d0 sp=0x1400004c580 pc=0x166dde5f8
runtime.goexit()
        /opt/x86_64-linux-musl/go/src/runtime/asm_arm64.s:1165 +0x4 fp=0x1400004c7d0 sp=0x1400004c7d0 pc=0x166e26534
created by runtime.createfing
        /opt/x86_64-linux-musl/go/src/runtime/mfinal.go:157 +0x94

goroutine 19 [GC worker (idle)]:
runtime.gopark(0x583c92f2ffae?, 0x1?, 0x4b?, 0x16?, 0x0?)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:363 +0xe4 fp=0x14000048740 sp=0x14000048720 pc=0x166dfcec4
runtime.gcBgMarkWorker()
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1235 +0xec fp=0x140000487d0 sp=0x14000048740 pc=0x166de15cc
runtime.goexit()
        /opt/x86_64-linux-musl/go/src/runtime/asm_arm64.s:1165 +0x4 fp=0x140000487d0 sp=0x140000487d0 pc=0x166e26534
created by runtime.gcBgMarkStartWorkers
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1159 +0x28

goroutine 35 [GC worker (idle)]:
runtime.gopark(0x583c92f27337?, 0x1?, 0x92?, 0x80?, 0x0?)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:363 +0xe4 fp=0x14000094740 sp=0x14000094720 pc=0x166dfcec4
runtime.gcBgMarkWorker()
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1235 +0xec fp=0x140000947d0 sp=0x14000094740 pc=0x166de15cc
runtime.goexit()
        /opt/x86_64-linux-musl/go/src/runtime/asm_arm64.s:1165 +0x4 fp=0x140000947d0 sp=0x140000947d0 pc=0x166e26534
created by runtime.gcBgMarkStartWorkers
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1159 +0x28

goroutine 7 [GC worker (idle), 1 minutes]:
runtime.gopark(0x583c7fbfbb69?, 0x1?, 0x23?, 0xdd?, 0x0?)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:363 +0xe4 fp=0x1400004ef40 sp=0x1400004ef20 pc=0x166dfcec4
runtime.gcBgMarkWorker()
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1235 +0xec fp=0x1400004efd0 sp=0x1400004ef40 pc=0x166de15cc
runtime.goexit()
        /opt/x86_64-linux-musl/go/src/runtime/asm_arm64.s:1165 +0x4 fp=0x1400004efd0 sp=0x1400004efd0 pc=0x166e26534
created by runtime.gcBgMarkStartWorkers
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1159 +0x28

goroutine 20 [GC worker (idle), 1 minutes]:
runtime.gopark(0x1672d1bc0?, 0x1?, 0xad?, 0x9?, 0x0?)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:363 +0xe4 fp=0x14000048f40 sp=0x14000048f20 pc=0x166dfcec4
runtime.gcBgMarkWorker()
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1235 +0xec fp=0x14000048fd0 sp=0x14000048f40 pc=0x166de15cc
runtime.goexit()
        /opt/x86_64-linux-musl/go/src/runtime/asm_arm64.s:1165 +0x4 fp=0x14000048fd0 sp=0x14000048fd0 pc=0x166e26534
created by runtime.gcBgMarkStartWorkers
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1159 +0x28

goroutine 36 [GC worker (idle), 1 minutes]:
runtime.gopark(0x583c7fbffbdd?, 0x3?, 0xad?, 0x55?, 0x0?)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:363 +0xe4 fp=0x1400005df40 sp=0x1400005df20 pc=0x166dfcec4
runtime.gcBgMarkWorker()
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1235 +0xec fp=0x1400005dfd0 sp=0x1400005df40 pc=0x166de15cc
runtime.goexit()
        /opt/x86_64-linux-musl/go/src/runtime/asm_arm64.s:1165 +0x4 fp=0x1400005dfd0 sp=0x1400005dfd0 pc=0x166e26534
created by runtime.gcBgMarkStartWorkers
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1159 +0x28

goroutine 8 [GC worker (idle), 1 minutes]:
runtime.gopark(0x583c8925316d?, 0x3?, 0x7d?, 0x0?, 0x0?)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:363 +0xe4 fp=0x1400004f740 sp=0x1400004f720 pc=0x166dfcec4
runtime.gcBgMarkWorker()
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1235 +0xec fp=0x1400004f7d0 sp=0x1400004f740 pc=0x166de15cc
runtime.goexit()
        /opt/x86_64-linux-musl/go/src/runtime/asm_arm64.s:1165 +0x4 fp=0x1400004f7d0 sp=0x1400004f7d0 pc=0x166e26534
created by runtime.gcBgMarkStartWorkers
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1159 +0x28

goroutine 21 [GC worker (idle), 1 minutes]:
runtime.gopark(0x583c92f1cfa4?, 0x1?, 0x62?, 0x80?, 0x0?)
        /opt/x86_64-linux-musl/go/src/runtime/proc.go:363 +0xe4 fp=0x1400005af40 sp=0x1400005af20 pc=0x166dfcec4
runtime.gcBgMarkWorker()
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1235 +0xec fp=0x1400005afd0 sp=0x1400005af40 pc=0x166de15cc
runtime.goexit()
        /opt/x86_64-linux-musl/go/src/runtime/asm_arm64.s:1165 +0x4 fp=0x1400005afd0 sp=0x1400005afd0 pc=0x166e26534
created by runtime.gcBgMarkStartWorkers
        /opt/x86_64-linux-musl/go/src/runtime/mgc.go:1159 +0x28

signal (6): Abort trap: 6
in expression starting at /Users/eph/PackageAnalyzer.jl/test/runtests.jl:17
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
Allocations: 64193700 (Pool: 64150943; Big: 42757); GC: 49
(base) 

We do wrap the licensecheck call in a try-catch but that doesn't seem to be enough.

ericphanson commented 4 months ago

closing in favor of https://github.com/ericphanson/LicenseCheck.jl/issues/11