Skip to content

An app's card says running while the app is dead: container state is reported as app state #870

Closed

Description

@reeseroyster

What happens

An app can be completely dead while the dashboard, and the app's own URL, both say it is fine.

After the kernel OOM killer takes the app's process inside its container, podman ps -a still reports Up (the image's init/supervisor survives), so:

  • the app list shows the card as running, and
  • the app's public port still answers — the sign-in gateway replies 302 no matter what is behind it, so opening the URL looks normal too.

Nothing in the UI says the app is down. Two of the five apps on this box had been dead this way for about 45 minutes before anyone noticed, and the only symptom was that a download chain stopped working.

Evidence, from a real occurrence

On 0.9.54, after an OOM, for a container the dashboard listed as running:

$ podman ps --format '{{.Names}}\t{{.Status}}'
sonarr_sonarr_1        Up 26 hours
$ podman exec sonarr_sonarr_1 true
Error: OCI runtime error: runc: exec failed: cannot exec in a stopped container
$ curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:<its published port>/
000                                  # nothing listening inside
$ podman restart sonarr_sonarr_1
Error: container … conmon exited prematurely, exit code could not be retrieved: conmon process killed

apps.restart (i.e. compose up -d --force-recreate) did bring it back, and the data dir was untouched — so recovery works, it is only the reporting that is wrong.

Where it comes from

In omarchyd/apps.mjs:

  • readStates() builds the list's per-app state from one podman ps -a --format json, keyed by com.docker.compose.project, and treats an app as running when any row's State is running.
  • liveState() does the same per app through compose ps -a.
  • askWeb() already exists and probes the app's own web port directly (it is what probe() uses for the Open button), so the app-level check is present but not used for the list.

So "a container is running" is being reported as "the app is running".

Suggested shape of the fix

Keep the cheap podman read as the first pass, and when it says running for an app that has a web port, confirm with the existing askWeb() probe before reporting the state — refused/timeout from a container that has been up longer than the start grace period is unhealthy (or stopped), not running. That reuses the readiness work from #11 rather than adding a new notion, and the list already tolerates a 1.5 s cache and a 3 s cap, so a bounded probe per running app fits.

Also worth considering: the sign-in gateway answering 302 for a dead upstream is indistinguishable from a healthy one at the HTTP level, so any "is this app up?" signal has to come from the port behind it.

Reproduce

  1. Install any container app with a web UI and let it start.
  2. Kill the app's process inside the container (an OOM does this for you; podman exec <c> kill <app pid> is the deterministic version), leaving the container's init alive.
  3. podman ps still says Up; podman exec fails with "cannot exec in a stopped container"; the app's port refuses; the dashboard lists it as running and its gateway still answers 302.

Not claimed

I did not test this on a non-supervisor image (one where the app is PID 1 and the container would exit properly), and I did not look at the web UI's own polling — the report is from the API/engine side and the rendered list.

Activity

  1. calledtoconstruct commented on Nov 21, 2026

    @calledtoconstruct
    Collaborator

    Working to resolve this.

    No open pull request references this issue, and no one has commented that they are working on it.

    #136, #595, #593, #743, #789, #739, #764, #132, and #681 share the app installer with this and will land in one pull request.

    🤖 Generated with Grok 4.7

  2. calledtoconstruct commented on Nov 22, 2026

    @calledtoconstruct
    Collaborator

    Thank you @reeseroyster. An app whose own page is refusing connections after the start grace is listed as stopped. This is on main in #874.

    🤖 Generated with Grok 4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions