Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes race conditions in HubDeviceSelect. #795

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

balazsracz
Copy link
Collaborator

These were problematic when the shutdown/close happened on a different thread than the executor. Caused flakey tests.

Updates a test helper to use heap memory because that plays nicer with Valgrind's data race checker.

These were problematic when the shutdown/close happened on a different thread
than the executor. Caused flakey tests.
@balazsracz balazsracz requested a review from bakerstu August 16, 2024 02:28
bool completed = false;
while (!completed)
{
executor()->sync_run([this, &completed]() {
Copy link
Owner

Choose a reason for hiding this comment

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

Brace style.

// This is a workaround that sometimes my linux kernel gets stuck in
// ::read when I closed the fd like this, even though the fd is
// O_NONBLOCK.
executor()->add(new CallbackExecutable([this, fd]() {
Copy link
Owner

Choose a reason for hiding this comment

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

Brace style.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@balazsracz balazsracz merged commit 2f7da9f into master Aug 20, 2024
4 checks passed
@balazsracz balazsracz deleted the bracz-hubdeviceselect-races branch August 20, 2024 16:10
atanisoft added a commit to atanisoft/OpenMRNIDF that referenced this pull request Aug 20, 2024
balazsracz added a commit that referenced this pull request Aug 20, 2024
* master:
  Bug fixes in DataBuffer (#791)
  Fixes race conditions in HubDeviceSelect. (#795)
  Fixes missing translation of enums when reading the security mode from a simplelink profile. (#796)
  Fixes flaky IfCanStress.test. (#794)
balazsracz added a commit that referenced this pull request Aug 22, 2024
* master:
  Fixes a standards compliance issue with the alias conflict handler. (#793)
  Bug fixes in DataBuffer (#791)
  Fixes race conditions in HubDeviceSelect. (#795)
  Fixes missing translation of enums when reading the security mode from a simplelink profile. (#796)
balazsracz added a commit that referenced this pull request Jan 16, 2025
* master: (76 commits)
  Fixes some compile errors in nucleo and bracz.acc.
  ESP-IDF CMakeLists (#800)
  BLE Basic Infrastructure (#788)
  Handles unhandled-addressed-messages by generating an OIR reply. (#798)
  Adds factory reset handler to linux:io_board. (#797)
  Fixes a standards compliance issue with the alias conflict handler. (#793)
  Bug fixes in DataBuffer (#791)
  Fixes race conditions in HubDeviceSelect. (#795)
  Fixes missing translation of enums when reading the security mode from a simplelink profile. (#796)
  Fixes flaky IfCanStress.test. (#794)
  Pin esp32 platform to 2.0.x (#792)
  Fixes detecting EOF in the memory config protocol handler. (#789)
  Adds a new hub application using DirectHub (#761)
  High-performance hub component for dealing with many sockets and high throughput (#760)
  Fix build of esp8266 train implementation.
  Removes unnecessary includes that might not exist on an embedded compiler.
  Fix compilation of TempFile under esp8266.
  Add libatomic to esp8266 nonos target.
  Fix compile errors in time_client app.
  Fixes in file memory space: (#786)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants