From 75be784fba700a40653694f266f6cfa1efd169bd Mon Sep 17 00:00:00 2001 From: Nikita Ioffe Date: Mon, 24 Oct 2022 15:31:11 +0100 Subject: [PATCH] Switch to tombstoned.microdroid The long term plan is to completely remove tombstoned from microdroid (b/243494912), however it might take time some time to implement it. In the meantime, we've recently removed cgroups support from the microdroid kernel. This means that starting a tombstoned results in a bunch of non-fatal errors in the logs that are related to the fact that tombstoned service specifies task_profiles. To get rid of these error messages we temporary add a microdroid variant of the tombstoned (tombstoned.microdroid) that doesn't specify task_profiles. Bug: 239367015 Test: microdroid presubmit Change-Id: Ia7d37ede2276790008702e48fdfaf37f4c1fd251 --- debuggerd/Android.bp | 14 ++++++++++++-- debuggerd/tombstoned/tombstoned.microdroid.rc | 7 +++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 debuggerd/tombstoned/tombstoned.microdroid.rc diff --git a/debuggerd/Android.bp b/debuggerd/Android.bp index 1be69c3a7..7afbbe7c6 100644 --- a/debuggerd/Android.bp +++ b/debuggerd/Android.bp @@ -426,8 +426,8 @@ cc_binary { local_include_dirs: ["include"], } -cc_binary { - name: "tombstoned", +cc_defaults { + name: "tombstoned_defaults", srcs: [ "util.cpp", "tombstoned/intercept_manager.cpp", @@ -446,10 +446,20 @@ cc_binary { "libevent", "liblog", ], +} +cc_binary { + name: "tombstoned", + defaults: ["tombstoned_defaults"], init_rc: ["tombstoned/tombstoned.rc"], } +cc_binary { + name: "tombstoned.microdroid", + defaults: ["tombstoned_defaults"], + init_rc: ["tombstoned/tombstoned.microdroid.rc"], +} + prebuilt_etc { name: "crash_dump.policy", sub_dir: "seccomp_policy", diff --git a/debuggerd/tombstoned/tombstoned.microdroid.rc b/debuggerd/tombstoned/tombstoned.microdroid.rc new file mode 100644 index 000000000..7f5c542ca --- /dev/null +++ b/debuggerd/tombstoned/tombstoned.microdroid.rc @@ -0,0 +1,7 @@ +service tombstoned /system/bin/tombstoned.microdroid + user tombstoned + group system + + socket tombstoned_crash seqpacket 0666 system system + socket tombstoned_intercept seqpacket 0666 system system + socket tombstoned_java_trace seqpacket 0666 system system