When system_server and zygote crash or get killed, all apps also get
killed but their process groups are left empty. Provide a function to
remove all empty process groups so that init can purge them when this
even happens.
Bug: 228160715
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ife38ca021e80cd38106f218ae13183e8c2631bf0
Let's turn a bug into a feature... Since this code is built with intsan,
anyone who caused overflow here will have had an abort, so we know
no-one actually needs the BAD_INDEX return that was presumably the
original author's intent. So let's just mandate that, since it's a lot
harder to ignore an abort than it is to ignore an error return.
Bug: http://b/179044558
Test: treehugger
Change-Id: I08f1018f9da1e09de885699138b7543d55bb2a36
When bootchart is enabled its thread shares the mount namespace context
with the main thread. This prevents the main thread to switch the mount
namespace later with setns().
So, unshare() the mount namespace of the bootchart thread.
Bug: 229983560
Test: rebooted with bootcharting on/off
enter_default_mount_ns should succeeded.
Change-Id: Idac0d0efcb4f7f7d8a7cbcebf8fa2fa29f104c35
[1] changed the UID of the virtualizationservice daemon and
/data/misc/virtualizationservice directory to `system`. However, this
can cause a permission denial issue when the directory has stale files
when the device was running a build before [1] and an OTA to [1] (or
above) is attempted. The daemon tries to delete the stale files - which
must have been still labeled as old UID and thus the daemon has no
privileged to delete them.
Fixing this issue by ensuring that the directory is always empty by
init.
[1] https://android-review.googlesource.com/c/platform/packages/modules/Virtualization/+/2059527
Bug: 230056726
Test: watch TH
Change-Id: I61c0297503347932b14b83859bec9ff82628336f
am skip reason: skipped by user karthikmr
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1915268
Change-Id: Id8c7c1b3172c080e9a0444b71df5d7070f86318a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: skipped by user agowdra
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1844795
Change-Id: I1fa9f4a24e033a1dfcbff7874f14914362dc3627
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: skipped by user karthikmr
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1535382
Change-Id: Id2f5bcebee06911e98501a3678e764fcb8c86b4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I971fd9e25741e18bf7f5907d562556b09db1d624 with SHA-1 0e743a25c9 is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1364665
Change-Id: I412c33ac742c4a0bf3a6d78f7286860d5765eccf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I971fd9e25741e18bf7f5907d562556b09db1d624 with SHA-1 0e743a25c9 is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1364665
Change-Id: If69569f83b728bb3c12a3b32867a70cf9dfba885
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I00366b281eafa5677b0941419a86f2702fb3484b with SHA-1 019f731097 is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1258132
Change-Id: I9033fd1c71d9b8c1ba2d22aa749b67c0e3847229
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In I00366b281eafa5677b0941419a86f2702fb3484b with SHA-1 019f731097 is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1258132
Change-Id: I46f275e004122f98561cac73a929b35aa4c2419c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: skipped by user dmulabagal
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1239888
Change-Id: Iff496292bb431a8e639aa5b589027f6f0fce9ef1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: skipped by user agowdra
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1168004
Change-Id: I2b5ad73b542db4bb27c73240fd6463fa0e235082
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: skipped by user dvander
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1150077
Change-Id: I540915c9b355eb729c5ce47aa7dbe93e8ef547e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: skipped by user robinjacob
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1146576
Change-Id: Ibdef2d9dd3c52b2fa61a5557d7e91c665f8d29ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>