Commit graph

36568 commits

Author SHA1 Message Date
Jiyong Park
25a03a23a8 Merge changes from topic "vndk_jni" into oc-mr1-dev
am: 6f7d928940

Change-Id: I69af1cdf06bf71f1125644c7064b40444613eaa7
2017-09-14 14:52:51 +00:00
Jiyong Park
6eaa30765e add llndk|vndksp.libraries.txt to vndk_package
am: 26335f89b1

Change-Id: Idc8d3ff696c782963337fa21ead8a7665c0a1e98
2017-09-14 14:52:40 +00:00
Tom Cherry
988220c73c Merge "init: fix variable scope issue with ExpandArgs()" into oc-mr1-dev
am: ece234f9ac  -s ours

Change-Id: I62d19f8801886164e281da42556c9206b6dc9adf
2017-09-14 14:52:03 +00:00
Tom Cherry
e171070d59 init: fix signal handling and LOG(FATAL) in child processes
am: 43a7da2c40  -s ours

Change-Id: Iebb3723088f30725a939945c0640175680cda0e6
2017-09-14 14:10:43 +00:00
Narayan Kamath
fa6836f560 Merge "tombstoned: Fix calls to evconnlistener_new." am: e997ba9d22 am: 17785d2030
am: ad458ebcd6

Change-Id: I7bc7e3adbd02438b5e9169edb220a19a9f81d4da
2017-09-14 08:42:24 +00:00
Narayan Kamath
ad458ebcd6 Merge "tombstoned: Fix calls to evconnlistener_new." am: e997ba9d22
am: 17785d2030

Change-Id: I6193a241c5ed48064e1d22f84c4c47457e0e1c5c
2017-09-14 08:39:34 +00:00
Narayan Kamath
17785d2030 Merge "tombstoned: Fix calls to evconnlistener_new."
am: e997ba9d22

Change-Id: I039af85caf1a81a753caa0c069b3e97253198c59
2017-09-14 08:36:25 +00:00
Narayan Kamath
e997ba9d22 Merge "tombstoned: Fix calls to evconnlistener_new." 2017-09-14 08:33:49 +00:00
Josh Gao
f034660179 Merge "debuggerd_fallback: print maps." am: 26123d7ec0 am: 4abd463d20
am: 1987fb6f7c

Change-Id: I417ca7dbc9da9c907357f96241766a07b2ef4267
2017-09-14 06:12:31 +00:00
Justin Yun
705f601b84 Merge "Mark libmemtrack as VNDK in Android.bp" am: 0978f02468 am: 5dd33fe086
am: 347685b77d  -s ours

Change-Id: Ib7e79e0f7c8826821533d6db5fff18c23dfe22f0
2017-09-14 06:12:03 +00:00
James Hawkins
7e992d8b52 bootstat: Log the ro.boot.bootreason property through the new platform_reason Tron field.
am: ea2e67526d  -s ours

Change-Id: Ic44ade21e121e7ded22bf34a990ed58bb315b6f1
2017-09-14 06:06:22 +00:00
Josh Gao
1987fb6f7c Merge "debuggerd_fallback: print maps." am: 26123d7ec0
am: 4abd463d20

Change-Id: Ic0ee23fcaa51aa1ceeef0da9df013033ff2acd37
2017-09-14 05:59:13 +00:00
Josh Gao
4abd463d20 Merge "debuggerd_fallback: print maps."
am: 26123d7ec0

Change-Id: I122af30e6f3e205308a44ebf9bdbc7128ce3f246
2017-09-14 05:56:46 +00:00
Justin Yun
347685b77d Merge "Mark libmemtrack as VNDK in Android.bp" am: 0978f02468
am: 5dd33fe086

Change-Id: Id5f5553d9f94d0d3ae446fb888bd65085dd1d623
2017-09-14 05:54:15 +00:00
Treehugger Robot
26123d7ec0 Merge "debuggerd_fallback: print maps." 2017-09-14 05:49:24 +00:00
Justin Yun
5dd33fe086 Merge "Mark libmemtrack as VNDK in Android.bp"
am: 0978f02468

Change-Id: Ia0e454b24dece7ef2ca4d5367df104953fe41c95
2017-09-14 05:36:44 +00:00
Treehugger Robot
0978f02468 Merge "Mark libmemtrack as VNDK in Android.bp" 2017-09-14 05:26:14 +00:00
Justin Yun
ef59c16450 Mark libmemtrack as VNDK in Android.bp
As a VNDK module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK module is formated as below:
vndk: {
    enabled: true,
},

VNDK modules will be installed both in system/lib(64) as normal and
in system/lib(64)/vndk as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: I4b9e560ca6d4751889a7b14f205e678b68c20008
Change-Id: I4b9e560ca6d4751889a7b14f205e678b68c20008
(cherry picked from commit 7aeb5bb86c)
2017-09-14 02:46:36 +00:00
TreeHugger Robot
6f7d928940 Merge changes from topic "vndk_jni" into oc-mr1-dev
* changes:
  vendor apk is unbundled
  add llndk|vndksp.libraries.txt to vndk_package
2017-09-14 01:35:43 +00:00
Josh Gao
fdc95c9670 debuggerd_fallback: print maps.
Bug: http://b/63400743
Bug: http://b/65590288
Test: killall -ABRT media.codec
Change-Id: I58e47dcd8e99ad7a5945604c27876dd01259e501
2017-09-13 18:30:11 -07:00
Jeff Sharkey
6b82ada2e0 Merge "Add "operator bool" overload to android::sp." am: 28ebfe18fb am: 56c22732c6
am: a915e99e04

Change-Id: I28b9df6d67ae28ccdf6ec1af773de57fff45a49a
2017-09-14 00:53:23 +00:00
Mark Salyzyn
9c017432de Merge changes from topic "b/63736262" am: 1f666a6be9 am: 6818f80dbb
am: 7a5c52f78f

Change-Id: I13577d905dc6c0e6d873e23663c4da01531b2267
2017-09-14 00:52:10 +00:00
George Burgess IV
65c029c9a9 Merge "Fix static analyzer warnings" am: 7176951b9b am: 34abe0cf5c
am: 7f7d002bb1

Change-Id: I9197ff85d891117ef9aa8cfd05c7060dba025002
2017-09-14 00:51:25 +00:00
Dimitry Ivanov
b968ccb952 Merge "Recommend using pid instead of tid for gdbclient.py" am: 0d2105bf0b am: d56fee7686
am: 3d3ede7249

Change-Id: I6baae158168ee412c9c54f33bce3ca77b8b16a61
2017-09-14 00:50:50 +00:00
Jeff Sharkey
a915e99e04 Merge "Add "operator bool" overload to android::sp." am: 28ebfe18fb
am: 56c22732c6

Change-Id: I0068bb0fee78b62abe97175b2594b579b6fc8f81
2017-09-13 23:14:06 +00:00
Mark Salyzyn
7a5c52f78f Merge changes from topic "b/63736262" am: 1f666a6be9
am: 6818f80dbb

Change-Id: Ibd9aaaab96fa60ee6f9d00baea0483a2cd328048
2017-09-13 23:13:12 +00:00
George Burgess IV
7f7d002bb1 Merge "Fix static analyzer warnings" am: 7176951b9b
am: 34abe0cf5c

Change-Id: I1472b8624576dd8790b3d975b338c6597b4dd553
2017-09-13 23:12:20 +00:00
Dimitry Ivanov
3d3ede7249 Merge "Recommend using pid instead of tid for gdbclient.py" am: 0d2105bf0b
am: d56fee7686

Change-Id: Ic38ecf92432566bebc4a4b6f1901a5cf06de768a
2017-09-13 23:11:54 +00:00
Jeff Sharkey
56c22732c6 Merge "Add "operator bool" overload to android::sp."
am: 28ebfe18fb

Change-Id: Idc8a68835c6a13ab92ffce44507360c2d8e6d9e5
2017-09-13 22:47:21 +00:00
Mark Salyzyn
6818f80dbb Merge changes from topic "b/63736262"
am: 1f666a6be9

Change-Id: I2586aac3d6fe8252ee6728de64fb37102accf0da
2017-09-13 22:45:52 +00:00
George Burgess IV
34abe0cf5c Merge "Fix static analyzer warnings"
am: 7176951b9b

Change-Id: Ie0e915a07644d0537b3e29a3b756705d45703e7f
2017-09-13 22:45:18 +00:00
Dimitry Ivanov
d56fee7686 Merge "Recommend using pid instead of tid for gdbclient.py"
am: 0d2105bf0b

Change-Id: I2eb30ad447f41b5d9ec77058e7bbbd51a3e2adf7
2017-09-13 22:44:46 +00:00
Tom Cherry
ece234f9ac Merge "init: fix variable scope issue with ExpandArgs()" into oc-mr1-dev 2017-09-13 22:40:44 +00:00
Treehugger Robot
28ebfe18fb Merge "Add "operator bool" overload to android::sp." 2017-09-13 20:35:38 +00:00
Treehugger Robot
1f666a6be9 Merge changes from topic "b/63736262"
* changes:
  adb: reboot: last boot command default
  bootstat: introduce sys.boot.reason
2017-09-13 20:25:33 +00:00
Tom Cherry
48db85c19f init: fix variable scope issue with ExpandArgs()
ExpandArgs() was factored out of Service::Start() to clean up init,
however this introduced a bug: the scope of expanded_args ends when
ExpandArgs() returns, yet pointers to the c strings contained within
those std::strings are returned from the function.  These pointers are
invalid and have been seen to cause failures on real devices.

This change moves the execv() into ExpandArgs() and renames it
ExpandArgsAndExecv() to keep the clean separation of Service::Start()
but fix the variable scope issue.

Bug: 65303004
Test: boot fugu
Change-Id: I612128631f5b58d040bffcbc2220593ad16cd450
(cherry picked from commit 5e405cacb1)
2017-09-13 13:11:48 -07:00
Tom Cherry
43a7da2c40 init: fix signal handling and LOG(FATAL) in child processes
Child processes inherit the signal handlers from their parent process.
In the case of init, fork()'ed processes, will attempt to reboot the
system if they receive a fatal signal).  This is not the correct behavior;
these processes should terminate due to the provided signal like other
processes on the system.

This is particularly important as there are multiple LOG(FATAL) calls
in service.cpp for failures after fork() but before execv() when a
service is started.

Note, that pthread_atfork() is not a viable solution since clone() is
used in some cases instead of fork() and atfork handlers are not
called with clone().

Bug: 65637054
Test: LOG(FATAL) from a child process of init and see that it
      terminates due to a signal correctly
Test: LOG(FATAL) from init proper and see that it reboots to the
      bootloader

Change-Id: I875ebd7a5f6b3f5e3e2c028af3306917c4409db3
2017-09-13 12:56:56 -07:00
Jeff Sharkey
147b881ca9 Add "operator bool" overload to android::sp.
This matches the overload on std::unique_ptr and friends.

Test: builds, boots
Bug: 13758960
Change-Id: Ieed9faa6b162c2a10fa7cf2b135c9b17564f6c88
2017-09-13 11:06:07 -06:00
James Hawkins
ea2e67526d bootstat: Log the ro.boot.bootreason property through the new
platform_reason Tron field.

Bug: 63584589
Test: none
Change-Id: I369e6977c77619513eb7ce7637c1e3112e5a4b13
(cherry picked from commit 51e91f5e0b)
2017-09-13 08:38:38 -07:00
Narayan Kamath
c2e98f6340 tombstoned: Fix calls to evconnlistener_new.
The order of arguments is wrong - we're passing flags=static_cast<unsigned>(-1)
and backlog=LEV_OPT_CLOSE_ON_FREE (which is 2).

On versions of libevent prior to 2.1.8, this ends up accidentally setting
OPT_LEAVE_SOCKETS_BLOCKING, OPT_CLOSE_ON_EXEC, OPT_REUSABLE and OPT_THREADSAFE
and limiting our backlog to two. These unintentional changes are relatively
benign; we never make our sockets block, we never exec, we never reuse
sockets and the additional locking overhead should be negligible. The
backlog of two might be a problem in theory, but there haven't been any
reports of issues caused by it.

Things get worse on 2.1.8 - that version introduces several new flags,
one of which is OPT_DISABLED. This disables the new listener by default,
which means that our event loop returns early because it has no active listeners
for any of its events.

Bug: 64543673
Test: Manual.

Change-Id: I9954bc7fe1af761de1a950d935dd2e6ce7e2c5f5
2017-09-13 14:15:57 +01:00
Treehugger Robot
7176951b9b Merge "Fix static analyzer warnings" 2017-09-13 08:34:19 +00:00
Dimitry Ivanov
0d2105bf0b Merge "Recommend using pid instead of tid for gdbclient.py" 2017-09-13 07:41:10 +00:00
George Burgess IV
180e5e7021 Fix static analyzer warnings
The static analyzer was complaining that we were potentially leaking
memory here (in `ASSERT_NE(ptr, nullptr)` after `new (char)`). This
wasn't correct, but it's also not possible for `new` to return nullptr
without std::nothrow.

In any case, swap to direct calls to `::operator new`, since it looks
like this test explicitly wants calls to `::operator new` to be emitted
(which the C++ standard doesn't guarantee for all `new` expressions).

Bug: 27101951
Test: mma; static analyzer warnings are gone. Also ran
memunreachable_test on marlin; no failures.
Change-Id: Ia740e41079f263040da978ba1ccc71c9c39f53fd
2017-09-12 17:01:20 -07:00
Tianjie Xu
4516a1639b Merge "Add the Release function for TemporaryFiles" am: e9b3a75e6f am: e670852a5f
am: 5e539a977b

Change-Id: I46f1ec9065741895e3ee0ba6617c5094265b9f9f
2017-09-12 20:00:29 +00:00
Tianjie Xu
5e539a977b Merge "Add the Release function for TemporaryFiles" am: e9b3a75e6f
am: e670852a5f

Change-Id: Ia12cdc7b8a1abfa77c41b92907dc41619e06153e
2017-09-12 19:50:24 +00:00
Tianjie Xu
e670852a5f Merge "Add the Release function for TemporaryFiles"
am: e9b3a75e6f

Change-Id: Ia655253f41d4f1ea737e9e968c373a214d38f26f
2017-09-12 19:47:21 +00:00
Mark Salyzyn
277eca138b adb: reboot: last boot command default
For reboot [reboot_arg] requests via either reboot or adb reboot,
if reboot_arg is empty then report "shell" or "adb" respectively.

Test: boot_reason_test.sh shell_reboot adb_reboot
Bug: 63736262
Change-Id: Ie613d9e62db6a705885e4e7520aede27af3aa1b9
2017-09-12 12:24:02 -07:00
Tianjie Xu
e9b3a75e6f Merge "Add the Release function for TemporaryFiles" 2017-09-12 19:14:38 +00:00
Tom Cherry
32be6da555 Merge "init: fix variable scope issue with ExpandArgs()" am: 1973110355 am: 698981df84
am: 7954cc1324

Change-Id: I708fa1135b8426b8741a0235e58230928609fc2a
2017-09-12 16:43:25 +00:00
Tom Cherry
7954cc1324 Merge "init: fix variable scope issue with ExpandArgs()" am: 1973110355
am: 698981df84

Change-Id: I02cad02e47b87e7560596545b597d3cbb93dc390
2017-09-12 16:40:24 +00:00