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

pthreads tracing seems to not work in docker #220

Open
cromize opened this issue May 4, 2019 · 4 comments
Open

pthreads tracing seems to not work in docker #220

cromize opened this issue May 4, 2019 · 4 comments

Comments

@cromize
Copy link
Contributor

cromize commented May 4, 2019

Threads ruined my CTF.

I was using qira inside docker on latest linux kernel and found out that code in threads is not traced. Tried to run manual thread test and indeed it failed to trace thread code. I tried to run older releases without docker with no problem.

Today I tried to run same test in vagrant 14.04 trusty vm and it successfully traced pthreads. I have no idea where to even start investigating this. (maybe docker syscall translation/isolation?)

Noticed there is occasional qemu: uncaught target signal 11 (Segmentation fault) after few seconds when running thread_test.c in pthread-working qira. (trusty 14.04 vagrant)

Docker version 18.06.1-ce, build e68fc7a
Ubuntu 18.04.2 LTS

@cromize
Copy link
Contributor Author

cromize commented May 4, 2019

Also occasional qemu: uncaught target signal 4 (Illegal instruction) when running thread_test.c.

@janbbeck
Copy link
Contributor

I just tried the thread_test.c example in tests_manual under Ubuntu 14.04 not using Docker for qira.
The executable runs fine by itself.
Plain qira results in a segmentation fault right away.
qira --pin works fine. showing the threads and all.

@cromize
Copy link
Contributor Author

cromize commented May 13, 2019

Thread tracing also fails on macOS docker, even with turned off seccomp.

@cromize
Copy link
Contributor Author

cromize commented May 26, 2019

Thread tracing works on qemu-3.1.0 in docker ubuntu 18.04 #210 . Older patched qemu doesn't work in 16.04 or 14.04 docker, while unpatched works fine.

root@35dbd5416858:/qira/tracers/qemu# ./qira-x86_64 ../../tests_manual/thread_test
*** longjmp causes uninitialized stack frame ***: ./qira-x86_64 terminated

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

2 participants