History log of /frameworks/native/cmds/dumpstate/utils.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
457731f69e3106b5aae8fc04f9565af1d875876c 14-Jan-2015 Christopher Ferris <cferris@google.com> Use the timeout stack dump functions.

Use the native stack dumping functions that allows time outs. If
debuggerd locks up, before a bugreport would hang forever. Now
it will timeout properly and still get all of the other information.

Bug: 18766581
Change-Id: I85053b8dcfe6224e2b64b4d8f7f2ef448b3cda34
/frameworks/native/cmds/dumpstate/utils.c
d195f87b2dd4aa731a21ef3acd321e2441c5bffb 10-Jan-2015 Christopher Ferris <cferris@google.com> Fix message when a command times out.

The previous version printed out the nanoseconds elapsed, not seconds.

Bug: 18766581

(cherry picked from commit 67c5a8af9ed128d8bb56d4723303aef6f0a4500f)

Change-Id: Icbaaee83a92767694fd98e3c790f36f4d24681b0
/frameworks/native/cmds/dumpstate/utils.c
1dc94e315680b47fe430ef90f46c50a25c92fb6d 11-Sep-2014 Jeff Brown <jeffbrown@google.com> Make dumpstate vibrate immediately.

Previously, the vibration was not performed until after stacks
were gathered which takes a long time. Moved the vibration
to happen earlier so we provide better user feedback for the
three-button salute when collecting a bug report.

Deleted some dead code for playing begin/end sounds.

Improved the timing measurement code to help track down why
bug reports are so slow. (They take over a minute now which
can cause us to lose valuable diagnostic information.)

Bug: 17474152
Change-Id: Iac73f7993d7dc85196aad96f459b22fd4a710f94
/frameworks/native/cmds/dumpstate/utils.c
89d4949f86f4f7b6710e951afefad186c667fd6e 09-Sep-2014 Christopher Ferris <cferris@google.com> Use time() instead of clock() for timeouts.

The clock() function returns the processor time used by the process. This
is not a good timeout mechanism since the code is suspended most of the
time waiting for the forked process to finish. Replace with the time()
function.

Bug: 17154069
Change-Id: Ib383329f9db269445d71a100553b08e71fddda3f
/frameworks/native/cmds/dumpstate/utils.c
2e671bbdb741c2926b6df7b240fdc31c7361f330 21-Aug-2014 Andres Morales <anmorales@google.com> Fix deadlock when killing adb bugreport

Leave default signal handler (terminate) for parent process,
add SIG_IGN as signal handler for children and let them
go down when the parent gets SIGPIPE.

Bug: 17109154
Change-Id: Id33db3e97a32f289eb2a9a1a0ca8acbe3dcd285d
/frameworks/native/cmds/dumpstate/utils.c
7dc7f3221f26b771c266a26ec785eb74287922f1 23-Jul-2014 Christopher Ferris <cferris@google.com> Add dumping of tombstones to dumpstate.

Dump only those tombstones modified within the last half an hour.

Change-Id: I8ce836b2e19eba7a9c0c31a4f312f9a382526da7
/frameworks/native/cmds/dumpstate/utils.c
0d6180f122127a9541e6193e0e6eceb5b08c608c 17-Jul-2014 Colin Cross <ccross@android.com> dumpstate: fix dumping traces for vm processes on 64-bit

dumpstate was not dumping any stack traces for vm processes because
it was failing the string compare for /system/bin/app_process.
64-bit devices use app_process32 and app_process64 instead of
app_process, and zygote64 alongside zygote. Change the string
matching to be prefix matching.

(cherry picked from commit 8eb25d552b07ffa799b7b61ad46d0109e7512741)

Change-Id: I6b1568161fae278f0e6107990e5b750cf0ca902b
/frameworks/native/cmds/dumpstate/utils.c
c88da7cc21c61b9ac8fcac11aa812f647ffb181c 09-Jul-2014 Sreeram Ramachandran <sreeram@google.com> resolved conflicts for merge of 928e05b1 to master

Change-Id: I1d1e623a1f95baa4375a87242ce71ea789884649
928e05b12b21a846ac956e83d46635bbab592ea7 09-Jul-2014 Sreeram Ramachandran <sreeram@google.com> am 0d2bee0c: Merge "Dump all the correct routing tables."

* commit '0d2bee0c0baec56ec98867d7e044602097525248':
Dump all the correct routing tables.
2b3bba34aec65b612be8d1f52cd124d9c30955f9 09-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Dump all the correct routing tables.

The list of tables is maintained in /data/misc/net/rt_tables by netd.

Change-Id: I55475c08c5e43bcf61af916210e680c47480ac32
/frameworks/native/cmds/dumpstate/utils.c
bd81c258c2ac9f41a9263a20953d6f0f63a88887 01-May-2014 Nick Vaccaro <nvaccaro@google.com> am 45fcfb48: am 85453ecc: dumpstate: increase poll timeout waiting for SIGQUIT logging

* commit '45fcfb48ef9e65747e7a3f35e1a4da232f6e161a':
dumpstate: increase poll timeout waiting for SIGQUIT logging
45fcfb48ef9e65747e7a3f35e1a4da232f6e161a 30-Apr-2014 Nick Vaccaro <nvaccaro@google.com> am 85453ecc: dumpstate: increase poll timeout waiting for SIGQUIT logging

* commit '85453ecc90a94564e586f0f97c9ec2c0cf831501':
dumpstate: increase poll timeout waiting for SIGQUIT logging
85453ecc90a94564e586f0f97c9ec2c0cf831501 30-Apr-2014 Nick Vaccaro <nvaccaro@google.com> dumpstate: increase poll timeout waiting for SIGQUIT logging

Increased the maximum time dumpstate will wait for SIGQUIT process
to finish dumping its thread stacks to the logfile to 5 seconds.

Bug: 14057177
Change-Id: I0b43004512855d202f2fe0ea7b0e934e77a3a070
/frameworks/native/cmds/dumpstate/utils.c
165c8bdfb585b224325423b21301620f9097dc64 13-Feb-2014 Nick Kralevich <nnk@google.com> am 0e4d2885: am 2044ac43: Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."

* commit '0e4d2885a34d31f5dbe5a08bdb654953abaf82a2':
Convert all selinux_android_restorecon and _setfilecon calls to new API.
26288202e7bdf2e897a11bf31a15685d7c20945f 07-Feb-2014 Stephen Smalley <sds@tycho.nsa.gov> Convert all selinux_android_restorecon and _setfilecon calls to new API.

libselinux selinux_android_restorecon API is changing to the more
general interface with flags and dropping the older variants.

Also get rid of the old, no longer used selinux_android_setfilecon API
and rename selinux_android_setfilecon2 to it as it is the only API in use.

Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
/frameworks/native/cmds/dumpstate/utils.c
5ecd4beef8f10f91febf916414c65d3d0e1cf734 29-Jan-2014 John Spurlock <jspurlock@google.com> Dump system settings for all users

Change-Id: Ic832b19fe698da1984876b2949c3f26990ae5076
/frameworks/native/cmds/dumpstate/utils.c
e167d889e4917e6b4f569026a1492b9e9818b08e 05-Apr-2013 Geremy Condra <gcondra@google.com> am a3d3e137: Merge "dumpstate: Add SELinux restorecon call."

* commit 'a3d3e137f473a965fefced9670e3b0c6b5f7f791':
dumpstate: Add SELinux restorecon call.
957983787d7a753d34b582ae0165160f4ebf815c 04-Apr-2013 Robert Craig <rpcraig@tycho.ncsc.mil> dumpstate: Add SELinux restorecon call.

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>
/frameworks/native/cmds/dumpstate/utils.c
27f9e6d849fce956c9b8f1ad5c3d9a954501a76b 13-Mar-2013 Jeff Sharkey <jsharkey@android.com> Support broadcast when dumpstate finishes.

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
/frameworks/native/cmds/dumpstate/utils.c
574d6902b7e30a1e9c2375481549c8e8a712d6e6 11-Mar-2013 jp abgrall <jpa@google.com> am ba8abb51: Merge "Ensure dumpstate children die"

* commit 'ba8abb517d1eddebeda62bf907fa446e3c3b81f6':
Ensure dumpstate children die
e7b6cf13f94f66ea446c95ab34040b0a577e43dc 07-Mar-2013 John Michelau <w14107@motorola.com> Ensure dumpstate children die

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
/frameworks/native/cmds/dumpstate/utils.c
1493a3974a725d6873f317b774be333ca035a64c 07-Nov-2012 Colin Cross <ccross@android.com> dumpstate: fix incorrectly zeroed array

Change-Id: I55a916568baf66629b02a6d80fce34b84ffb3a34
/frameworks/native/cmds/dumpstate/utils.c
0c22e8b31651caf12a2b4d4acef5bc65d486e570 02-Nov-2012 Colin Cross <ccross@android.com> dumpstate: dump all threads in show_wchan

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
/frameworks/native/cmds/dumpstate/utils.c
5f87b31d8076dff08b2363961b07fc052364fe95 17-Sep-2012 Elliott Hughes <enh@google.com> Use a named constant rather than a magic number.

Change-Id: I86e8c91c6f5628df3eec38faf28598cc8cef2ea3
/frameworks/native/cmds/dumpstate/utils.c
1fc4f80fc38f782f128102795481924a97a2d3c5 11-Sep-2012 James Dong <jdong@google.com> Add stack dump from drmserver process to bugreports

This would be helpful tracking down ANR issues in drmserver

o related-to-bug: 7132419

Change-Id: I7eceaa0c29af26bd0092110be6bddf8f4c063545
/frameworks/native/cmds/dumpstate/utils.c
bf7f49238d0af497d4300f7e611cf831854d6434 08-Jun-2012 Jeff Brown <jeffbrown@google.com> Include stack traces for certain native processes in bugreport.

Bug: 6615693
Change-Id: I64c3b3ce0bba62d9c332a795f7d979fb753dc27b
/frameworks/native/cmds/dumpstate/utils.c
d51820e8dea4f5bd9d06ff22335bead7409864b2 06-Apr-2012 Nick Kralevich <nnk@google.com> dumpstate: don't follow symlinks when creating /data/anr/traces.txt

Make Android more robust against symlink attacks when /data/anr
is world-writable.

Bug: 5614000
Change-Id: I9a7e4c4ec9aa4300ac30a968db0dcd276f364ab6
/frameworks/native/cmds/dumpstate/utils.c
c7f1fe26804ab986b90f3ba007db94f71e94932a 06-Apr-2012 Nick Kralevich <nnk@google.com> Ensure that /data/anr/traces.txt is world-writable

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
/frameworks/native/cmds/dumpstate/utils.c
f45fa6b2853cc32385375a0b63ee39ad6a968869 26-Mar-2012 Colin Cross <ccross@android.com> move dumpstate and dumpsys from frameworks/base to frameworks/native

Change-Id: I8a5318022ce5cd3e7c8055f21fe5da74639aa6c0
/frameworks/native/cmds/dumpstate/utils.c