afd66f2fd3
Report kernel_panic,sysrq,livelock,<state> reboot reason via last dmesg (pstore console). Add ro.llk.killtest property, which will allow reliable ABA platforms to drop kill test and go directly to kernel panic. This should also allow some manual unit testing of the canonical boot reason report. New canonical boot reasons from llkd are: - kernel_panic,sysrq,livelock,alarm llkd itself locked up (Hail Mary) - kernel_panic,sysrq,livelock,driver uninterrruptible D state - kernel_panic,sysrq,livelock,zombie uninterrruptible Z state Manual test assumptions: - llkd is built by the platform and landed on system partition - unit test is built and landed in /data/nativetest (could land in /data/nativetest64, adjust test correspondingly) - llkd not enabled, ro.llk.enable and ro.llk.killtest are not set by platform allowing test to adjust all the configuration properties and start llkd. - or, llkd is enabled, ro.llk.enable is true, and killtest is disabled, ro.llk.killtest is false, setup by the platform. This breaks the go/apct generic operations of the unit test for llk.zombie and llk.driver as kernel panic results requiring manual intervention otherwise. If test moves to go/apct, then we will be forced to bypass these tests under this condition (but allow them to run if ro.llk.killtest is "off" so specific testing above/below can be run). for i in driver zombie; do adb shell su root setprop ro.llk.killtest off adb shell /data/nativetest/llkd_unit_test/llkd_unit_test --gtest_filter=llkd.${i} adb wait-for-device adb shell su root setprop ro.llk.killtest off sleep 60 adb shell getprop sys.boot.reason adb shell /data/nativetest/llkd_unit_test/llkd_unit_test --gtest_filter=llkd.${i} done Test: llkd_unit_test (see test assumptions) Bug: 33808187 Bug: 72838192 Change-Id: I2b24875376ddfdbc282ba3da5c5b3567de85dbc0
49 lines
1.3 KiB
Text
49 lines
1.3 KiB
Text
# eng default for ro.llk.enable and ro.khungtask.enable
|
|
on property:ro.debuggable=*
|
|
setprop llk.enable ${ro.llk.enable:-0}
|
|
setprop khungtask.enable ${ro.khungtask.enable:-0}
|
|
|
|
on property:ro.debuggable=1
|
|
setprop llk.enable ${ro.llk.enable:-1}
|
|
setprop khungtask.enable ${ro.khungtask.enable:-1}
|
|
|
|
on property:ro.llk.enable=eng
|
|
setprop llk.enable ${ro.debuggable:-0}
|
|
|
|
on property:ro.khungtask.enable=eng
|
|
setprop khungtask.enable ${ro.debuggable:-0}
|
|
|
|
on property:llk.enable=1
|
|
setprop llk.enable true
|
|
|
|
on property:llk.enable=0
|
|
setprop llk.enable false
|
|
|
|
on property:khungtask.enable=1
|
|
setprop khungtask.enable true
|
|
|
|
on property:khungtask.enable=0
|
|
setprop khungtask.enable false
|
|
|
|
# Configure [khungtaskd]
|
|
on property:khungtask.enable=true
|
|
write /proc/sys/kernel/hung_task_timeout_secs ${ro.khungtask.timeout:-720}
|
|
write /proc/sys/kernel/hung_task_warnings 65535
|
|
write /proc/sys/kernel/hung_task_check_count 65535
|
|
write /proc/sys/kernel/hung_task_panic 1
|
|
|
|
on property:khungtask.enable=false
|
|
write /proc/sys/kernel/hung_task_panic 0
|
|
|
|
on property:llk.enable=true
|
|
start llkd
|
|
|
|
service llkd /system/bin/llkd
|
|
class late_start
|
|
disabled
|
|
user llkd
|
|
group llkd readproc
|
|
capabilities KILL IPC_LOCK
|
|
file /dev/kmsg w
|
|
file /proc/sysrq-trigger w
|
|
writepid /dev/cpuset/system-background/tasks
|