Commit Graph

33591 Commits

Author SHA1 Message Date
Christopher Ferris 36fc37106c Merge "Add DwarfSection classes." am: 6a80c3e1a8 am: 5659a2b6fe
am: 1fc59234bf

Change-Id: Ic6ce7179ebd0b93bd1ef143b60a8d90b38ba4997
2017-06-02 00:28:41 +00:00
Christopher Ferris 1fc59234bf Merge "Add DwarfSection classes." am: 6a80c3e1a8
am: 5659a2b6fe

Change-Id: Ic1de0d9f88febb87c2485d964a85071b676ebde3
2017-06-02 00:25:54 +00:00
Christopher Ferris 5659a2b6fe Merge "Add DwarfSection classes."
am: 6a80c3e1a8

Change-Id: I353f0d1fb1c3203134e8590a1ef7267407240bed
2017-06-02 00:22:25 +00:00
Christopher Ferris 6a80c3e1a8 Merge "Add DwarfSection classes." 2017-06-02 00:15:13 +00:00
Josh Gao ee634e478c Merge changes Iddb0cb1e,Ic15e0b08,If1c9adb6 am: 2b17afc68d am: f1477d7f43
am: e8f700611e

Change-Id: Idc9bc1ea27eabd51853b254141177407d607115d
2017-06-01 21:59:03 +00:00
Josh Gao e8f700611e Merge changes Iddb0cb1e,Ic15e0b08,If1c9adb6 am: 2b17afc68d
am: f1477d7f43

Change-Id: Ic37df35542dcb27b88401bb4efa59cb2113dbbd7
2017-06-01 21:56:28 +00:00
Josh Gao f1477d7f43 Merge changes Iddb0cb1e,Ic15e0b08,If1c9adb6
am: 2b17afc68d

Change-Id: I893f4c95143638598fbc4ef48e6717d1616e3688
2017-06-01 21:53:29 +00:00
Treehugger Robot 2b17afc68d Merge changes Iddb0cb1e,Ic15e0b08,If1c9adb6
* changes:
  debuggerd_client: increase pipe buffer size to max.
  crash_dump: don't notify ActivityManager if it crashed.
  crash_dump: clear the signal mask.
2017-06-01 21:47:19 +00:00
Christopher Ferris 53a3c9b4ab Add DwarfSection classes.
Bug: 23762183

Test: Ran new unit tests.
Change-Id: Icca2a73c50d467718ba4ac41e1c8f541488620dd
2017-06-01 13:12:31 -07:00
Josh Gao 5675f3c321 debuggerd_client: increase pipe buffer size to max.
If a process tries to dump itself (e.g. system_server during ANRs),
crash_dump will block trying to write to its pipe if it's not
sufficiently large. Increase the pipe size to the max, and add a test
to make sure that it's always at least 1MB (the default value).

Bug: http://b/38427757
Test: debuggerd_test
Change-Id: Iddb0cb1e5ce9e687efa9e94c2748a1edfe09f119
2017-06-01 12:42:44 -07:00
Josh Gao b0e51e388b crash_dump: don't notify ActivityManager if it crashed.
Bug: http://b/38427757
Test: killall -ABRT system_server, plus added logging
Change-Id: Ic15e0b0870b1ec08a2f165ad0e5356afed02eece
2017-06-01 12:42:33 -07:00
Christopher Ferris 4bae4fffeb Merge "Fix bug found by fuzzer." am: 1d6a3acc9e am: 9bf73d3723
am: 9676de623d

Change-Id: I6b658d1920957ada615406530a09f313c1ed7178
2017-06-01 19:14:50 +00:00
Christopher Ferris 9676de623d Merge "Fix bug found by fuzzer." am: 1d6a3acc9e
am: 9bf73d3723

Change-Id: I05a362c658240ea91fe84d4b2b56e8e07c3c9c06
2017-06-01 19:12:18 +00:00
Christopher Ferris 9bf73d3723 Merge "Fix bug found by fuzzer."
am: 1d6a3acc9e

Change-Id: I020589751d4b2835ac098dad8cc3b07c5ba8448d
2017-06-01 19:09:20 +00:00
Christopher Ferris 1d6a3acc9e Merge "Fix bug found by fuzzer." 2017-06-01 19:03:48 +00:00
Josh Gao e740250b9d crash_dump: clear the signal mask.
crash_dump inherits its signal mask from the thread that forked it,
which always has all of its signals blocked, now that sigchain respects
sa_mask.

Manually clear the signal mask, and reduce the timeout to a
still-generous 2 seconds.

Bug: http://b/38427757
Test: manually inserted sleep in crash_dump
Change-Id: If1c9adb68777b71fb19d9b0f47d6998733ed8f52
2017-06-01 11:55:25 -07:00
Jinguang Dong 1123da7a42 Merge "fs_mgr: Fix ZRAM error when ZRAM disk size beyond (2^31-1) bytes" am: 28c11dcff4 am: 6a75b73c36
am: 40d4ad9cdf

Change-Id: Ia93c8fd9fd4b799ec253241e0571077006ded21b
2017-06-01 17:43:38 +00:00
Jinguang Dong 40d4ad9cdf Merge "fs_mgr: Fix ZRAM error when ZRAM disk size beyond (2^31-1) bytes" am: 28c11dcff4
am: 6a75b73c36

Change-Id: I3ecfb77fd639684d0a448b2eafa22570bf5796da
2017-06-01 17:37:33 +00:00
Jinguang Dong 6a75b73c36 Merge "fs_mgr: Fix ZRAM error when ZRAM disk size beyond (2^31-1) bytes"
am: 28c11dcff4

Change-Id: I8b67777e1136a50b4233dce1450c7df867ccd744
2017-06-01 17:32:39 +00:00
Treehugger Robot 28c11dcff4 Merge "fs_mgr: Fix ZRAM error when ZRAM disk size beyond (2^31-1) bytes" 2017-06-01 17:21:30 +00:00
Jinguang Dong f7d1014795 fs_mgr: Fix ZRAM error when ZRAM disk size beyond (2^31-1) bytes
Because the zram_size type is unsigned int.so if ZRAM size great
than 2^31 -1, zram_fp will receive a negtive integer, while the
ZRAM driver only accept natural number.We need to use printf
formatting %u instand of %d.

Test: 1. Config the zramdisk size 2348810240 and build a ramdisk
      2. Reflash device and check below command:
         $adb shell dumpsys meminfo
         $ adb shell cat /sys/block/zram0/disksize
         ZRAM info display will be abnormal
      3. Config the zramdisk size 2348810240 and apply with this
         patch.
      4. Retest to step 2 and the ZRAM info will be ok.

Change-Id: I473de33fbd0b66cf13eac3172684e9fef11b6ef0
2017-06-01 19:42:22 +08:00
Robert Benea 9c18097147 Merge "cgroups used by init must be mounted before any services start" am: 63c15c1b11 am: cc6da8ec5b
am: b30ad069ec

Change-Id: I5627d6720aa0c237aca0cdd1cb75b654cb183158
2017-06-01 08:17:03 +00:00
Robert Benea b30ad069ec Merge "cgroups used by init must be mounted before any services start" am: 63c15c1b11
am: cc6da8ec5b

Change-Id: I682be7a95fccf23b645d96df67414033dc83a93e
2017-06-01 08:10:03 +00:00
Robert Benea cc6da8ec5b Merge "cgroups used by init must be mounted before any services start"
am: 63c15c1b11

Change-Id: I2d9298d6de7fbe3b1ad827f498822545e696d4cc
2017-06-01 08:07:31 +00:00
Treehugger Robot 63c15c1b11 Merge "cgroups used by init must be mounted before any services start" 2017-06-01 07:59:19 +00:00
Jin Qian 7b36933a83 Merge "fastboot: use filename instead of fd to generate filesystem image" am: 010f7714b7 am: 104470da0f
am: d195ab0b23

Change-Id: I2a2f103b2743b18ec5dae542c752fb8fcc9e9161
2017-06-01 06:16:03 +00:00
Jin Qian d195ab0b23 Merge "fastboot: use filename instead of fd to generate filesystem image" am: 010f7714b7
am: 104470da0f

Change-Id: I3e1e72bffe47188f49ae3cf4f0cfa44fcd9b0ef4
2017-06-01 06:13:54 +00:00
Jin Qian 104470da0f Merge "fastboot: use filename instead of fd to generate filesystem image"
am: 010f7714b7

Change-Id: I5b68c8228bd5fc018f858a200f0413e7c00a8791
2017-06-01 06:11:53 +00:00
Treehugger Robot 010f7714b7 Merge "fastboot: use filename instead of fd to generate filesystem image" 2017-06-01 06:05:41 +00:00
Christopher Ferris 15d2e42ceb Fix bug found by fuzzer.
Also, add the demangle fuzzer code.

Test: Ran fuzzer, ran new unit tests.
Change-Id: If3e15e10af88b81602a8a0f0bfe071a015f6000b
2017-05-31 17:54:19 -07:00
Robert Benea c638569c2e cgroups used by init must be mounted before any services start
init uses /acct and optionally /dev/memcg for tracking services and
therefore these must be started before any services start.

Test: check that cgroups are mounted appropriately.

Change-Id: Ice095287963181fe687dbe6b7d291076e674d1cc
2017-05-31 16:12:23 -07:00
Mark Salyzyn 6b954d64a2 Merge "logcat: logcatd: make logcatd killable" am: f2c1ef53ff am: 69f28a69e3
am: 301770b2c7

Change-Id: I5a0e67899361a1ac93618b12a3052c78da86b23f
2017-05-31 22:37:14 +00:00
Mark Salyzyn 301770b2c7 Merge "logcat: logcatd: make logcatd killable" am: f2c1ef53ff
am: 69f28a69e3

Change-Id: I4a75c92ea0c23f2c00be5cf0ebaed768f354ae4f
2017-05-31 22:30:24 +00:00
Mark Salyzyn 69f28a69e3 Merge "logcat: logcatd: make logcatd killable"
am: f2c1ef53ff

Change-Id: Ibca636745a95a5f55bddfdd1a0c8067b9078655a
2017-05-31 22:28:22 +00:00
Treehugger Robot f2c1ef53ff Merge "logcat: logcatd: make logcatd killable" 2017-05-31 22:24:06 +00:00
Jin Qian 4a335829da fastboot: use filename instead of fd to generate filesystem image
mke2fs tool takes a filename and has its own open function to handle
output file. Change fastboot in preparation to switch from make_ext4
to mke2fs.

Test: fastboot format:ext4 userdata
Bug: 35219933
Change-Id: I7a31cb215f443a4a7cb0bfc23ec28c121a6101e6
2017-05-31 21:23:12 +00:00
Tom Cherry 396360d4dd Merge "init: allow ':' in property names" into oc-dev
am: 8ecf59439c

Change-Id: If0c5a334fe7f0b5618ed9f74b96f65f013435b9b
2017-05-31 18:33:33 +00:00
Mark Salyzyn 30ea96e14e logcat: logcatd: make logcatd killable
Near last resort kill logcatd, set /proc/self/oom_score_adj to -600.

Can kill to keep system_server, telephony and bluetooth.

Test: manual, start logpersist, runs
Bug: 62147352
Change-Id: I3723761bf1d2b79ce6a9557d2e78f91cc5497e96
2017-05-31 11:27:22 -07:00
TreeHugger Robot 8ecf59439c Merge "init: allow ':' in property names" into oc-dev 2017-05-31 18:09:10 +00:00
George Burgess IV b058593588 Merge "logging: make LOG(FATAL) always run with the static analyzer." am: b46fd68653 am: 2e9af0942c
am: 21ea871839

Change-Id: I475fc3b3ec1c6639b106263c95bae45e90bb01b2
2017-05-31 17:15:00 +00:00
George Burgess IV 21ea871839 Merge "logging: make LOG(FATAL) always run with the static analyzer." am: b46fd68653
am: 2e9af0942c

Change-Id: I1f268e34a9c85bb7e57911a9881c39c60afd87e0
2017-05-31 17:05:57 +00:00
George Burgess IV 2e9af0942c Merge "logging: make LOG(FATAL) always run with the static analyzer."
am: b46fd68653

Change-Id: I761248df16cd0c7185bbd0934501151a18bdbdf5
2017-05-31 16:55:55 +00:00
Treehugger Robot b46fd68653 Merge "logging: make LOG(FATAL) always run with the static analyzer." 2017-05-31 16:41:15 +00:00
George Burgess IV 6466ced8f6 logging: make LOG(FATAL) always run with the static analyzer.
::android::base::GetMinimumLogSeverity() is defined externally, so the
static analyzer was allowed to assume that we continue executing after a
LOG(FATAL).

I manually audited all of the code I have access to, and the only
"change the minimum log severity" statements I can see keep FATAL
enabled (...and continuing after a FATAL is highly sketchy to me
anyway).

(I'm sure I tested this at some point in making the previous patch. I
probably broke it in a refactor before sending it out for review; my
bad. :) )

Bug: None
Test: m without the static-analyzer builds; m with it yields fewer
false positives.

Change-Id: I216cd2034e1daa8d6f6c5e776f64b4cce88bb938
2017-05-31 14:41:22 +00:00
Narayan Kamath ddce581a63 Merge "tombstoned: allow intercepts for java traces." am: 1e63347425 am: 907a666e22
am: 6ca71ad137

Change-Id: I1797a7e47d2451858b3a130721b84e159a9f2843
2017-05-31 12:29:20 +00:00
Narayan Kamath 6ca71ad137 Merge "tombstoned: allow intercepts for java traces." am: 1e63347425
am: 907a666e22

Change-Id: Id0bb9f7d27991a137182cf4217e6fd1e075d2867
2017-05-31 12:16:45 +00:00
Narayan Kamath 907a666e22 Merge "tombstoned: allow intercepts for java traces."
am: 1e63347425

Change-Id: I326308ed1fa4bdbb3380a19403fecb93386ec811
2017-05-31 12:07:04 +00:00
Narayan Kamath 1e63347425 Merge "tombstoned: allow intercepts for java traces." 2017-05-31 11:55:50 +00:00
Narayan Kamath a73df601b7 tombstoned: allow intercepts for java traces.
All intercept requests and crash dump requests must now specify a
dump_type, which can be one of kDebuggerdNativeBacktrace,
kDebuggerdTombstone or kDebuggerdJavaBacktrace. Each process can have
only one outstanding intercept registered at a time.

There's only one non-trivial change in this changeset; and that is
to crash_dump. We now pass the type of dump via a command line
argument instead of inferring it from the (resent) signal, this allows
us to connect to tombstoned before we wait for the signal as the
protocol requires.

Test: debuggerd_test

Change-Id: I189b215acfecd08ac52ab29117e3465da00e3a37
2017-05-31 10:35:32 +01:00
Justin Yun eca6b3f0ea Merge "libvndksupport: Do not lookup default namespace for sphal failure" into oc-dev
am: 147743176a

Change-Id: Ic3e36ba95d124428e352f396812e700e634a1333
2017-05-31 07:09:33 +00:00