@@ -367,60 +367,69 @@ jobs:
367
367
timeout-minutes : 15
368
368
working-directory : build
369
369
run : |
370
+ ulimit -c unlimited
370
371
./tests/test-erlang -s prime_smp
371
372
valgrind ./tests/test-erlang -s prime_smp
372
373
373
374
- name : " Test: test-enif"
374
375
working-directory : build
375
376
run : |
377
+ ulimit -c unlimited
376
378
./tests/test-enif
377
379
valgrind ./tests/test-enif
378
380
379
381
- name : " Test: test-mailbox"
380
382
working-directory : build
381
383
run : |
384
+ ulimit -c unlimited
382
385
./tests/test-mailbox
383
386
valgrind ./tests/test-mailbox
384
387
385
388
- name : " Test: test-structs"
386
389
timeout-minutes : 10
387
390
working-directory : build
388
391
run : |
392
+ ulimit -c unlimited
389
393
./tests/test-structs
390
394
valgrind ./tests/test-structs
391
395
392
396
- name : " Test: test_etest.avm"
393
397
timeout-minutes : 5
394
398
working-directory : build
395
399
run : |
400
+ ulimit -c unlimited
396
401
./src/AtomVM ./tests/libs/etest/test_etest.avm
397
402
valgrind ./src/AtomVM ./tests/libs/etest/test_etest.avm
398
403
399
404
- name : " Test: test_estdlib.avm"
400
405
timeout-minutes : 5
401
406
working-directory : build
402
407
run : |
408
+ ulimit -c unlimited
403
409
./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm
404
410
valgrind ./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm
405
411
406
412
- name : " Test: test_eavmlib.avm"
407
413
timeout-minutes : 10
408
414
working-directory : build
409
415
run : |
416
+ ulimit -c unlimited
410
417
./src/AtomVM ./tests/libs/eavmlib/test_eavmlib.avm
411
418
valgrind ./src/AtomVM ./tests/libs/eavmlib/test_eavmlib.avm
412
419
413
420
- name : " Test: test_alisp.avm"
414
421
timeout-minutes : 10
415
422
working-directory : build
416
423
run : |
424
+ ulimit -c unlimited
417
425
./src/AtomVM ./tests/libs/alisp/test_alisp.avm
418
426
valgrind ./src/AtomVM ./tests/libs/alisp/test_alisp.avm
419
427
420
428
- name : " Test: Tests.avm (Elixir)"
421
429
timeout-minutes : 10
422
430
working-directory : build
423
431
run : |
432
+ ulimit -c unlimited
424
433
if command -v elixirc &> /dev/null
425
434
then
426
435
./src/AtomVM ./tests/libs/exavmlib/Tests.avm
@@ -430,7 +439,40 @@ jobs:
430
439
- name : " Install and smoke test"
431
440
working-directory : build
432
441
run : |
442
+ ulimit -c unlimited
433
443
sudo PATH=${PATH} make install
434
444
atomvm examples/erlang/hello_world.avm
435
445
atomvm -v
436
446
atomvm -h
447
+
448
+ - name : " Run coredumpctl info"
449
+ if : ${{ failure() }}
450
+ run : |
451
+ # Wait until systemd-coredump finished
452
+ while ps x | grep -cE 'systemd-[c]oredump'; do
453
+ echo systemd-coredump is still running
454
+ sleep 1
455
+ done
456
+ # info works on all versions of ubuntu
457
+ coredumpctl info || true
458
+ # The following only works on recent versions of ubuntu
459
+ coredumpctl debug --debugger-arguments="-batch -ex 'info all-registers'" || true
460
+ coredumpctl debug --debugger-arguments="-batch -ex 'info threads'" || true
461
+ coredumpctl debug --debugger-arguments="-batch -ex 'thread apply all bt full'" || true
462
+ coredumpctl debug --debugger-arguments='-batch -ex "display /10i $pc"' || true
463
+ coredumpctl dump -o core.dump || true
464
+ if [ -e core.dump ]; then
465
+ mkdir core
466
+ mv core.dump core/
467
+ cp build/src/AtomVM core/
468
+ cp build/tests/test-* core/
469
+ fi
470
+
471
+ - name : " Upload any dumped core"
472
+ uses : actions/upload-artifact@v4
473
+ if : ${{ failure() }}
474
+ with :
475
+ name : core-${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.otp }}-${{ github.run_id }}-${{ github.run_attempt }}
476
+ path : |
477
+ core/*
478
+ retention-days : 5
0 commit comments