Skip to content

Fix session bead adoption race#2051

Open
julianknutsen wants to merge 1 commit into
mainfrom
fix/1155-session-bead-race
Open

Fix session bead adoption race#2051
julianknutsen wants to merge 1 commit into
mainfrom
fix/1155-session-bead-race

Conversation

@julianknutsen
Copy link
Copy Markdown
Collaborator

Summary

  • serialize adoption barrier session bead creation with the city session identifier lock
  • re-check for a live session bead inside the lock before creating
  • pass cityPath into startup/controller adoption paths
  • add regression coverage for the adoption/sync lock race

Fixes #1155

Tests

  • go test ./cmd/gc -run 'TestAdoptionBarrier_SerializesCreateWithSessionIdentifierLock|TestAdoptionBarrier' -count=1
  • go test ./cmd/gc -run 'TestAdoptionBarrier|TestSyncSessionBeads_(CreatesNewBeads|DuplicatePoolSessionNameKeepsVisibleOwner|SetsManagedAlias|DoesNotRewriteOwnershipWhenAliasRepairFails|ValidatesPreStampedPoolAlias)' -count=1
  • make test
  • make check

@julianknutsen julianknutsen added the status/needs-review-auto PR review requested with auto approval label May 13, 2026
@github-actions github-actions Bot added the status/needs-triage Inbox — we haven't looked at it yet label May 13, 2026
@julianknutsen julianknutsen added status/reviewing status/needs-review-auto PR review requested with auto approval and removed status/needs-review-auto PR review requested with auto approval labels May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/needs-triage Inbox — we haven't looked at it yet status/reviewing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TOCTOU race: adoption_barrier and syncSessionBeads duplicate session beads

1 participant