Skip to content

fix mock NMR deregister race. - #319

Open
shankarseal wants to merge 1 commit into
microsoft:mainfrom
shankarseal:shankarseal-fix-nmr-deregister-race
Open

fix mock NMR deregister race.#319
shankarseal wants to merge 1 commit into
microsoft:mainfrom
shankarseal:shankarseal-fix-nmr-deregister-race

Conversation

@shankarseal

Copy link
Copy Markdown
Collaborator

Summary

  • fix the mock NMR deregister race where a Start binding could be treated as already unbinding
  • when a binding transitions to Ready/Ready, immediately start unbind if either side is already deregistering
  • add a concurrent register/deregister smoke test that loops provider and client registration/deregistration and prints executed iteration counts

Testing

  • run usersim_tests with filter: "concurrent register/deregister smoke"

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e257781-cd5a-4ae3-9943-0c217ccad54e
@shankarseal
shankarseal force-pushed the shankarseal-fix-nmr-deregister-race branch from 2d4b365 to 7d63080 Compare August 3, 2026 08:52
@shankarseal
shankarseal requested a review from mikeagun August 3, 2026 16:35
Comment thread tests/nmr_test.cpp
std::atomic<size_t> provider_iterations{0};
std::atomic<size_t> client_iterations{0};

std::thread provider_thread([iteration_count, &provider_iterations]() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have some sort of synchronization to ensure the provider and client actually overlap, or at least counter(s) so we can review how much potential contention there was?

My concern is that in CI one thread could complete its iterations before the second thread starts.

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

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants