Skip to content

fix: add protections against dataraces in socket engines, cluster timer and queues.#1587

Open
fclivaz42 wants to merge 1 commit into
brainboxdotcc:devfrom
fclivaz42:queues-socketengines
Open

fix: add protections against dataraces in socket engines, cluster timer and queues.#1587
fclivaz42 wants to merge 1 commit into
brainboxdotcc:devfrom
fclivaz42:queues-socketengines

Conversation

@fclivaz42
Copy link
Copy Markdown

As discussed, here is a smaller PR with less risky changes.
I have changed the following:

  • epoll, where I removed an unused variable and added a lock where elements were removed from the fds vector
  • kqueue, where I have added a lock similar to epoll
  • queues, where I have changed two booleans to std::atomic booleans, added a safeguard for the cli variable and guards for the removals vector.
  • timer, where I added a guard to an unguarded if statement.

I believe these changes are light enough to not cause any issues whatsoever, and have kept the riskier changes out of this PR for now while I do more testing on my end.

Code change checklist

  • I have ensured that all methods and functions are fully documented using doxygen style comments.
  • My code follows the coding style guide.
  • I tested that my change works before raising the PR.
  • I have ensured that I did not break any existing API calls.
  • I have not built my pull request using AI, a static analysis tool or similar without any human oversight.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for dpp-dev ready!

Name Link
🔨 Latest commit d730187
🔍 Latest deploy log https://app.netlify.com/projects/dpp-dev/deploys/6a07a9f21335d90008b12e7c
😎 Deploy Preview https://deploy-preview-1587--dpp-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added documentation Improvements or additions to documentation code Improvements or additions to code. labels May 15, 2026
@egorpugin
Copy link
Copy Markdown
Contributor

My simple echo bots are stuck in epoll even with 10.1.5 version.
Does this fixes exactly those issues?

@fclivaz42
Copy link
Copy Markdown
Author

My simple echo bots are stuck in epoll even with 10.1.5 version. Does this fixes exactly those issues?

You could try to test run by applying this PR as a patch and compile/install the library then test it. Feedback would actually be very welcome!

@braindigitalis
Copy link
Copy Markdown
Contributor

are you saying a simple test bot now gets stuck in epoll and didn't before 10.1.5?

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

Labels

code Improvements or additions to code. documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants