mitre / saf_action

GitHub Action for SAF CLI
https://github.com/marketplace/actions/saf-cli-action
Other
6 stars 0 forks source link

`npm test` segfaults #60

Closed wdower closed 2 months ago

wdower commented 8 months ago

SAF action tests are failing both locally invoking pipeline on my Mac (M2 Pro Sonoma 14.2) and the repo test actions (Ubuntu 22), same reason -- cryptic segfault. Tracking this issue in branch segfault.

I installed segfault-handler to see if we could get some better crash logs.

Using NPM 18.18.2

Local output:

$> npm test --verbose                            
npm verb cli /Users/wdower/.nvm/versions/node/v18.18.2/bin/node /Users/wdower/.nvm/versions/node/v18.18.2/bin/npm
npm info using npm@9.8.1
npm info using node@v18.18.2
npm verb title npm test
npm verb argv "test" "--loglevel" "verbose"
npm verb logfile logs-max:10 dir:/Users/wdower/.npm/_logs/2024-01-22T16_52_53_743Z-
npm verb logfile /Users/wdower/.npm/_logs/2024-01-22T16_52_53_743Z-debug-0.log

> saf_action@1.5.3 test
> jest

 RUNS  test/index.test.js
PID 19852 received SIGSEGV for address: 0x0
0   segfault-handler.node               0x0000000107501184 _ZL16segfault_handleriP9__siginfoPv + 296
1   libsystem_platform.dylib            0x00000001877a1a24 _sigtramp + 56
2   node                                0x00000001020c6fcc _ZN4node6loaderL23ImportModuleDynamicallyEN2v85LocalINS1_7ContextEEENS2_INS1_4DataEEENS2_INS1_5ValueEEENS2_INS1_6StringEEENS2_INS1_10FixedArrayEEE + 232
3   node                                0x000000010239ddb8 _ZN2v88internal7Isolate38RunHostImportModuleDynamicallyCallbackENS0_6HandleINS0_6ScriptEEENS2_INS0_6ObjectEEENS0_11MaybeHandleIS5_EE + 852
4   node                                0x0000000102780128 _ZN2v88internal25Runtime_DynamicImportCallEiPmPNS0_7IsolateE + 276
5   node                                0x0000000102ac904c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit + 108
6   ???                                 0x0000000107be78a4 0x0 + 4424890532
7   node                                0x0000000102a85ef4 Builtins_AsyncFunctionAwaitResolveClosure + 84
8   node                                0x0000000102b14738 Builtins_PromiseFulfillReactionJob + 56
9   node                                0x0000000102a77c4c Builtins_RunMicrotasks + 588
10  node                                0x0000000102a523a4 Builtins_JSRunMicrotasksEntry + 164
11  node                                0x0000000102383d38 _ZN2v88internal12_GLOBAL__N_16InvokeEPNS0_7IsolateERKNS1_12InvokeParamsE + 2680
12  node                                0x0000000102384228 _ZN2v88internal12_GLOBAL__N_118InvokeWithTryCatchEPNS0_7IsolateERKNS1_12InvokeParamsE + 88
13  node                                0x0000000102384404 _ZN2v88internal9Execution16TryRunMicrotasksEPNS0_7IsolateEPNS0_14MicrotaskQueueEPNS0_11MaybeHandleINS0_6ObjectEEE + 64
14  node                                0x00000001023aab6c _ZN2v88internal14MicrotaskQueue13RunMicrotasksEPNS0_7IsolateE + 336
15  node                                0x00000001023ab308 _ZN2v88internal14MicrotaskQueue17PerformCheckpointEPNS_7IsolateE + 124
16  node                                0x0000000102044c4c _ZN4node21InternalCallbackScope5CloseEv + 240
17  node                                0x00000001020447c4 _ZN4node21InternalCallbackScopeD1Ev + 20
18  node                                0x0000000102103464 _ZN4node2fs10FileHandle8CloseReq7ResolveEv + 156
19  node                                0x0000000102119ef8 _ZZN4node2fs10FileHandle12ClosePromiseEvEN3$_08__invokeEP7uv_fs_s + 564
20  node                                0x00000001020fbbb0 _ZN4node24MakeLibuvRequestCallbackI7uv_fs_sPFvPS1_EE7WrapperES2_ + 116
21  node                                0x0000000102a302e8 uv__work_done + 192
22  node                                0x0000000102a33aa4 uv__async_io + 320
23  node                                0x0000000102a46058 uv__io_poll + 1044
24  node                                0x0000000102a33f74 uv_run + 404
25  node                                0x00000001020456e0 _ZN4node13SpinEventLoopEPNS_11EnvironmentE + 248
26  node                                0x000000010213c850 _ZN4node16NodeMainInstance3RunEv + 196
27  node                                0x00000001020cc6a4 _ZN4node22LoadSnapshotDataAndRunEPPKNS_12SnapshotDataEPKNS_20InitializationResultE + 460
28  node                                0x00000001020cc95c _ZN4node5StartEiPPc + 612
29  dyld                                0x00000001873f10e0 start + 2360
[1]    19836 segmentation fault  npm test --verbose
Amndeep7 commented 7 months ago

This is due to some dependency in oclif failing when dynamically imported. Nominally they've removed that dependency so I'm hopeful that this will work now.

Amndeep7 commented 7 months ago

https://github.com/mitre/saf_action/actions/runs/8076735077/job/22065687152

Not to be :(

Amndeep7 commented 3 months ago

No longer segfaults for some reason? We can keep this issue open for another release maybe to confirm, but everything was hunkydory today.