summaryrefslogtreecommitdiff
path: root/debuggerd
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-13.0.0_r52' of ↵George Zacharia2023-07-022-4/+66
|\ | | | | | | | | | | | | | | https://android.googlesource.com/platform/system/core into xb Android 13.0.0 Release 52 (TQ3A.230605.012) Change-Id: Idd86c936487bfbc0181743dccce9d1f9f08bbe5c
| * Display offset in backtraces if necessary.Christopher Ferris2023-02-012-4/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When moving to a proto tombstone, backtraces no longer contain an offset when a frame is in a shared library from an apk. Add the offset display again if needed, and add a test to verify this behavior. Bug: 267341682 Test: All unit tests pass. Test: Dumped a process running through an apk to verify the offset Test: is present. Change-Id: Ib720ccb5bfcc8531d1e407f3d01817e8a0b9128c (cherry picked from commit 22035ccb01693da3e0ec94776c86988c7d5c617e)
* | Merge tag 'android-13.0.0_r35' of ↵Julian Veit2023-04-112-3/+10
|\| | | | | | | | | | | | | | | https://android.googlesource.com/platform/system/core into HEAD Android 13.0.0 release 35 Change-Id: I504d275ce47138be6105b1f72e1956bada7f126d
| * Resolve ro.debuggable at build timeAlessandra Loro2022-11-012-3/+10
| | | | | | | | | | | | | | | | | | | | Ignore-AOSP-First: cherry-pick for tm-qpr-dev Test: n/a Bug: 193912100 Bug: 243645021 Merged-In: I83b0021b91536335c63d19f8a65933bad1b26b4e Change-Id: I42c4b1e81383d83c73a565c5e74ac22f17389faf
| * Fix check for thread unwind.Christopher Ferris2022-05-242-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | If a process requires executing fallback unwinder and the thread crashing is not the main thread, the wrong unwinder is used. Fix this case, and add a new unit test that causes an abort in the non main thread. Bug: 233721755 Test: New unit test passes with fix and fails without. Test: Ran debuggerd on swcodec process and it still dumps all threads. Change-Id: I70fffc5d680256ce867e7a1d427593b584259160
| * Merge "[GWP-ASan] Enable debuggerd to pull more allocation metadata."Mitch Phillips2022-04-212-4/+13
| |\
| | * [GWP-ASan] Enable debuggerd to pull more allocation metadata.Mitch Phillips2022-04-142-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the addition of runtime-configurable GWP-ASan, there might be many, many more than 1,000 allocations. Have support for them, but keep a hopefully-won't-crash-the-device limit. Bug: 219651032 Test: atest bionic-unit-tests Change-Id: I7b8e2bf5ab7c723ab6c61365f0dc610e400dbbce
| * | Update for SetProcessMemory removal.Christopher Ferris2022-04-192-5/+4
| | | | | | | | | | | | | | | | | | | | | Bug: 120606663 Test: All unit tests pass. Change-Id: Icf8a3ceb75b8962f8f215501c2bac631b40a1527
| * | Add hwasan presubmit for debuggerd.Florian Mayer2022-04-181-0/+5
| | | | | | | | | | | | Change-Id: Ic6b27b89470f4e8fb21dd29f8a8f486b528bdedc
| * | Skip debuggerd tests that do not apply to HWASan.Florian Mayer2022-04-151-0/+11
| | | | | | | | | | | | Change-Id: Ieab61dc61e11c3e55f116a45c37ceb805a6212e0
| * | Add two new crash commands.Christopher Ferris2022-04-132-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One is intentionally seeting the abort message. The other is to set the abort message to null. Also, make the libseccomp_policy static so that the crasher executable can be copied to the system afterwards without requiring libseccomp_policy.so. Test: Ran both new crash commands on device. Test: Ran the seccomp crash command to verify seccomp still works. Change-Id: I255b5f37e6eb188719e5b72302ca3f5911c8d821
| * | Make some debuggerd libraries available in apex com.android.virtShikha Panwar2022-04-052-0/+9
| | | | | | | | | | | | | | | | | | | | | Test: Build passed & tested the whole topic Bug:227443903 Change-Id: I113cd1e559307e191fec405206f23e1b4ce1a5fc
| * | Merge "Add Rust wrapper for tombstoned client using cxx."Treehugger Robot2022-04-045-0/+275
| |\ \ | | |/ | |/|
| | * Add Rust wrapper for tombstoned client using cxx.Andrew Walbran2022-03-305-0/+275
| | | | | | | | | | | | | | | | | | Bug: 226162295 Test: atest libtombstoned_client_rust_test Change-Id: Ibe7c41e2381f0f369a76175d6f71fc60b71cc7d5
| * | Symbolic constants for older minijailsRay Essick2022-03-212-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inline definitions of a few constants that don't appear on Q/R devices, so that this works for us in mainline modules that are loaded on those older devices. Bug: 225406881 Test: boot on Q, watch logcat Test: boot on R, watch logcat Change-Id: Ic5781976d4c1e2d16e230c015fc49d9fde74e289
| * | Update for accurate unreadable elf files.Christopher Ferris2022-03-154-13/+41
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The functionality moved from the Unwinder object to the MapInfo object and means that the individual unreadable files can be displayed now. Included adding the unreadable elfs per thread in the protobuf. Updated the unwinder test. Test: All unit tests pass. Change-Id: I7140bde16938736da005f926e10bbdb3dbc0f6f5
| * Remove dead non-proto tombstone reporting code.Peter Collingbourne2022-03-076-423/+0
| | | | | | | | | | Bug: 197981919 Change-Id: I58a98070198ef0b686229bd54f87b9073df12d66
| * Dump threads in tombstone fallback path.Christopher Ferris2022-02-168-147/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When dumping a tombstone using the fallback path, only the main thread was showing up. Modify the code to dump the threads using a slightly different path for the tombstone generation code. In addition, while looking at this code, two MTE variables were not set in the tombstone fallback code. Added those variables so MTE devices will work properly in this fallback path. Modified the tombstone unit tests for seccomp to have multiple threads and verify those threads show up in the tombstone. Bug: 208933016 Test: Ran unit tests. Test: Ran debuggerd <PID> on a privileged process and verified Test: all threads dumped. Also verified that the tagged_addr_ctrl Test: variable is present on the raven device. Change-Id: I16eadb0cc2c37a7dbc5cac16af9b5051008b5127
| * Make crash_dump.policy a dependency of crash_dump.Peter Collingbourne2022-02-021-0/+3
| | | | | | | | | | | | | | | | debuggerd_test depends on it, and the easiest way to ensure that the file is available when running the tests is to make it a dependency of crash_dump. Change-Id: Iebea8e0c49d8d49d52a434e4194e870793758988
| * Fix typo.Christopher Ferris2022-01-311-1/+1
| | | | | | | | | | | | | | | | Change use of new_ to old_ to save the old sigaction data. This hasn't caused any issues, but it's obviously wrong. Test: Ran unit tests on coral. Change-Id: I96be5b0980c323c3aeafb422fbc06202577604a2
| * Merge "debuggerd: add the PAC keys to the tombstones."Elliott Hughes2022-01-149-46/+91
| |\
| | * debuggerd: add the PAC keys to the tombstones.Elliott Hughes2022-01-139-46/+91
| | | | | | | | | | | | | | | | | | | | | | | | Hard to get otherwise if you're trying to debug PAC issues. Bug: http://b/214314197 Test: treehugger Change-Id: I2e5502809f84579bf287364e59d6e7ff67770919
| * | Update for MapInfo objects in frame data.Christopher Ferris2022-01-064-20/+16
| |/ | | | | | | | | | | | | | | | | | | | | The frame data no longer contains map_XXX fields which represent the map data. Now there is only a shared pointer to the MapInfo object with which this frame is associated. Bug: 120606663 Test: Unit tests pass. Change-Id: I89282963f742f6fcc07e48533da4108dc16bdce9
| * Remove non-protobuf path.Christopher Ferris2021-11-193-852/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | It is expensive to keep the non-protobuf path around and it hasn't been used for an entire release without anyone noticing, so remove it. Create new end-to-end unit tests that cover tests of the non-proto code paths that are being deleted. Bug: 197981919 Test: Unit tests pass. Change-Id: Ia1c45572300bd63e5f196ad61e5e5386830c8ece
| * Merge "Improvements to tombstone output."Treehugger Robot2021-11-124-18/+59
| |\
| | * Improvements to tombstone output.Peter Collingbourne2021-11-114-18/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use "likelihood" instead of "probability" since that has connotations of being less precise, and our probability ordering isn't very precise anyway. - Hide the fault address with SEGV_MTEAERR because it is not available. - Pad the fault address with leading zeroes to make it clearer which bits of the top byte (and any following bytes such as PAC signature bits) are set. Bug: 206015287 Change-Id: I5e1e99b7f3e967c44781d8550bbd7158eb421b64
| * | Merge "Add a human readable description of the tagged_addr_ctrl value to ↵Peter Collingbourne2021-11-107-3/+69
| |\ \ | | |/ | |/| | | | tombstones."
| | * Add a human readable description of the tagged_addr_ctrl value to tombstones.Peter Collingbourne2021-11-057-3/+69
| | | | | | | | | | | | Change-Id: Ib9860b282cf749891e0f6ef7697669b94235c236
| * | Update for libunwindstack shared_ptr MapInfos.Christopher Ferris2021-10-283-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 120606663 Test: Unit tests pass. Change-Id: Ieae157388e8571345ed8968a2b5c2aa34464689f Merged-In: Ieae157388e8571345ed8968a2b5c2aa34464689f (cherry picked from commit 853733b627dc5bbb07b2463a1f10f10ddee06bbc)
| * | Merge "Revert "strerror: incl enum name""Steven Moreland2021-10-071-1/+1
| |\ \
| | * | Revert "strerror: incl enum name"Steven Moreland2021-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert "strerror: incl enum name" Revert submission 1833622-usable-strerror Reason for revert: b/202330586 Bug: 202330586 Reverted Changes: I4d8f617a0:Track strerror(3) change. I8ea86220c:strerror: incl enum name I407bd9f4d:strerror: incl enum name Change-Id: I293ac322160c6a82ff7004a3de085cafbd514458
| * | | Merge "strerror: incl enum name"Elliott Hughes2021-10-061-1/+1
| |\| |
| | * | strerror: incl enum nameSteven Moreland2021-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strerror is nice, but usually I don't care about the text, I care about the uppercase enum Bug: N/A Test: N/A Change-Id: I8ea86220cb04cbded701379c47b8aba8ea8864b8
| * | | Add CHECK to verify assumptions in the code.Christopher Ferris2021-09-282-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the main thread, the siginfo pointer will never be nullptr. Add a CHECK to make sure this is true. Test: Unit tests pass both 32 bit and 64 bit. Test: Ran with debug.debuggerd.translate_proto_to_text set to 0 Test: to exercise old path. Change-Id: I9d5ed0de5d652de8a4f9cd85eb57cbb1ec676404
| * | | Merge "Disable scudo when using svelte config."Christopher Ferris2021-09-253-32/+43
| |\ \ \
| | * | | Disable scudo when using svelte config.Christopher Ferris2021-09-243-32/+43
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code was added, but a svelte config still tries to use scudo related code that doesn't exist. Bug: 201007100 Test: Ran unit tests on normal config. Test: Ran unit tests on svelte config. Change-Id: Ic84bae37717d213121aef182bac2f82dbee25213
| * / / libdebuggerd: fix process uptime.Elliott Hughes2021-09-216-24/+18
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was here because we have a case where timeout(1) kills logcat, but debuggerd alleges that the process that was killed had started less than a second ago. I'm not sure this is the problem there, but I did notice that far too many tombstones were claiming improbably short process uptimes. It turns out that the code was measuring the *thread* uptime, not the *process* uptime. Also simplify the code a bit by switching to sysinfo(2) rather than reading a file. Test: manual, plus the existing unit test Change-Id: Ie2810b1d5777ad9182be92bfb3f60795dc978b24
| * | Add a test to verify the dex_pc is correct.Christopher Ferris2021-09-153-1/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The libunwindstack code will attempt to dlopen the libdexfile.so when a dex pc is found. Unfortunately, this failed since that library was not properly listed as a runtime library. To make sure this doesn't happen again, add an end to end test that will create a dex pc frame, and will verify the correct dex function name is in that frame. Bug: 199043576 Test: Unit test passes on arm/aarch64/x86/x86_64. Test: Removed the runtime_libs of libdexfile from libunwindstack Test: and verified the new test fails. Change-Id: I3a11f9ee44e06e37a547d193b04f7fbb90ccfe0a
| * | Merge "Add libdexfile runtime dependency of libdexfile_support (reland)."Martin Stjernholm2021-09-021-0/+9
| |\ \
| | * | Add libdexfile runtime dependency of libdexfile_support (reland).Martin Stjernholm2021-09-011-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Necessary since static_libs doesn't propagate transitive dependencies in Soong. Test: m droid Bug: 197856821 Bug: 169779783 Change-Id: Ia70f8596228770451c95610be0e97783dabf3af3
| * | | Remove double check of fd value.Christopher Ferris2021-09-011-4/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | The output.text.fd value is only ever -1 when there is a failure. There is no need to check both < 0 or -1, so only check for -1. Test: Unit tests pass. Test: Verified the message is seen on intercept and not on Test: regular crashes. Change-Id: I1eddcd5d2342b268ceb261b246c98b10cee85bb4
| * | Revert "Add libdexfile runtime dependency of libdexfile_support."Rex Lin2021-09-011-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert "Allow visibility on libdexfile for all libdexfile_suppor..." Revert "Add libdexfile runtime dependency of libdexfile_support." Revert "Add libdexfile runtime dependency of libdexfile_support." Revert submission 1810760-libdexfile-runtime-2 Reason for revert: DroidMonitor: Potential culprit for Bug 198352910 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted. Reverted Changes: If4da968e4:Add libdexfile runtime dependency of libdexfile_su... I80162942a:Allow visibility on libdexfile for all libdexfile_... Iab18abc8e:Add libdexfile runtime dependency of libdexfile_su... I473d146d8:Add libdexfile runtime dependency of libdexfile_su... Change-Id: Iacab8e0a5c74e0c3185a155e35c28903aa9acb4a
| * | Add libdexfile runtime dependency of libdexfile_support.Martin Stjernholm2021-08-311-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Necessary since static_libs doesn't propagate transitive dependencies in Soong. Test: m droid Bug: 197856821 Bug: 169779783 Change-Id: If4da968e4e2f7ab0aaedd097c914242d0e9eb73e
| * | Add fault address marker in proto to tombstone.Christopher Ferris2021-08-232-2/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the switch was made to dump the tombstone from the protobuf, the fault address marker in the maps section went missing. Re-add that logic and add new unit tests to verify all of the different behaviors. Bug: 193935960 Test: All unit tests pass. Test: All unit tests pass when setprop debug.debuggerd.translate_proto_to_text 0 Test: The above on cuttlefish, 32 bit and 64 bit. Test: The above on a flame, 32 bit and 64 bit. Change-Id: I098bb6ab4bacacae2ca0fc5ec9a73549ed0b9489
| * | Merge "Modify missing output fd message."Christopher Ferris2021-08-201-2/+4
| |\ \ | | |/ | |/|
| | * Modify missing output fd message.Christopher Ferris2021-08-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "missing output fd" message can seem like an error, so modify the message to indicate what is really happening. This message will occur normally when running the debuggerd command, or when a bugreport is generated, or when an ANR occurs. In all of those cases, this is not an error, but an expected action. Bug: 196189981 Test: Ran debuggerd -b and debuggerd and verified this message is seen. Test: Ran unit tests. Change-Id: I6e3d5a76d92b972c77fca301ea7147745bc67c37
| * | Merge "Remove trailing newlines from abort message."Christopher Ferris2021-08-183-0/+51
| |\ \
| | * | Remove trailing newlines from abort message.Christopher Ferris2021-08-183-0/+51
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tombstone will add a newline after the abort message, so remove any trailing newlines before saving/printing. Bug: 196414062 Test: Unit tests pass. Test: Set system property debug.debuggerd.translate_proto_to_text to 0 test: and unit tests still pass. Change-Id: I0d3dc215eb5d8be93d99e5b9d4f0a14b1d61396d
| * | Merge "Split up the system/core/ TEST_MAPPING."Elliott Hughes2021-08-181-0/+7
| |\ \ | | |/ | |/|
| | * Split up the system/core/ TEST_MAPPING.Elliott Hughes2021-08-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of things had moved out of system/core/ without their TEST_MAPPING entries having gone with them, reducing the amount of presubmit coverage for those things. In order to reduce the likelihood of that happening again, I've pushed all that remained in the system/core/ TEST_MAPPING down into the individual subdirectories. Test: treehugger Change-Id: Ib75d65f9200fa64ae1552471da6fbe5b7023cf94