Commit graph

4 commits

Author SHA1 Message Date
Josh Gao
a7d7eb6d2a debuggerd_test: fix crasher path.
https://android-review.googlesource.com/#/c/331200 moved crasher to
using soong, which changed its location from /system/xbin/crasher to
/system/bin/crasher.

Bug: http://b/35100742
Test: /data/nativetest/debuggerd_test/debuggerd_test32
Test: /data/nativetest64/debuggerd_test/debuggerd_test64
Change-Id: I16a2050b257277023773cc0c960b5ab36e0c7cd4
2017-02-07 13:13:48 -08:00
Josh Gao
fca7ca3585 debuggerd_handler: properly crash when PR_GET_DUMPABLE is 0.
Actually exit when receiving a signal via kill(2) or raise(2) and
PR_GET_DUMPABLE is 0.

Bug: none
Test: /data/nativetest/debuggerd_test/debuggerd_test32
Test: /data/nativetest64/bionic-unit-tests/bionic-unit-tests --gtest_filter=pthread_DeathTest.pthread_mutex_lock_null_64
Change-Id: I833a2a34238129237bd9f953959ebda51d8d04d7
2017-01-23 14:13:36 -08:00
Josh Gao
7c6e3133f5 crash_dump: set a watchdog timer.
PTRACE_DETACH is only necessary if the process is in group-stop state,
the tracer exiting is sufficient to detach and resume tracees.

Using this, set a 5 second timer with alarm(2) that just kills us, to
avoid leaving processes stopped.

Bug: http://b/34472671
Test: debuggerd_test
Test: crasher + manually inserting a 10 second sleep into crash_dump
Change-Id: Iacaa796f79037aa1585f3f2159abe45ef0069311
2017-01-23 11:39:31 -08:00
Josh Gao
cbe70cb0a8 debuggerd: advance our amazing bet.
Remove debuggerd in favor of a helper process that gets execed by
crashing processes.

Bug: http://b/30705528
Test: debuggerd_test
Change-Id: I9906c69473989cbf7fe5ea6cccf9a9c563d75906
2017-01-17 13:57:57 -08:00