Skip to content

Commit 331a939

Browse files
Fred FettingerMichael Lentine
authored andcommitted
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
1 parent 8dd3ea5 commit 331a939

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rootdir/init.trace.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Permissions to allow system-wide tracing to the kernel trace buffer.
22
##
3-
on boot
3+
on early-boot
44

55
# Allow writing to the kernel trace log.
66
chmod 0222 /sys/kernel/debug/tracing/trace_marker

0 commit comments

Comments
 (0)