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
User builds do not have su, so when the bugreport attempts to report
disk free space, the command fails and nothing is reported. However,
the df command does not need to be run as root to report free space,
so just run the command directly.
Change-Id: Ic7deb696f293e772ddf28eacfe16e4250af9a9f3
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
Dump /d/extfrag/unusable_index in bugreports. It shows the
percentage of memory in each zone that is not available for
allocations for each order.
Change-Id: I2af6680cb609887ea7b3d6107d1aa88bd0206b52
When "adb bugreport" was run on previous adb releases, it
called "adb shell dumpstate". In later versions of Android,
this was changed to "adb shell bugreport", which starts
the dumpstate service.
Modify the dumpstate command so that it calls bugreport
when it's not running as root. This allows both
"adb shell dumpstate" and "adb shell bugreport" to have
the exact same output.
Bug: 6391938
Change-Id: Ia32bb9ebc579db3bee7caa0fe66dc3f124d60a12
The newer kernels now have /proc/net/xt_qtaguid/iface_stat_fmt.
Add the extra iptables output and remove ip6tables for nat which doesn't
exist.
Change-Id: I819c707b337a707ca0acd87d9ab38cd68ca0f36c
adb bugreport > b & sleep 5; kill $?
will show that a bunch of tools will SIGPIPE when trying to output data
which is normal.
We don't have a way on linux (bsd yes), to set NOSIGPIPE on the file desc
passed down via fork/exec.
Bug: 6447319
Change-Id: I25b30a823addcff89d252f162d0a07035d4fdd3f
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