On 64 bit systems, calls to dump_backtrace_to_file or dump_tombstone
try and directly contact the correct debuggerd (32 bit vs 64 bit)
by reading the elf information for the executable.
Unfortunately, system_server makes a call to dump_backtrace_to_file
and it doesn't have permissions to read the executable data, so it
defaults to always contacting the 64 bit debuggerd.
This CL changes the code so that all dump requests go to the 64 bit
debuggerd, which reads the elf information and redirects requests for
32 bit processes to the 32 bit debuggerd.
Testing:
- Forced the watchdog code in system_server to dump stacks and
verified that all native stacks are dumped correctly.
- Verified that dumpstate and bugreport still properly dump the native
processes on a 64 bit and 32 bit system.
- Intentionally forced the 64 bit to 32 bit redirect to write only a
byte at a time and verified there are no errors, and no dropped data.
- Used debuggerd and debuggerd64 to dump 32 bit and 64 bit processes
seemlessly.
- Used debuggerd on a 32 bit system to dump native stacks.
Bug: https://code.google.com/p/android/issues/detail?id=97024
Change-Id: Ie01945153bdc1c4ded696c7334b61d58575314d1
Under some unknown circumstances, debuggerd could become unresponsive.
If you try and take a bugreport during this time, it will hang forever.
Adding functions that have a timeout will allow dumpstate to stop if
dumping is taking too long.
Bug: 18766581
(cherry picked from commit 5f2ff6a910)
Change-Id: I39e8e9c60209e3ef9efac795fedb8e1edce2bd3e
Packets captured and logged by the NFLOG target are unicast, so
extend to catch and decode them. To avoid escaping issues, the raw
contents are passed around as hex strings.
Bug: 18335678
Change-Id: Ib7299500baa00080a1f000f9da843eb527363353
This means that code that uses libcutils no longer has to ensure that
it's set ANDROID_SMP in the calling code's Android.mk for this to
function correctly.
Change-Id: I80c7ff170cd621106f34d6b74689d6b4f03e4eb7
This should not be committed until win_sdk and aarch64 builds are
fixed in the presence of this CL.
This reverts commit 2789faabfa.
We additionally remove uniprocessor support from the earlier CL,
thus avoiding a potential compiler code reordering issue.
Change-Id: I7207a5ca2efa907a6f757f172d7090a62b2311fe
When atrace_* functions are inlined,
the rarely used 1024-byte buffers are allocated on stack.
BUG: 17444504
Change-Id: I773512aeb70e8b79f3803c6d59cba064d2aa65b6
Replace atomic-inl.h with a file that just includes atomic.h.
Remove platform specific implementations.
Change-Id: If16d74fbe0af7836ed8c1296c17e13a2d0d20f64
On 64 bit systems, calling dump_backtrace_to_file will automatically
call debuggerd64. If the process to dump is actually 32 bit, this
creates an unrecognizable dump backtrace. Modify the code to check the
type of the process and connect to the appropriate debuggerd process.
This change refactors both the tombstone and backtrace functionality to
allow both to work properly on 64 bit systems when dealing with mixed
processes.
Bug: 17487122
(cherry picked from commit a9fa7b87f1)
Change-Id: I3c9e0212c8720877a6af092071a3695df2a36df8
On 64 bit systems, calling dump_backtrace_to_file will automatically
call debuggerd64. If the process to dump is actually 32 bit, this
creates an unrecognizable dump backtrace. Modify the code to check the
type of the process and connect to the appropriate debuggerd process.
This change refactors both the tombstone and backtrace functionality to
allow both to work properly on 64 bit systems when dealing with mixed
processes.
Bug: 17487122
Change-Id: Icf123a6f4508b1aeec073663aa1a0ceae5380aa1
These are no longer used, and we want to strongly discourage future use.
Keep the 32-bit variants while there are still uses. All users should move
to C11 or C++11 atomics.
(Resolved conflicts in atomic-...64.h with uniprocessor support
removal as in AOSP.)
Bug:16880454
Change-Id: I122b541cfd29ef4a6c932647f85d0d6a9d802061
(cherry picked from commit 9959ed9530)
These are no longer used, and we want to strongly discourage future use.
Keep the 32-bit variants while there are still uses. All users should move
to C11 or C++11 atomics.
Change-Id: I122b541cfd29ef4a6c932647f85d0d6a9d802061
Don't define char16_t on platforms where char16_t is a keyword, as
C11 and C++11 define it to be.
(cherry picked from commit dfdbe61d28)
Change-Id: I6717bc2133c1363ecd85861f3869e1eabd2ce96a
Looks like this got left behind in mips by mistake, and
84c3e99231 carried this over to mips64.
Clean up before it wastes any more time...
Change-Id: I6aeaa6e68be81f94065589337e2f7d3483e6e43c
* Read out system properties with same syntax as SystemProperties.java
* Also adds unit test suite to validate correctness of properties
* Also fixes buffer overrun in property_get
(cherry picked from commit d4507e9246)
Change-Id: Ifd42911f93e17da09e6ff1298e8875e02f3b6608