Skip to content

DPL: dispatch only what is ready now, not the last call's actions too - #16201

Open
ktf wants to merge 1 commit into
AliceO2Group:devfrom
ktf:pr16201
Open

ktf wants to merge 1 commit into
AliceO2Group:devfrom
ktf:pr16201

Conversation

@ktf

@ktf ktf commented Nov 26, 2026

Copy link
Copy Markdown
Member

tryDispatchComputation appends what getReadyToProcess finds to the vector it
is given and then dispatches everything in it. Every caller cleared the vector
first except the end-of-stream drain in doHousekeeping, which calls it in a loop
with the same vector. When that loop goes round more than once, the second call
dispatches the first call's actions again, on slots which have been consumed
since, and the task is handed an empty input: InputRecord::get then crashes.

Without a thread pool the backlog at end of stream is rarely more than one
round, so this hardly shows. With one, whatever arrived while a task was running
is still there at end of stream, and SimpleWildcard02 and RootTreeReader crashed
in InputRecord::get from exactly this path. The same loop is upstream. Clear the
vector where it is filled, so it only ever holds this call's actions.

tryDispatchComputation appends what getReadyToProcess finds to the vector it
is given and then dispatches everything in it. Every caller cleared the vector
first except the end-of-stream drain in doHousekeeping, which calls it in a loop
with the same vector. When that loop goes round more than once, the second call
dispatches the first call's actions again, on slots which have been consumed
since, and the task is handed an empty input: InputRecord::get then crashes.

Without a thread pool the backlog at end of stream is rarely more than one
round, so this hardly shows. With one, whatever arrived while a task was running
is still there at end of stream, and SimpleWildcard02 and RootTreeReader crashed
in InputRecord::get from exactly this path. The same loop is upstream. Clear the
vector where it is filled, so it only ever holds this call's actions.
@ktf
ktf requested a review from a team as a code owner November 26, 2026 09:42

This branch has not been deployed

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant