Skip to content

Commit af48881

Browse files
committed
Merge pull request #1484 from bettio/core-dumps-on-relese-0.6
Core dumps on relese-0.6 Just a backport of #1475 These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents be8c7e9 + ac619ec commit af48881

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/build-and-test.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,53 +331,61 @@ jobs:
331331
timeout-minutes: 15
332332
working-directory: build
333333
run: |
334+
ulimit -c unlimited
334335
./tests/test-erlang -s prime_smp
335336
valgrind ./tests/test-erlang -s prime_smp
336337
337338
- name: "Test: test-enif"
338339
working-directory: build
339340
run: |
341+
ulimit -c unlimited
340342
./tests/test-enif
341343
valgrind ./tests/test-enif
342344
343345
- name: "Test: test-mailbox"
344346
working-directory: build
345347
run: |
348+
ulimit -c unlimited
346349
./tests/test-mailbox
347350
valgrind ./tests/test-mailbox
348351
349352
- name: "Test: test-structs"
350353
timeout-minutes: 10
351354
working-directory: build
352355
run: |
356+
ulimit -c unlimited
353357
./tests/test-structs
354358
valgrind ./tests/test-structs
355359
356360
- name: "Test: test_estdlib.avm"
357361
timeout-minutes: 5
358362
working-directory: build
359363
run: |
364+
ulimit -c unlimited
360365
./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm
361366
valgrind ./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm
362367
363368
- name: "Test: test_eavmlib.avm"
364369
timeout-minutes: 10
365370
working-directory: build
366371
run: |
372+
ulimit -c unlimited
367373
./src/AtomVM ./tests/libs/eavmlib/test_eavmlib.avm
368374
valgrind ./src/AtomVM ./tests/libs/eavmlib/test_eavmlib.avm
369375
370376
- name: "Test: test_alisp.avm"
371377
timeout-minutes: 10
372378
working-directory: build
373379
run: |
380+
ulimit -c unlimited
374381
./src/AtomVM ./tests/libs/alisp/test_alisp.avm
375382
valgrind ./src/AtomVM ./tests/libs/alisp/test_alisp.avm
376383
377384
- name: "Test: Tests.avm (Elixir)"
378385
timeout-minutes: 10
379386
working-directory: build
380387
run: |
388+
ulimit -c unlimited
381389
if command -v elixirc &> /dev/null
382390
then
383391
./src/AtomVM ./tests/libs/exavmlib/Tests.avm
@@ -387,7 +395,40 @@ jobs:
387395
- name: "Install and smoke test"
388396
working-directory: build
389397
run: |
398+
ulimit -c unlimited
390399
sudo PATH=${PATH} make install
391400
atomvm examples/erlang/hello_world.avm
392401
atomvm -v
393402
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

Comments
 (0)