summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2017-09-13 14:39:45 -0700
committerTom Cherry <tomcherry@google.com>2017-09-16 00:33:13 +0000
commitcbd66d3c8a672ed1f762444e4bfd6cd9b44a924d (patch)
treed3b21764f5d0105cc4567e4b12cb831ad144da8d /trusty/coverage/coverage.cpp
parentdf77f328e7d66a2f194fe404fb6989e36a21ab7b (diff)
init: fix crash when reboot is triggered by a builtin
Builtin commands may set the sys.powerctl property, which causes reboot to be immediately processed. Unfortunately, part of the reboot processing involves clearing the action queue, so when this scenario happens, ActionManager::ExecuteOneCommand() can abort due to its state being unexpectedly changed. Longer term, the real fix here is to split init and property service. In this case, the property sets will be sent to property service and the reboot will only be processed once property service responds back to init that the property has been set. Since that will not happen within the action queue, there will be no risk of failure. Short term, this change sets a flag in init to shutdown the device before the next action is run, which defers the shutdown enough to fix the crash, but continues to prevent any further commands from running. Bug: 65374456 Test: force bullhead into the repro case and observe that it no longer repros Merged-In: I89c73dad8d7912a845d694b095cab061b8dcc05e Change-Id: I89c73dad8d7912a845d694b095cab061b8dcc05e (cherry picked from commit 3633a4014a1a315000c3e6dee36b419473ab44b9)
Diffstat (limited to 'trusty/coverage/coverage.cpp')
0 files changed, 0 insertions, 0 deletions