Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c99a8a9 authored by Steven Moreland's avatar Steven Moreland
Browse files

init: even better service already running log

I changed this log many years ago because I was debugging issues
in init's service state system. The flags can help debug such an
issue.

Now, we include two more pieces of information when services are
already running and requested to run:
- PID: sometimes we get bugs where services are being requested
  to start over and over, but they are already running. Usually,
  this happens because they are deadlocked early in
  initialization. If the service started long ago, and we don't
  have a `ps` listing, then we don't know what PID it is
  unless a log gives it away.
- time since start: lets us know how long this has been
  going on. If it's been going on a very long time, it hints at
  missing hang detection.

I chose to print time since start, rather than the exact time,
due to ease of formatting.

Bug: 425756421
Test: boot, log:
[   44.749669] init: service 'zygote' requested start, but it is already
running (flags: 4, pid: 852, started 1059ms ago)

Change-Id: I4a3715b2d0d0756e748b1bbe37ce543bcb9b1feb
parent 1cf4467d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment