From 331a939bf8f966d80a2dbf5caf5741b2446bae1a Mon Sep 17 00:00:00 2001 From: Fred Fettinger Date: Tue, 30 Sep 2014 10:09:10 -0500 Subject: [PATCH] init.trace.rc: fix race condition with class_start core The systrace permissions from init.trace.rc and the "class_start core" which launches surfaceflinger are both in an "on boot" section. However, the init.trace.rc commands are parsed after all commands in init.rc. This means that "class_start core" is executed before the chmod command which allows processes to write to trace_marker. If any services execute their first trace command before the chmod occurs, then that service won't be able to write traces until the service is restarted. To fix this, run all of the init.trace.rc commands in the "early-boot" section to ensure they are completed first. Bug: 17612265 Change-Id: Ibf544762173d5ba98272c66ef485d8eab7d70bf3 --- rootdir/init.trace.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootdir/init.trace.rc b/rootdir/init.trace.rc index 50944e6c4..cd8d35037 100644 --- a/rootdir/init.trace.rc +++ b/rootdir/init.trace.rc @@ -1,6 +1,6 @@ ## Permissions to allow system-wide tracing to the kernel trace buffer. ## -on boot +on early-boot # Allow writing to the kernel trace log. chmod 0222 /sys/kernel/debug/tracing/trace_marker