Skip to content

android: serialize teardown and log retention per session #321

Closed

Description

@ElbertePlinio

Found in review of PR #319 (#315).

Desktop and browser teardown call retainSessionLogs inside withSessionVncLock, so retains for one session id run one at a time. Android-only teardown (retainAndroidOnlyLogs in packages/android/src/session.ts) holds no such lock. So a reaper teardown and a user destroy of the same Android session can retain at the same time.

PR #319 keeps a stopped.json temp whose writer pid is alive, so overlapping retains no longer fail. That pid check is now the only defense. If a live process reuses a dead writer's pid, the orphan temp stays and blocks pruning of that session.

  • Serialize Android-only teardown and retention per session, like desktop and browser teardown
  • Test: overlapping destroys of one Android session both succeed and leave one stopped.json

Activity

  1. added
    enhancement
    on Oct 9, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions