Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_estdlib.avm segfault #1533

Open
bettio opened this issue Feb 11, 2025 · 4 comments
Open

test_estdlib.avm segfault #1533

bettio opened this issue Feb 11, 2025 · 4 comments

Comments

@bettio
Copy link
Collaborator

bettio commented Feb 11, 2025

Run ulimit -c unlimited
I otp_socket: Peer closed connection. (/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_socket.c:1936)
I otp_socket: Peer closed connection. (/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_socket.c:1936)
/home/runner/work/_temp/941aafb2-76d3-4216-ab1a-b9ee80939e0e.sh: line 2: 14972 Segmentation fault      (core dumped) ./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm
+
Error: Process completed with exit code 139.

See also: https://github.com/atomvm/AtomVM/actions/runs/13269224177/job/37044417655

Core dump

SHA256 hash of uploaded artifact zip is 4d6332042a8070bf347773896b36274f27a952341be27007e4f478d4455331ca
Finalizing artifact upload
Artifact core-ubuntu-20.04-clang-10-26-13269224177-1.zip successfully finalized. Artifact ID 2573420704
Artifact core-ubuntu-20.04-clang-10-26-13269224177-1 has been successfully uploaded! Final size is 1500209 bytes. Artifact ID is 2573420704
Artifact download URL: https://github.com/atomvm/AtomVM/actions/runs/13269224177/artifacts/2573420704
``
[core-ubuntu-20.04-clang-10-26-13269224177-1.zip](https://github.com/user-attachments/files/18757389/core-ubuntu-20.04-clang-10-26-13269224177-1.zip)
@UncleGrumpy
Copy link
Collaborator

UncleGrumpy commented Feb 11, 2025

I can't find too much to go in here, a debug build with symbols included would probably have a lot more useful information.

(gdb) 

- [ ] bt full

#0  0x0000000000452d8a in context_destroy ()
No symbol table info available.
#1  0x000000000040a4ea in scheduler_entry_point ()
No symbol table info available.
#2  0x000000000048256f in scheduler_thread_entry_point ()
No symbol table info available.
#3  0x00007f85cbc68609 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#4  0x0000000000000000 in ?? ()
No symbol table info available.

I also get some warnings about mismatched library versions, a statically linked version of AtomVM would be much better for debugging on a different machine.

warning: .dynamic section for "/lib/x86_64-linux-gnu/librt.so.1" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/lib/x86_64-linux-gnu/libm.so.6" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/lib/x86_64-linux-gnu/libz.so.1" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/lib/x86_64-linux-gnu/libdl.so.2" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/lib/x86_64-linux-gnu/libpthread.so.0" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/lib/x86_64-linux-gnu/libc.so.6" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/lib64/ld-linux-x86-64.so.2" is not at the expected address (wrong library or version mismatch?)

@UncleGrumpy
Copy link
Collaborator

I am using gdb on Ubuntu 24.04, but making sure the installed library version matches the version used during the workflow run is very difficult.

@pguyot
Copy link
Collaborator

pguyot commented Feb 11, 2025

I'm pretty sure I know where this happen, as the same crash happened on ubuntu 24.04 where the stacktrace appears in CI logs. It's a problem in the ref count of resources.

I did fix something in #1498 but crashes still occurred. I have yet to fix the tests with emscripten.

@UncleGrumpy
Copy link
Collaborator

I just realized that workflow was run on 20.04, that explains the version errors, but regardless if these were statically linked, debug builds we would have a lot more information to work with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants