Commit Graph

38600 Commits

Author SHA1 Message Date
Suren Baghdasaryan ccb9744562 Merge "lmkd: Fix the message printed during a kill to avoid confusion"
am: 5ea2c4baf1

Change-Id: Ie03101140cc80d905d1175bd8b7056a37eb1a0fc
2018-03-21 19:28:08 +00:00
Suren Baghdasaryan ec2bc88aa1 Merge "lmkd: Suppress error when accessing soft_limit_in_bytes for system_server"
am: d4463fd9d7

Change-Id: I098aac7f29083dd9d42fbd08025e71f11d0ee7ec
2018-03-21 19:27:43 +00:00
Suren Baghdasaryan 3d3e875767 Merge "lmkd: Change error to warning when accessing oom_score_adj file"
am: a77411f425

Change-Id: I87f6d6bac94067c055129783f0a4a35749b734d2
2018-03-21 19:27:14 +00:00
Suren Baghdasaryan 5ea2c4baf1 Merge "lmkd: Fix the message printed during a kill to avoid confusion" 2018-03-21 19:19:33 +00:00
Suren Baghdasaryan d4463fd9d7 Merge "lmkd: Suppress error when accessing soft_limit_in_bytes for system_server" 2018-03-21 19:19:22 +00:00
Suren Baghdasaryan a77411f425 Merge "lmkd: Change error to warning when accessing oom_score_adj file" 2018-03-21 19:19:10 +00:00
Suren Baghdasaryan d07a94f973 lmkd: Fix the message printed during a kill to avoid confusion
Current kills message prints min_score_adj marked as "oom_adj" which
is confusing. This change marks it as "min_oom_adj" to be more clear.

Change-Id: If52f0fb25fe3208c928c5d6adce77c04b9f15a0e
2018-03-21 17:12:42 +00:00
Suren Baghdasaryan 4311d1ed36 lmkd: Suppress error when accessing soft_limit_in_bytes for system_server
system_server needs to register with lmkd, however it has no memory
cgroup under /dev/memcg/apps. This change detects if the process being
registered is system_server and suppresses the error message when
/dev/memcg/apps/uid_%d/pid_%d/memory.soft_limit_in_bytes file can't
be accessed.

Bug: 73483785
Test: verified logcat output
Change-Id: I03df7831f41f512ac8d3ebc46330546d08a3cbc6
2018-03-21 10:11:23 -07:00
Suren Baghdasaryan 1ffa246c86 lmkd: Change error to warning when accessing oom_score_adj file
Occasionally processes are killed or crash while lmkd is trying to access
their oom_score_adj file. This is not necessarily an erroneous condition
and therefore should not be reported as an error. Demoting error to a
warning with a detailed message.

Bug: 72039129
Test: verified logcat output
Change-Id: I97444ba5198c02cb7f7ba03c3af12e4aad9d233e
2018-03-20 17:14:38 -07:00
Mark Salyzyn f6d3c609ee Merge changes Ibf543273,Id56946b6
am: 7c681665f0

Change-Id: Idbac3e2e55e8f10ddc18176f1b13f0e27db9c25c
2018-03-20 22:53:29 +00:00
Treehugger Robot 7c681665f0 Merge changes Ibf543273,Id56946b6
* changes:
  bootstat: allow kernel_panic,sysrq to propagate subreason
  bootstat: test error out only on first bad bootloader reason
2018-03-20 22:25:12 +00:00
Mark Salyzyn 39cc3e7073 bootstat: allow kernel_panic,sysrq to propagate subreason
Allow for a daemon to write to last kmsg to propagate a detailed
subreason to kernel_panic,sysrq actions.  A minor refactor moves
common code into a helper function getSubreason for retrieval and
bit error correction operations.

A sysrq crash generally produces a kernel-provided message:
    SysRq : Trigger a crash
which is used to generate a canonical boot reason kernel_panic,sysrq.
A user daemon could write to /dev/kmsg just prior to the sysrq with
    SysRq : Trigger a crash : '<subreason>'
to change the canonical boot reason to kernel_panic,sysrq,<subreason>.

Administration added pending kBootReasonMap entries present in TRON.

Test: manual echo into /dev/kmsg and /proc/sysrq-trigger and check
Test: boot_reason_test.sh
Bug: 33808187
Bug: 63736262
Change-Id: Ibf5432737e5a3449ebe40a8c6cf2d3e912ed6bbc
2018-03-20 13:11:44 -07:00
Mark Salyzyn 855d205817 bootstat: test error out only on first bad bootloader reason
Hopefully the quick property test is first, setting the stage for
ignoring future failures.  This solves a problem with multiple
test failures directly attributed to a CTS compliance issue
with the bootloader's boot reason.  One test fails, the remainder
get a pass on this one issue.

Test: boot_reason_test.sh
Bug: 63736262
Change-Id: Id56946b6f2f3a33d65bd1830543838f153290759
2018-03-20 13:10:16 -07:00
Jiyong Park 6a8b7c4061 Merge "/postinstall/* does not search for a lib in /vendor or /odm"
am: ef454589e4

Change-Id: Ic401133a7bf8c22b211a72635ef8597a2e885208
2018-03-20 16:44:41 +00:00
Treehugger Robot ef454589e4 Merge "/postinstall/* does not search for a lib in /vendor or /odm" 2018-03-20 16:25:48 +00:00
Tom Cherry e48dfe91ca Merge "Revert "init: Reboot after timeout passes during reboot""
am: 92d55b6c07

Change-Id: I14999bf605bd31d5ae10a845c702ffb2161f51f5
2018-03-20 13:46:43 +00:00
Tom Cherry 92d55b6c07 Merge "Revert "init: Reboot after timeout passes during reboot"" 2018-03-20 13:37:43 +00:00
Josh Gao c08a536a32 Merge changes I6a842960,If618c26b
am: 7920502065

Change-Id: Id568642bd668f5d83f370d366992d93c14e09166
2018-03-20 07:26:49 +00:00
Josh Gao c4072ed605 Merge "adb: skip IPv6 test if IPv6 isn't available."
am: 46e59af921

Change-Id: I90cfa05f2f81a7bbd3b160dce9b86557cbfd243f
2018-03-20 07:26:11 +00:00
Josh Gao 7920502065 Merge changes I6a842960,If618c26b
* changes:
  adb: add `adb shell exit 42` stress test.
  adb: improve socket tests.
2018-03-20 07:19:01 +00:00
Josh Gao 46e59af921 Merge "adb: skip IPv6 test if IPv6 isn't available." 2018-03-20 07:18:12 +00:00
Josh Gao 4abb5074be adb: skip IPv6 test if IPv6 isn't available.
Bug: http://b/69813298
Test: none
Change-Id: I0793e793bd52c5f1c639faedf09a513df263db78
2018-03-19 18:19:47 -07:00
Jiyong Park d7e6cb27b6 /postinstall/* does not search for a lib in /vendor or /odm
There has been no section in the linker config file for the binaries
under /postinstall. As a result, the binaries were run with the legacy
default config where /vendor/lib and /odm/lib are added to the search
paths. This is causing selinux denials as the binaries for OTA are not
allowed to access /vendor/lib or /odm/lib, but the dynamic linker calls
realpath(3) on the paths to canonicalize them.

Fixing the issue by letting /postinstall/* binaries to run with a
dedicated linker namespace config, where /vendor/lib and /odm/lib are
not added to the search paths. Not having the paths is okay because
he OTA binaries should not have dependency to the libs there.

Bug: 75287236
Test: do the OTA, selinux denials on postinstall_file is not shown
Test: above test should pass on  wahoo, marlin and pre-treble devices
Change-Id: I49c11a0929002adfef667890c0a375c2b41054f4
2018-03-20 10:12:00 +09:00
Tom Cherry 0a72e6cb72 Revert "init: Reboot after timeout passes during reboot"
This reverts commit c9fec9d2be.

Looks like ext4 can't handle a system reboot happening in the middle
of an unmount.  We'll have to find another way to handle this.

Bug: 74817735
Bug: 75310371
Test: reboot device
Change-Id: Ib4f7f7fd29988a31a99f146c40f6d987c1fef15e
2018-03-19 16:37:02 -07:00
Josh Gao c970aefada adb: add `adb shell exit 42` stress test.
Add a test to hammer on `adb shell exit $n` for flakiness.

Bug: http://b/74616284
Test: python test_device.py
Change-Id: I6a842960f5b55ff739044698f5c9683992fc42f1
2018-03-19 16:14:53 -07:00
Josh Gao ecb96ac04d adb: improve socket tests.
Make it so that the socket tests don't leak until your machine blows up
by switching an infinite loop into an assertion failure.

Bug: http://b/74616284
Test: adb_test
Change-Id: If618c26b224b660548454f542cab79bebe46f80e
2018-03-19 16:14:53 -07:00
Josh Gao 0204f8c2f2 Merge changes I99b85f07,If28f6c8d
am: 6156420fb7

Change-Id: I07fd7bee350ad02933d7c329c4852b504221ea9b
2018-03-19 20:22:38 +00:00
Treehugger Robot 6156420fb7 Merge changes I99b85f07,If28f6c8d
* changes:
  adb: implement std::make_unique, start using it.
  base: export GetThreadId.
2018-03-19 20:14:33 +00:00
Christopher Ferris 2b1abddfea Merge "Always set the sp reg to the cfa for DWARF."
am: b22451f178

Change-Id: I515033f35e1ec1dc6cd11673c5ef5dfaff487984
2018-03-19 19:34:50 +00:00
Christopher Ferris b22451f178 Merge "Always set the sp reg to the cfa for DWARF." 2018-03-19 17:48:59 +00:00
David Srbecky 1e352c0768 Merge "Don't include map name if the consumer doesn't want names."
am: e8d1b75c0c

Change-Id: I47c02409a273dded8562c728dfdf35b1c1b418a0
2018-03-19 11:41:02 +00:00
David Srbecky e8d1b75c0c Merge "Don't include map name if the consumer doesn't want names." 2018-03-19 11:23:10 +00:00
David Srbecky e62f4c4d4c Don't include map name if the consumer doesn't want names.
Simpleperf doesn't need the name, so avoid the string copies.

This seems to speed up simpleperf by around 20%.

Test: backtrace_test libunwindstack_test
Change-Id: Iba064c7078f7e5ecfc9d8539ba09c14495a52158
2018-03-19 11:20:00 +00:00
Yabin Cui 11e96fe48a Always set the sp reg to the cfa for DWARF.
There are a few places where it is assumed that this register is
set to the cfa value when interpreting DWARF information.

Add a testcase for unwinding art_quick_osr_stub on ARM.

Bug: 73954823

Test: Ran libunwindstack/libbacktrace unit tests.
Test: Random debuggerd -b of process on a hikey.
Test: Ran the 137 art test on host.
Change-Id: Ida6ccdc38c3cfeea6b57fe861a0cc127b150b790
2018-03-16 23:38:07 -07:00
Jerry Zhang e15fb6b9d5 Merge "adb: Remove usages of ENDPOINT_ALLOC"
am: 4fa763290e

Change-Id: Ie04bfb59fba0ba3526c217355b492ffee7f351fe
2018-03-17 01:05:36 +00:00
Treehugger Robot 4fa763290e Merge "adb: Remove usages of ENDPOINT_ALLOC" 2018-03-17 00:50:54 +00:00
Mark Salyzyn bbdddfa030 Merge changes If35518c0,I04bede0b
am: bda0a3e637

Change-Id: I9561d358eb5e43b68011758009ae9bfcc19f5624
2018-03-16 23:22:59 +00:00
Mark Salyzyn 4134f4c701 Merge "bootstat: add support for regex in aliasReasons and powerkeys"
am: f4be06450a

Change-Id: I2a40009690329700770d7d5e9841d9080c5dba7f
2018-03-16 23:22:18 +00:00
Josh Gao aef43182dc Merge "adb: add test for flushing socket data after a write failure."
am: 32caa9870f

Change-Id: I8f1e13f89d0ce42311ea517612488d0b5e46a543
2018-03-16 23:15:51 +00:00
Treehugger Robot bda0a3e637 Merge changes If35518c0,I04bede0b
* changes:
  bootstat: add support for suppressing needle match on output
  bootstat: usb and rtc refinement
2018-03-16 22:48:51 +00:00
Mark Salyzyn 281932803d bootstat: add support for suppressing needle match on output
For aliasReasons allow one to optionally suppress needle for output
member using a <bang> (!) character prefix.

Test: boot_reason_test.sh
Bug: 63736262
Bug: 74595769
Change-Id: If35518c08cf909c6c78a16275e9d8dfd0ff839a9
2018-03-16 15:47:27 -07:00
Mark Salyzyn 8aa36c67f8 bootstat: usb and rtc refinement
For all known cases, if usb is present in the bootloader reason,
then it is actually reporting a cold,charger canonical boot reason.
This signifies that the device was powered down, and was woken
up by the charger being connected.

For all known cases, if rtc is present in the bootloader reason,
then it is actually reporting a cold,rtc canonical boot reason.
This signifies that the device was powered down, and was woken
up by the rtc clock.

Test: boot_reason_test.sh
Bug: 74595769
Bug: 63736262
Change-Id: I04bede0b7ccaa1b859943f7def93521a8f7b25c6
2018-03-16 15:47:27 -07:00
Treehugger Robot f4be06450a Merge "bootstat: add support for regex in aliasReasons and powerkeys" 2018-03-16 22:44:57 +00:00
Josh Gao 31b5be69f4 adb: implement std::make_unique, start using it.
Add an implementation of std::make_unique for Windows, where we're
currently stuck with C++11, and switch some uses of new over to it.

Test: treehugger
Change-Id: I99b85f07754adda7c525243480c3e0bce9a25ce7
2018-03-16 15:35:52 -07:00
Josh Gao 5791e21697 base: export GetThreadId.
and stop using the incorrect (on Mac) version in adb..

Test: mma
Change-Id: If28f6c8d73b03db863be13ed88df81422c3aef87
2018-03-16 15:35:52 -07:00
Jerry Zhang 99499f1740 adb: Remove usages of ENDPOINT_ALLOC
All devices that previously used ENDPOINT_ALLOC
are on the new async io routines. None of the devices
using aio_compat have ENDPOINT_ALLOC so remove the
code to stop logging failures.

Fixes: 74213465
Test: adb works
Change-Id: I0c903eb76b006b6bcce48cec24f5353fa47cc128
(cherry picked from commit 9a1be3ad0e)
2018-03-16 15:33:26 -07:00
Josh Gao 32caa9870f Merge "adb: add test for flushing socket data after a write failure." 2018-03-16 22:18:43 +00:00
Mark Salyzyn ee3c8e64dc Merge "bootstat: alias underline to space in bit error rate handling"
am: 40858e95b6

Change-Id: I8094305ff1b9610f8726d62476a5d5890f024618
2018-03-16 21:32:27 +00:00
Mark Salyzyn 07e4e9b5fc Merge "bootstat: comment out duplicate entries in kBootReasonMap"
am: 1408ceec4f

Change-Id: Ief59024678937b79200daeef5d9a1a70be43b3f1
2018-03-16 21:31:56 +00:00
Mark Salyzyn a2b4750771 Merge "bootstat: 3.18 kernel does not report "SysRq : Trigger a crash""
am: 5e2b2681ef

Change-Id: I9c3ad26c9c1a385aa2fe5bb428af5ff5c2221e00
2018-03-16 20:56:19 +00:00