Skip to content

MLT: keep sending TriggerDecisions when one of several DFOs cannot be reached - #448

Open
wesketchum wants to merge 1 commit into
developfrom
wketchum/mlt-dead-dfo
Open

wesketchum wants to merge 1 commit into
developfrom
wketchum/mlt-dead-dfo

Conversation

@wesketchum

@wesketchum wesketchum commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

With several DFOs, the MLT sends each TriggerDecision to every DFO. In MLTModule::trigger_decisions_callback the sends are in one loop inside one try, and m_last_trigger_number++ is done after the loop. Once the send to one DFO fails (e.g. the DFO died):

  • the DFOs after it in m_decision_outputs never get the TriggerDecision, and
  • the trigger number is not incremented, so the DFOs before it reuse the same number again and again, each time with a different trigger decision.

This PR makes a minimal change:

  • Each send has its own try/catch, so a DFO that cannot be reached does not keep the TriggerDecision from the others. The debug message now names the connection that failed.
  • A TriggerDecision counts as sent, and uses up its trigger number, once any DFO has it. It counts as a failed send (td_queue_timeout_expired_err_count, per-type failed_send) only if no DFO could be reached, and the number is then reused, as on develop with one DFO.

With a single DFO, behavior is unchanged.

Not in this PR: dropping a dead DFO from m_decision_outputs (while one is dead, the MLT logs one ERROR and waits up to the 1 ms send timeout for each TriggerDecision), and the single m_dfo_is_busy flag shared by all DFOs. Whether a failed send should use up its trigger number is also a separate issue.

All the usual tests pass, but don't really test the code as they don't use multiple DFOs.
To really test: dfmodules' integtest/dfo_protocol_killed_dfo_test.py (from the dfmodules multi-DFO fix branch, to be linked: DUNE-DAQ/dfmodules#527) kills one of three DFOs while triggers are enabled. Without this PR the run stalls after the kill. With it, the run continues at the normal rate.

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature or enhancement (non-breaking change which adds functionality)
  • Optimization (non-breaking change that improves code/performance)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Testing checklist

  • Unit tests pass (e.g. dbt-build --unittest)
  • Minimal system quicktest passes (pytest -s minimal_system_quick_test.py)
  • Full set of integration tests pass (dunedaq_integtest_bundle.sh)
  • Python tests pass if applicable (e.g. python -m pytest)
  • Pre-commit hooks run successfully if applicable (e.g. pre-commit run --all-files)

Further checks

… reached

The sends to all DFOs were in one try block, with the trigger number
incremented after the loop. Once the send to one DFO failed, the DFOs
after it in the map never got the TriggerDecision, and the trigger number
was not incremented, so the DFOs before it received the same number again
and again. With one DFO dead the system stopped taking data.

Catch a failed send for each DFO separately. A TriggerDecision counts as
sent, and uses up its trigger number, once any DFO has it; it counts as a
failed send only if no DFO could be reached.

Co-Authored-By: Claude <noreply@anthropic.com>
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.

1 participant