Commit graph

42896 commits

Author SHA1 Message Date
Howard Ro
cd12793ccf Remove libmetricslogger_static
In aosp/790068, libmetricslogger is converted from cc_library_shared to
cc_library so there's no reason to keep both libmetricslogger and
libmetricslogger_static. All necessary dependencies are now cleaned up
therefore this can now be removed.

Change-Id: I09808d71771ac032f8b2b2d71944721fb03d3575
Fixes: 117829226
Test: compiles without failures
2018-10-18 17:49:18 -07:00
Treehugger Robot
d301f1bce4 Merge "Make native metrics logger write to statsd socket" 2018-10-18 20:05:58 +00:00
Treehugger Robot
224263da96 Merge "fs_mgr: fs_mgr_overlayfs_mount_scratch try alternate" 2018-10-18 19:21:41 +00:00
Howard Ro
34bc567a93 Make native metrics logger write to statsd socket
Bug: 110537511
Test: compiles without failures and verified the correct metric
Change-Id: Ie8019a20a2112ed6cbbc0999d68592efb8f0f538
2018-10-18 10:39:40 -07:00
Tom Cherry
e72274ac2b Merge "Start logd and service managers during the 'init' trigger" 2018-10-18 17:09:12 +00:00
Treehugger Robot
d2dfb33942 Merge "fs_mgr: fs_mgr_rm_all error propagation inconsequential EPERM" 2018-10-18 14:28:46 +00:00
Treehugger Robot
0a6c743179 Merge "fs_mgr: string literal cleanup" 2018-10-18 14:28:43 +00:00
Treehugger Robot
b59b20caac Merge "fastboot: use constants.h values" 2018-10-18 14:27:33 +00:00
Mark Salyzyn
8e7e9cb395 fastboot: use constants.h values
Cleanup to utilize all the manifest values in constants.h.

If the cli command _and_ the protocol name match, use a common
source of convenient truth.  This should set a pattern for future
additional commands.  When the command and the protocol differ,
we want to introduce resistance as it results in confusion and
maintenance issues.

Test: compile
Change-Id: Idad413c63cbbfcb6e851856105a5d5a9ef53ef29
2018-10-18 14:26:27 +00:00
Christopher Ferris
7cffd15110 Merge "Fix which maps to search for globals." 2018-10-18 01:54:47 +00:00
Christopher Ferris
56d0e07d70 Fix which maps to search for globals.
If multiple threads are unwinding at the same time, new maps that contain
the global variables for dex files and jit information are created. This
leads to threads creating more new maps that then get searched, then
more maps, then more searching until virtual address space exhaustion.

Fix this so that we only search maps that have a corresponding rw map that
could contain the global memory.

Small refactor to combine the code to search for global variables into
one class that both classes inherit from.

Modify unit tests for the new pattern checking.

Bug: 117761427

Test: Ran unit tests for libunwindstack/libbacktrace/simpleperf.
Test: Ran art 004-ThreadStress that used to fail.
Change-Id: I837ca6b9d0383100079de090bc7d019598e0cdfe
2018-10-17 14:23:10 -07:00
Tom Cherry
f18b748b91 Start logd and service managers during the 'init' trigger
Now that we mount partitions early, services can be started before the
'fs' trigger.  We therefore start the service managers as early as
possible to ensure their transports are online, without device
specific rc files needing to handle that.  We also start logd even
one step earlier to ensure that we capture all possible logd.

Bug: 89689596
Test: logging works for early services, include the servicemanagers
Change-Id: I75dbfcd26eb6fa77f002de10afd00f085c93aa07
2018-10-17 14:21:37 -07:00
Josh Gao
f2eaefe368 Merge "test_adb.py: silence ResourceWarning." 2018-10-17 21:10:45 +00:00
Treehugger Robot
4bc53d20af Merge "liblp: Add partitions to the correct group when writing LpMetadata." 2018-10-17 01:54:09 +00:00
Elliott Hughes
86c56953b3 Merge ""utils/Errors.h": include <stdint.h> for int32_t." 2018-10-17 00:53:40 +00:00
Treehugger Robot
03ea74aa91 Merge "Adding /odm/usr -> /vendor/odm/usr symlink" 2018-10-17 00:20:07 +00:00
Treehugger Robot
30793ac5fa Merge "liblp: Remove last_logical_sector from LpMetadataGeometry." 2018-10-16 23:41:42 +00:00
David Anderson
875434618f liblp: Add partitions to the correct group when writing LpMetadata.
The group_indices variable was intended to facilitate this, but I forgot
to actually use it.

Bug: 116817738
Test: lpmake, lpdump super_empty.img
Change-Id: Ia0da50b56b6c09e277324ec9d7aea6ce48fdc10a
2018-10-16 15:30:05 -07:00
Tom Cherry
89bf115a70 Merge "init: separate init packaging for mainline" 2018-10-16 20:29:47 +00:00
Elliott Hughes
9fbebc5d55 "utils/Errors.h": include <stdint.h> for int32_t.
No need for a Unix/Windows difference here.

Bug: N/A
Test: builds
Change-Id: If7b27f939f9c13ef336d2015608f2a24db8cc96d
2018-10-16 13:17:15 -07:00
Treehugger Robot
618be4c225 Merge "lmkd: increase the soft limit for keyboard" 2018-10-16 20:12:27 +00:00
Srinivas Paladugu
3eb20bc954 lmkd: increase the soft limit for keyboard
lmkd sets the soft limit parameters for Go devices.
The limit for apps in the perceptible group is set to 16M.
However this limit is not sufficient for the keyboard app to
prevent pages from being re-claimed quickly. The mem usage of
the keyboard app is around 55M most cases with some occasional
spikes to 70-80M. Increasing the limit to 64M improves the warm
startup latency for keyboard. It is still lower than the limits
set for foreground and visible apps.

Test: Go device (1G)
Bug: 117517805
Merged-In: Id50e49327cfd76126e41ef6503971845f29196af
Change-Id: Id50e49327cfd76126e41ef6503971845f29196af
2018-10-16 18:58:01 +00:00
Treehugger Robot
da915b4af3 Merge "Rename vbmeta_mainline to vbmeta_system." 2018-10-16 18:34:18 +00:00
Mark Salyzyn
6b313de3e3 fs_mgr: fs_mgr_overlayfs_mount_scratch try alternate
Harden fs_mgr_overlayfs_mount_scratch to try alternate filesystem
mount type just in case (f2fs <-> ext4).

Cleanup remove any unnecessary string literals.

Test: manual
Bug: 109821105
Change-Id: I36ea974ffeeae392553fff779939dc76a12ab96e
2018-10-16 11:14:24 -07:00
Mark Salyzyn
3a445df4fc fs_mgr: fs_mgr_rm_all error propagation inconsequential EPERM
If in fs_mgr_rm_all opendir on a subdirectory fails because of EPERM,
but a subsequent rmdir succeeds then there was no reason to report
the EPERM as an overall failure error code.

Test: manual
Bug: 117605276
Change-Id: I79fbf8567af1667094595e59ca2b536450f34b94
2018-10-16 11:14:15 -07:00
Mark Salyzyn
9b9bd39b7a fs_mgr: string literal cleanup
Cleanup remove any unnecessary string literals.

Test: compile
Bug: 109821105
Change-Id: Id22629201b8d874afb6b8f9157fa474fdfcf3f43
2018-10-16 11:14:06 -07:00
Josh Gao
42c86722fc test_adb.py: silence ResourceWarning.
Test: ./adb_test.py
Change-Id: If12558492e4edafd3568530a96eac2032526877d
2018-10-16 11:00:39 -07:00
Tom Cherry
29e5348f18 init: separate init packaging for mainline
With system-as-root, both first and second stage init belong to
system, but without system-as-root, first stage belongs to vendor and
second stage belongs to system.  This change creates two phony
packages to achieve this correctly in the build system.

Bug: 117606184
Test: mainline builds work properly
Change-Id: I19263e76c217c2e70bc06c180be3a460e9144f18
2018-10-16 09:49:00 -07:00
Tom Cherry
ce27a5bc0f Merge "init: clarify some text/README about 'critical' services" 2018-10-16 16:38:42 +00:00
Bowgo Tsai
15f872aee4 Adding /odm/usr -> /vendor/odm/usr symlink
Bug: 112880217
Test: build and checks symlink is created
Change-Id: Ib9635fc1cd425664cfa8f79d8f034f3cb615cbbc
2018-10-16 18:24:08 +08:00
Treehugger Robot
379bd47301 Merge "Reset statsd writer to init state after close" 2018-10-16 02:29:27 +00:00
Treehugger Robot
42a2e9eb27 Merge "Add adb_integration_test_device to general-tests" 2018-10-16 02:26:57 +00:00
Treehugger Robot
8e842dd365 Merge "Call markBootAttempt when serice manager available" 2018-10-16 01:45:51 +00:00
Treehugger Robot
1ffe0ccc70 Merge "rootdir: add ccross to OWNERS." 2018-10-16 00:24:41 +00:00
Tom Cherry
ad9e7eaf2d init: clarify some text/README about 'critical' services
'Critical' services have rebooted into bootloader, like all other
catastrophic init crashes, for years now.  Update the text to match.

Test: n/a
Change-Id: Icfc41bf3e383958f14ecfaab9ca187e2c3dc7fd9
2018-10-15 17:21:48 -07:00
Ryan Prichard
c394f7f7ac Merge "Change ZipArchiveHandle from void* to ZipArchive*" 2018-10-15 23:23:29 +00:00
Yao Chen
763e3aee42 Reset statsd writer to init state after close
Bug: 117796113
Test: locally tested and verified stats logs can write to statsd again.
Change-Id: I33b006199d23f851ff1a6e49445fb16d74223062
2018-10-15 16:12:48 -07:00
Daniel Rosenberg
6156b9b8ba Call markBootAttempt when serice manager available
This causes adds a call the fucntion to decrement the
checkpoint's retry count as soon as service manager is
available.

Test: vdc setCheckpoint 2 then reboot 3 times checking state
Bug: 112901762
Change-Id: Ie0a78b1eb05b340718e76175509d1ebefae68017
2018-10-15 22:16:19 +00:00
David Anderson
166bfef4e6 Rename vbmeta_mainline to vbmeta_system.
Bug: 116859651
Test: fastboot flash vbmeta_system
Change-Id: Ice65b6f5141ec6da3e1c91d6a3aac58533dc2314
2018-10-15 14:48:00 -07:00
Elliott Hughes
4b38722c12 rootdir: add ccross to OWNERS.
Bug: N/A
Test: N/A
Change-Id: I285f66a69fa86e03cfc213abc2fe85e938f849df
2018-10-15 14:18:04 -07:00
Treehugger Robot
83093e7ef8 Merge "init: clarify multiple 'interface' keyword use" 2018-10-15 21:10:43 +00:00
Treehugger Robot
0df9231dfd Merge "llkd: Do not check apexd by default for stack" 2018-10-15 20:33:42 +00:00
Suren Baghdasaryan
79e5b550ce Merge "lmkd: Implement pid purge command to clear old pids when zygote restarts" 2018-10-15 19:47:54 +00:00
Steven Moreland
48aed8f02d init: clarify multiple 'interface' keyword use
This keyword can (and should) be used multiple times when multiple
services are served together. I've documented this here.

Bug: N/A
Test: N/A
Change-Id: Ie986c9cac486db346555f359e9ccbed93d8d1d22
2018-10-15 18:00:36 +00:00
Tom Cherry
6e52c23a3e Merge "logd: rework logic for LogTimeEntry" 2018-10-15 17:57:06 +00:00
Suren Baghdasaryan
e3b6047e0d lmkd: Implement pid purge command to clear old pids when zygote restarts
lmkd keeps a list of pids registered by ActivityManager, however on rare
occasions when framework restarts and lmkd survives that list has to be
purged. Implement a command that can be used to clear the pid list.

Bug: 116801366
Test: locally by killing zygote process
Change-Id: I71d6012f86bb83a73edd5b687e05a0848e0569b1
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-10-15 16:22:17 +00:00
Nick Kralevich
5390b9add4 llkd: Do not check apexd by default for stack
apexd is now blocked by sepolicy, so skip checking it to
prevent an avc warning.

See system/sepolicy commit ac097ac4c7718f8593f2b6b96a93a776984ec7c4

Addresses the following SELinux denial:

type=1400 audit(0.0:386): avc: denied { ptrace } for comm="llkd" scontext=u:r:llkd:s0 tcontext=u:r:apexd:s0 tclass=process permissive=0

Test: manual
Change-Id: Iad24447c8200e915ac8397a8f84923feebc20613
2018-10-15 09:17:40 -07:00
Christopher Ferris
6853a187e3 Merge "Fix up the definition of Elf::GetInfo." 2018-10-13 17:47:18 +00:00
Christopher Ferris
9074871af2 Merge "Fix problem adding too many frames." 2018-10-13 17:47:12 +00:00
Tom Cherry
4f22786cc9 logd: rework logic for LogTimeEntry
LogTimeEntry's lifecycle is spread out in various locations.  It
further seems incomplete as there is logic that assumes that its
associated thread can exit while the underlying LogTimeEntry remains
valid, however it doesn't appear that that is actually a supported
situation.

This change simplifies this logic to have only one valid state for a
LogTimeEntry: it must have its thread running and be present in
LastLogTimes.  A LogTimeEntry will never be placed into LastLogTimes
unless its thread is running and its thread will remove its associated
LogTimeEntry from LastLogTimes before it has exited.

This admittedly breaks situations where a blocking socket gets issued
multiple commands with different pid filters, tail lines, etc,
however, I'm reasonably sure that these situations were already
broken.  A check is added to close the socket in this case.

Test: multiple logcat instances work, logd.reader.per's are cleaned up
Change-Id: Ibe8651e7d530c5e9a8d6ce3150cd247982887cbe
2018-10-12 18:28:59 -07:00