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

SEGV in cross test that use QEMU #136

Open
cjyar opened this issue Apr 15, 2020 · 2 comments
Open

SEGV in cross test that use QEMU #136

cjyar opened this issue Apr 15, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@cjyar
Copy link
Contributor

cjyar commented Apr 15, 2020

Fiddle:ironoxide chris$ cross test --no-default-features --features "blocking beta tls-vendored-openssl" --target armv7-linux-androideabi
...
test crypto::aes::tests::test_parallel_encrypt ... libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x813ceed4 in tid 82 (qemu-arm)
libc: Unable to open connection to debuggerd: Connection refused
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
error: test failed, to rerun pass '--lib'

Caused by:
  process didn't exit successfully: `qemu-arm /target/armv7-linux-androideabi/debug/deps/ironoxide-c38a6b0d31c7f14c` (signal: 11, SIGSEGV: invalid memory reference)

This does not happen every time; it failed 8/10 times on my machine.

@cjyar cjyar added the bug Something isn't working label Apr 15, 2020
@cjyar
Copy link
Contributor Author

cjyar commented Apr 15, 2020

I got this on aarch64-linux-android, which seems even more concerning:

test crypto::aes::tests::test_parallel_encrypt ... libc: Fatal signal 11 (SIGSEGV), code 0, fault addr 0x0 in tid 21 ()
libc: Fatal signal 4 (SIGILL), code 2, fault addr 0x4004227030 in tid 23 (qemu-aarch64)
libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4802102498 in tid 22 (qemu-aarch64)
libclibc: Unable to open connection to debuggerd: Connection refused
: Unable to open connection to debuggerd: Connection refused
libc: Unable to open connection to debuggerd: Connection refused
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
error: test failed, to rerun pass '--lib'

Caused by:
  process didn't exit successfully: `qemu-aarch64 /target/aarch64-linux-android/debug/deps/ironoxide-c26b43cb4deb804d` (signal: 4, SIGILL: illegal instruction)

@clintfred
Copy link
Contributor

Reading the cross docs:

Also, testing is very slow. cross test runs units tests sequentially because QEMU gets upset when you spawn multiple threads. This means that, if one of your unit tests spawns threads, then it's more likely to fail or, worst, never terminate.

So that's probably the issue as the test in question is using std::thread::spawn which is maybe a bad idea anyway....

@clintfred clintfred changed the title SEGV in cross test SEGV in cross test that use QEMU Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants