Set the security context on the directory used
to dump Dalvik and native stack traces.
Change-Id: Iba13783f10e850485ce1a8d4aa5792d55085eb22
Signed-off-by: Robert Craig <rpcraig@tycho.ncsc.mil>
Add flag that sends BUGREPORT_FINISHED broadcast when dumpstate
is finished, including the resulting filesystem paths. Also reduces
directory creation to 0770.
Bug: 7005318
Change-Id: Id4c6b699a56f8acd859b7ab73368500e1a8f3c67
Use prctl(PR_SET_PDEATHSIG, SIGKILL) in each forked child to ensure
it dies when dumpstate dies.
This is important for two cases:
- dumpstate runs a timer for each child process. On expiration, it
sends SIGTERM to kill the process. Sometimes SIGTERM isn't enough
to kill a hung process, so the child lives on.
- When dumpstate is killed by the user before completing, outstanding
children continue to run and generate output.
Change-Id: I96e0dc918c26d56c9fee53611980ba2edd238712
for_each_pid only finds processes and not their threads. Add
for_each_tid and call it for show_wchan so we can see where all
threads are blocked in the kernel.
Change-Id: Iffb59f7c2933cecf51cdd358a36e19932c2f24c7
The umask changed for init. We have to force /data/anr to be world
readble and /data/anr/traces.txt to be world writable so dalvik
processes can write to it.
Hopefully this is a short term change while we investigate tightening
up these permissions.
Bug: 6300296
Change-Id: Iacb4c9f1bc69d2ac679697f9cf9a52694f888489