Skip to content

fix: Fix race in emulator controller#2836

Merged
gcf-merge-on-green[bot] merged 2 commits intogoogleapis:mainfrom
mutianf:emulator
Mar 9, 2026
Merged

fix: Fix race in emulator controller#2836
gcf-merge-on-green[bot] merged 2 commits intogoogleapis:mainfrom
mutianf:emulator

Conversation

@mutianf
Copy link
Contributor

@mutianf mutianf commented Mar 9, 2026

Fix TSan data race in EmulatorController by synchronizing logging threads.

The race condition occurred when a previous emulator process instance was shutting down
while a new instance was starting. The logging threads for stdout/stderr of the previous
process could still be reading from file descriptors that were subsequently reused for
the new process's pipes.

This fix ensures that:

  1. Logging threads are tracked.
  2. EmulatorController.stop() joins these threads after destroying the process.
  3. EmulatorController.stop() waits for the process to exit completely.

@mutianf mutianf requested review from a team as code owners March 9, 2026 14:21
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigtable Issues related to the googleapis/java-bigtable API. labels Mar 9, 2026
@mutianf mutianf added the automerge Merge the pull request once unit tests and other checks pass. label Mar 9, 2026
@gcf-merge-on-green gcf-merge-on-green bot merged commit 17707be into googleapis:main Mar 9, 2026
25 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the googleapis/java-bigtable API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants