Fix remaining issues with parallel unit-tests and enable in CI#10780
Draft
jschmidt-icinga wants to merge 8 commits intomasterfrom
Draft
Fix remaining issues with parallel unit-tests and enable in CI#10780jschmidt-icinga wants to merge 8 commits intomasterfrom
jschmidt-icinga wants to merge 8 commits intomasterfrom
Conversation
e66682f to
09eaa19
Compare
Base automatically changed from
certificate_fixture_two_electric_boogaloo
to
master
April 7, 2026 07:35
e14ad02 to
da581a1
Compare
c81a497 to
fa1c1d2
Compare
e581409 to
1b568ac
Compare
This isn't strictly necessary, but since tests are now running in parallel, it doesn't hurt to give slower machines more time to complete these tests and this gives a little more headroom for potential changes that subtly affect the behavor of the components involved (like boost new versions).
The issue occurs when ::Connect in `EnsureConnected()` returns after `Disconnect()` has already set `m_Stopped` to true. By adding a check and throwing an exception before entering `async_handshake()` the behavior should now always be consistent.
The issue is that std::promise internally also used thread local storage, in a call to `std::call_once` in `std::promise::set_value()`. The theory is that since all paths in `Send()` run this `std::call_once` routine and from then on, then Coroutine function looks like a normal function, the compiler inlined `set_value()` and moved the common parts of it to a common location for all paths before the suspension point in WriteMessage(yc). When finally the coroutine is resumes, it is likely that that happens under a different thread, which still has `__once_callable` in `std::call_once` set as `nullptr`, leading to the segmentation fault. The fix is to not use std::promise across coroutine suspension points and instead reimplement the functionality we required from it in a small helper class `SyncResult` that does not require any thread local storag.
1b568ac to
c9e0d40
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR enables and fixes parallel unit-test execution on the Github Runners.
It has been split off from #10767 because the debugging loop around the ARM64 container image was very time intensive and was holding up the review of the PR. Also, more fixes will be necessary than fit into the scope of that PR.
PS: The newest push contains an additional fix (hopefully) for the build issues reported in #10811. This is probably out of scope for this PR, so my plan is, once we have confirmed that all issues are fixed, move the production code fixes for
PerfdataWriterConnectioninto one or more separate PRs and leave only the fixes related to parallel test here.