@@ -331,53 +331,61 @@ jobs:
331
331
timeout-minutes : 15
332
332
working-directory : build
333
333
run : |
334
+ ulimit -c unlimited
334
335
./tests/test-erlang -s prime_smp
335
336
valgrind ./tests/test-erlang -s prime_smp
336
337
337
338
- name : " Test: test-enif"
338
339
working-directory : build
339
340
run : |
341
+ ulimit -c unlimited
340
342
./tests/test-enif
341
343
valgrind ./tests/test-enif
342
344
343
345
- name : " Test: test-mailbox"
344
346
working-directory : build
345
347
run : |
348
+ ulimit -c unlimited
346
349
./tests/test-mailbox
347
350
valgrind ./tests/test-mailbox
348
351
349
352
- name : " Test: test-structs"
350
353
timeout-minutes : 10
351
354
working-directory : build
352
355
run : |
356
+ ulimit -c unlimited
353
357
./tests/test-structs
354
358
valgrind ./tests/test-structs
355
359
356
360
- name : " Test: test_estdlib.avm"
357
361
timeout-minutes : 5
358
362
working-directory : build
359
363
run : |
364
+ ulimit -c unlimited
360
365
./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm
361
366
valgrind ./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm
362
367
363
368
- name : " Test: test_eavmlib.avm"
364
369
timeout-minutes : 10
365
370
working-directory : build
366
371
run : |
372
+ ulimit -c unlimited
367
373
./src/AtomVM ./tests/libs/eavmlib/test_eavmlib.avm
368
374
valgrind ./src/AtomVM ./tests/libs/eavmlib/test_eavmlib.avm
369
375
370
376
- name : " Test: test_alisp.avm"
371
377
timeout-minutes : 10
372
378
working-directory : build
373
379
run : |
380
+ ulimit -c unlimited
374
381
./src/AtomVM ./tests/libs/alisp/test_alisp.avm
375
382
valgrind ./src/AtomVM ./tests/libs/alisp/test_alisp.avm
376
383
377
384
- name : " Test: Tests.avm (Elixir)"
378
385
timeout-minutes : 10
379
386
working-directory : build
380
387
run : |
388
+ ulimit -c unlimited
381
389
if command -v elixirc &> /dev/null
382
390
then
383
391
./src/AtomVM ./tests/libs/exavmlib/Tests.avm
@@ -387,7 +395,40 @@ jobs:
387
395
- name : " Install and smoke test"
388
396
working-directory : build
389
397
run : |
398
+ ulimit -c unlimited
390
399
sudo PATH=${PATH} make install
391
400
atomvm examples/erlang/hello_world.avm
392
401
atomvm -v
393
402
atomvm -h
403
+
404
+ - name : " Run coredumpctl info"
405
+ if : ${{ failure() }}
406
+ run : |
407
+ # Wait until systemd-coredump finished
408
+ while ps x | grep -cE 'systemd-[c]oredump'; do
409
+ echo systemd-coredump is still running
410
+ sleep 1
411
+ done
412
+ # info works on all versions of ubuntu
413
+ coredumpctl info || true
414
+ # The following only works on recent versions of ubuntu
415
+ coredumpctl debug --debugger-arguments="-batch -ex 'info all-registers'" || true
416
+ coredumpctl debug --debugger-arguments="-batch -ex 'info threads'" || true
417
+ coredumpctl debug --debugger-arguments="-batch -ex 'thread apply all bt full'" || true
418
+ coredumpctl debug --debugger-arguments='-batch -ex "display /10i $pc"' || true
419
+ coredumpctl dump -o core.dump || true
420
+ if [ -e core.dump ]; then
421
+ mkdir core
422
+ mv core.dump core/
423
+ cp build/src/AtomVM core/
424
+ cp build/tests/test-* core/
425
+ fi
426
+
427
+ - name : " Upload any dumped core"
428
+ uses : actions/upload-artifact@v4
429
+ if : ${{ failure() }}
430
+ with :
431
+ name : core-${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.otp }}-${{ github.run_id }}-${{ github.run_attempt }}
432
+ path : |
433
+ core/*
434
+ retention-days : 5
0 commit comments