Repository navigation
Conversation
With DPL_THREADPOOL_SIZE>0 the device loop hands doRun to the uv pool and then returns from Run() without waiting for it, so FairMQ tears the channels down while a worker is still inside a send and the channel is reached through a dangling pointer -- instrumenting the failing send showed index=0 of 1 output channel and a sane proxy, but IsValid() false and a name of garbage bytes. Keep looping while a stream is running rather than blocking after the loop: the transition expires in the middle of the body and what follows it still matters to a stream which is finishing, in particular draining the asynchronous queue, which is how the oldest possible timeslice goes out. Stop scheduling new work once the transition has expired, since we are only draining by then. stream.running is set when the work is queued and cleared by run_completion, both on the loop thread, so none of this needs atomics. On o2-test-framework-SimpleDataProcessingDevice01, 20 runs at DPL_THREADPOOL_SIZE=1: 8/20 passing to 16/20.
This branch has not been deployed
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.
With DPL_THREADPOOL_SIZE>0 the device loop hands doRun to the uv pool and then
returns from Run() without waiting for it, so FairMQ tears the channels down
while a worker is still inside a send and the channel is reached through a
dangling pointer -- instrumenting the failing send showed index=0 of 1 output
channel and a sane proxy, but IsValid() false and a name of garbage bytes. Keep
looping while a stream is running rather than blocking after the loop: the
transition expires in the middle of the body and what follows it still matters
to a stream which is finishing, in particular draining the asynchronous queue,
which is how the oldest possible timeslice goes out. Stop scheduling new work
once the transition has expired, since we are only draining by then.
stream.running is set when the work is queued and cleared by run_completion,
both on the loop thread, so none of this needs atomics. On
o2-test-framework-SimpleDataProcessingDevice01, 20 runs at
DPL_THREADPOOL_SIZE=1: 8/20 passing to 16/20.