Skip to content

Two simultaneous startnetldi leave an orphaned NetLDI #127

Open

Description

@MatiasFernandez

Problem. Two simultaneous startnetldi can both exit 0 and leave two netldid processes with the same name. gslist and stopnetldi see only one, so the other is orphaned and nothing GemDB runs can stop it. This is the NetLDI analogue of two stones on one extent.

Measured on 4.0.0.a4 with an isolated root, starting from zero processes: two startnetldi launched together left two netldid processes in 2 of 3 clean runs (6 of 6 in an earlier loop). When started 0-15 ms apart in other runs, the loser exited 3; with 20-400 ms between them it exited 1.

Closed PR #89 and #112 assumed the loser always fails ("Server 'gemdbldi' is already running"). That holds only when the starts are far enough apart.

Not obvious: the stone lock from #118 prevents this between GemDB processes that have it. GemDB 1.5.x and 1.6.0 start NetLDI without the lock, so a mixed-version race can still leave an orphan.

Scope:

  1. Record it in CLAUDE.md's engine-gotchas area.
  2. Decide whether stop and uninstall should detect and kill an orphaned netldid for gemdbldi (for example with pgrep), and what to do if it can't be told from another user's.
  3. Report it upstream to the GemStone engine team, and link the report here.

Done when: the gotcha is in CLAUDE.md, the stop/uninstall decision is made (and implemented if yes), and the upstream report is linked.

Activity

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