factory init: Find a stable way to inhibit jobs |
|||||||
Issue descriptionThis is related to recent crash about devices using trunksd. We've found that if trunksd didn't start in time, Chrome may crash. If we put trunksd into common.d/inhibit_jobs, Chrome will also crash. The issue to discuss here is the case of having trunksd inhibited. Background: Upstart has a rule (that I'm not 100%, but seems so) if a job's (say job_a) rule is 'start on starting other_job', then other_job won't be executed until job_a has entered 'started' state. trunksd was made as 'start on starting system-services and started dbus'. So if we try to stop it (the common.d/inhibit_jobs was done by calling "stop -n job" inside the job filter), it seems like system-services may not move on and stuck at 'starting' state. However, we don't see same issue for all other jobs that also set start on 'starting system-services', for example cros-disks and update-engine.
,
Jan 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/75382e829ad54d4db39a43743129030db96206a0 commit 75382e829ad54d4db39a43743129030db96206a0 Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Jan 03 10:15:42 2017 init: Allow executing extra commands when inhibited jobs was fired. Upstart is a based on state machine so we sometimes need to do few things, for example firing Upstart events, when a job was inhibited. For example, if job A depends on job B and we only want to inhibit job B (i.e., job A must be executed), then we have to send 'started JOB=B' for Upstart to continue. To support this, common.d/inhibited_jobs/* now supports shell scripts so we can send extra events, or do something else when a job was inhibited. BUG= chromium:677915 TEST=Created 'trunksd' with 'initctl -n emit started JOB=trunksd' and see tpm_managerd was invoked. Change-Id: Ic8f725660b7425d1a0de62299ced68691937456a Reviewed-on: https://chromium-review.googlesource.com/424458 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Youcheng Syu <youcheng@google.com> [modify] https://crrev.com/75382e829ad54d4db39a43743129030db96206a0/init/common.d/inhibit_jobs/README.md [modify] https://crrev.com/75382e829ad54d4db39a43743129030db96206a0/init/common.d/inhibit_jobs/filter.sh
,
Jan 23 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/c8d131200b1ae08079a07edd100553b3bf645e36 commit c8d131200b1ae08079a07edd100553b3bf645e36 Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Jan 03 10:15:42 2017 init: Allow executing extra commands when inhibited jobs was fired. Upstart is a based on state machine so we sometimes need to do few things, for example firing Upstart events, when a job was inhibited. For example, if job A depends on job B and we only want to inhibit job B (i.e., job A must be executed), then we have to send 'started JOB=B' for Upstart to continue. To support this, common.d/inhibited_jobs/* now supports shell scripts so we can send extra events, or do something else when a job was inhibited. BUG= chromium:677915 TEST=Created 'trunksd' with 'initctl -n emit started JOB=trunksd' and see tpm_managerd was invoked. Change-Id: Ic8f725660b7425d1a0de62299ced68691937456a Reviewed-on: https://chromium-review.googlesource.com/424458 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Youcheng Syu <youcheng@google.com> (cherry picked from commit 75382e829ad54d4db39a43743129030db96206a0) Reviewed-on: https://chromium-review.googlesource.com/430524 Commit-Queue: Youcheng Syu <youcheng@google.com> Tested-by: Youcheng Syu <youcheng@google.com> [modify] https://crrev.com/c8d131200b1ae08079a07edd100553b3bf645e36/init/common.d/inhibit_jobs/README.md [modify] https://crrev.com/c8d131200b1ae08079a07edd100553b3bf645e36/init/common.d/inhibit_jobs/filter.sh
,
Jan 25 2017
I think we've learned a lot, probably enough.
,
Apr 17 2017
,
May 30 2017
,
Aug 1 2017
,
Oct 14 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by hungte@chromium.org
, Jan 3 2017