Commit graph

51422 commits

Author SHA1 Message Date
Kalesh Singh
00ac529e72 Merge "Add wchan data to ANR dump"
am: 44e343837f

Change-Id: I74471a19790618a41c4f8dda1afcc3a2e0fa3edd
2019-07-20 09:54:11 -07:00
Treehugger Robot
44e343837f Merge "Add wchan data to ANR dump" 2019-07-20 16:40:54 +00:00
Tianjie Xu
ae884a2ce1 Merge "init: Write the reason in BCB on "reboot recovery""
am: cccb573f93

Change-Id: I9898a741ff2629593a3f8c0c806eccb48a76e7b1
2019-07-19 22:25:42 -07:00
Tianjie Xu
cccb573f93 Merge "init: Write the reason in BCB on "reboot recovery"" 2019-07-20 05:03:41 +00:00
Christopher Ferris
057b4cfa0f Merge "Move to the libc++ demangler."
am: 89bb586d52

Change-Id: I711860b8e024f0763be96e94740cb688132aa005
2019-07-19 16:20:42 -07:00
Christopher Ferris
89bb586d52 Merge "Move to the libc++ demangler." 2019-07-19 22:48:37 +00:00
Tianjie Xu
5e98b633a7 init: Write the reason in BCB on "reboot recovery"
Without this change "adb reboot recovery" leads to normal boot.

Bug: 137523800
Test: peform factory reset, adb reboot recovery
Change-Id: Ie791c8107d3434bf4ae6f5785b24e7d97921a7a9
2019-07-19 13:02:59 -07:00
Colin Cross
fc0fb4f0e2 Merge "Fix darwin build"
am: 0b7dd9f40d

Change-Id: I59ca894ee3a671e281bb015571797b9e5d1d9c24
2019-07-19 09:57:23 -07:00
Treehugger Robot
0b7dd9f40d Merge "Fix darwin build" 2019-07-19 16:32:06 +00:00
Jiyong Park
7e490c14b1 Merge "Revert "Revert "add unittests for libnativeloader"""
am: 879415f6c0

Change-Id: I5d98d3925b4f64c3c8e51ec3a1e2689b06960bbc
2019-07-19 05:19:50 -07:00
Treehugger Robot
879415f6c0 Merge "Revert "Revert "add unittests for libnativeloader""" 2019-07-19 11:43:57 +00:00
Tianjie Xu
79d95556b1 Merge "Revert "init: Write the reason in BCB on "reboot recovery"""
am: 85bbbe5695

Change-Id: I0c7234ad4b1d797ae031844b51df4d717f44e6a7
2019-07-18 22:59:55 -07:00
Treehugger Robot
85bbbe5695 Merge "Revert "init: Write the reason in BCB on "reboot recovery""" 2019-07-19 05:34:43 +00:00
Kiyoung Kim
6aa4d948b9 Merge "Replace xargs with other shell command"
am: 18545d3852

Change-Id: I08355acaa6c57a557ca53791c00a6e51c02020fb
2019-07-18 18:40:06 -07:00
Treehugger Robot
18545d3852 Merge "Replace xargs with other shell command" 2019-07-19 01:20:15 +00:00
Christopher Ferris
4ec93a7ee5 Move to the libc++ demangler.
Bug: 136138882

Test: Unit tests pass.
Test: Did a kill -3 on a zygote process to verify art demangles properly.
Change-Id: Iaf4fab191e84871be906b39cc32dd7c97c5d385a
2019-07-18 17:57:04 -07:00
Jiyong Park
78cc06a22e Revert "Revert "add unittests for libnativeloader""
This reverts commit 4ec2b28983.

Bug: 137881576
Bug: 130388701
Test: libnativeloader_test
Test: m libnativeloader_test on full-eng
Change-Id: Ib96f7235845b68cde713af278313c5aa751ff738
2019-07-19 09:03:55 +09:00
Colin Cross
3defd5237f Fix darwin build
Disable host libmeminfo and showmap when building on darwin.

Test: m on darwin
Change-Id: Ie9342eff8d9e33c706edbb068d4ec405b480e599
2019-07-18 16:25:15 -07:00
Kalesh Singh
1489e27bda Add wchan data to ANR dump
Since only privileged processes with CAP_SYS_ADMIN can read kernel
stack traces from /proc/*/stack, we dump the waiting channels
instead to provide some insight as to where the process might
be stuck in the kernel.

Bug: 135458700
Fixes: 135458700
Test: adb shell am hang; Check /data/anr/<anr-file> for
      wchan data.
Change-Id: I9f13511ad89a259ce5e5465155db15d45d2c46d8
2019-07-18 16:02:57 -07:00
David Anderson
f1ce0e51bb Merge "Add a metadata folder for libsnapshot."
am: 45a1c998d1

Change-Id: I450ae649c089b3c5108cc26a714d851e6615d298
2019-07-18 16:00:31 -07:00
David Anderson
4e8b131b83 Merge "Sketch out libsnapshot for update_engine integration."
am: 3dcb41b224

Change-Id: I80098240360af4cfccce8bee92a3700266bb7d64
2019-07-18 16:00:21 -07:00
David Anderson
45a1c998d1 Merge "Add a metadata folder for libsnapshot." 2019-07-18 22:42:13 +00:00
David Anderson
3dcb41b224 Merge "Sketch out libsnapshot for update_engine integration." 2019-07-18 22:42:13 +00:00
Raman Tenneti
01e4c2a35f Merge "Revert "add unittests for libnativeloader""
am: 80fa85c594

Change-Id: I7edd4661cef091ad7c6446a8c0c1ce03a7bb38f2
2019-07-18 15:01:44 -07:00
Jiyong Park
7cf8c51f4e Merge "add unittests for libnativeloader"
am: ce813ef66f

Change-Id: I98333c7dc1937c594ccb1df5658b133fd8ab1d84
2019-07-18 14:51:43 -07:00
Raman Tenneti
80fa85c594 Merge "Revert "add unittests for libnativeloader"" 2019-07-18 21:50:31 +00:00
Raman Tenneti
4ec2b28983 Revert "add unittests for libnativeloader"
This reverts commit 6b6437bab5.

Reason for revert: <INSERT REASONING HERE>

Change-Id: Ice571bf7379743d516e0185fd9f1f0ffb284240a
2019-07-18 21:48:36 +00:00
Treehugger Robot
ce813ef66f Merge "add unittests for libnativeloader" 2019-07-18 21:14:23 +00:00
Christopher Ferris
3ec2f3eeb0 Merge "Move to isolated testing."
am: 604ccb147c

Change-Id: I1003c6b6be21e1ef20ecd89842bd5189aab26403
2019-07-18 12:07:39 -07:00
Christopher Ferris
1c4f14f4b5 Merge "Add cause message when stack overflow is detected."
am: bcc00c5c8f

Change-Id: I224b1059a43a603259073e426c4f922be3820ebf
2019-07-18 12:06:54 -07:00
Christopher Ferris
604ccb147c Merge "Move to isolated testing." 2019-07-18 19:00:46 +00:00
Christopher Ferris
bcc00c5c8f Merge "Add cause message when stack overflow is detected." 2019-07-18 18:55:46 +00:00
Tianjie Xu
137943d31b Revert "init: Write the reason in BCB on "reboot recovery""
This reverts commit 4d35f2e59c.

Reason for revert: b/137523800 This breaks factory reset on all devices (and potentially rescue party and non-ab updates). Because the init code unconditionally clear the arguments like "--wipe_data" written by framework; as a result, device boots into recovery without doing wipe. 

I guess one fix is to check the content of BCB, and skip the overwrite if it already boots into recovery. Revert the cl first to unblock p1, will submit the fix separately.

Change-Id: Iccaf3dce6999005c2199490a138844d5a5d99e7f
2019-07-18 11:42:14 -07:00
Kiyoung Kim
95d55818a4 Replace xargs with other shell command
Recently Android build team changed environment to use prebuilt toybox
binaries for common tools (aosp/852849). However, as toybox xargs does
not support -I option, update_and_install_ld_config.mk started to fail
filtering out private vndk libraries from the list. To resolve this,
xargs usages are replaced with other shell command (read).

Bug: 137832162
Test: m -j && tested on Cuttlefish
Change-Id: I218ce6272c781f826b87c8efc0d3c77bf6bc3af5
2019-07-18 20:30:44 +09:00
Martijn Coenen
90e29ac471 Merge "Ignore class_{reset|start}_post_data on non-updatable APEX."
am: 3f2d17632e

Change-Id: Ibf7f570b124d139dd1449a41604988ac64b82508
2019-07-18 01:21:15 -07:00
Martijn Coenen
3f2d17632e Merge "Ignore class_{reset|start}_post_data on non-updatable APEX." 2019-07-18 07:51:51 +00:00
Jiyong Park
6b6437bab5 add unittests for libnativeloader
libnativeloader hasn't had a unit test. Now we have it. The unittest
mocks calls to libdl, libbridgedloader, and JNI using gmock.

Not all tests are added yet. To ease the review, a few tests for core
scenarios are added.

Bug: 130388701
Test: libnativeloader_test

Change-Id: I518512047da66b44bc99cec26e2c34ba4985cca3
2019-07-18 16:04:55 +09:00
David Anderson
8a0f82fefa Sketch out libsnapshot for update_engine integration.
This is a skeleton API so we can begin implementing both libsnapshot and
the relevant changes in update_engine.

Bug: 136678799
Test: builds
Change-Id: I5dc0fc1f401e94da2b5996cd69ab4076847282a4
2019-07-17 20:30:51 -07:00
David Anderson
001747e890 Add a metadata folder for libsnapshot.
/metadata/ota will store the update state ("none", "applying",
"booting", "merging") for each dynamic partition. The data will be
managed by libsnapshot, whose primary consumer will be update_engine
but will also be available to recovery/fastbootd.

Bug: 136678799
Test: /metadata/ota exists
Change-Id: I3e06484cafeb363904914767abc8984adaa37021
2019-07-17 19:17:27 -07:00
Christopher Ferris
ea8e7d10d7 Move to isolated testing.
Modify the MapInfoCreateMemoryTest to work in the isolated mode.

Test: Ran unit tests on host/target.
Change-Id: I84e01d96e852acd813e0f203b4a207cfaf8ca556
2019-07-17 18:08:32 -07:00
Christopher Ferris
da923d90ec Merge "Move to the libc++ demangler."
am: 19b24bada5

Change-Id: I1e4b8a5cba4e19c2d4795f20a4ac9c6da823642e
2019-07-17 17:51:31 -07:00
Christopher Ferris
19b24bada5 Merge "Move to the libc++ demangler." 2019-07-18 00:19:37 +00:00
Mathieu Chartier
af3f7755ca Merge "Re-make showmap host supported"
am: 856544f8b1

Change-Id: I12d9efe3c3506ec5645e8348fb8ee17dc7481582
2019-07-17 17:19:24 -07:00
Mathieu Chartier
856544f8b1 Merge "Re-make showmap host supported" 2019-07-17 23:50:05 +00:00
Christopher Ferris
481e8379d3 Add cause message when stack overflow is detected.
Test: Ran new unit tests.
Test: Ran crasher stack-overflow, crasher64 stack-overflow and verified
Test: stack overflow cause is shown.
Test: Ran stack overflow app and verified tombstone includes stack-overflow
Test: message.
Change-Id: I9bb01186dff5ed81c77d84b6aaedb5332ddd7256
2019-07-17 14:14:26 -07:00
Christopher Ferris
a74aae8033 Move to the libc++ demangler.
The previous versions of the libc++ demangler crashed on bad input.
However, the new version passes a fuzzer and has a lot of tests. Since
it's more complete than the local demangler, use it instead.

Modified the expected output of an offline test since the new demangler
handles a case that didn't work before.

Verified that the time it takes for the check_for_leak tests did not
change after this.

Bug: 136138882

Test: Ran the unit tests.
Test: Verified the __cxa_demangle function passes the fuzzer when run for
Test: hours. Both the 32 bit and 64 bit version of __cxa_demangle were
Test: fuzzed using external/libcxxabi/fuzz.
Change-Id: I10c06b589d57c36d89dbecba020b1ef2da69634a
2019-07-17 13:49:37 -07:00
Mathieu Chartier
c0c28faa97 Re-make showmap host supported
Also fix bugs that made it not compile on host. Motivation is to be
able to analyze smaps files easily on the host.

Test: showmap -f maps.txt
Bug: 137034556

Change-Id: I7b8ca1237ce1ec17d02cd5217c73b62ee978cb05
2019-07-17 12:28:27 -07:00
Elliott Hughes
03cca21541 Merge "Remove perfprofd reference."
am: 97c06703f6

Change-Id: If6374e130ff430e7171ac71c7889844aab10775f
2019-07-17 11:47:44 -07:00
Treehugger Robot
97c06703f6 Merge "Remove perfprofd reference." 2019-07-17 18:30:37 +00:00
Josh Gao
1c8ecd77cd Merge changes I35f8843e,Icd2a94f8,I6c20f3b3
am: 1f1a0009fc

Change-Id: I13b66d553915bf4bdada12e854214d3232150423
2019-07-17 11:20:59 -07:00