Commit Graph
2 Commits
Author SHA1 Message Date
lemke_handClaude Sonnet 5 85c91abe71 Fix CA-context bug in the monitor sweeper, decouple pulse_id timeout, add diagnostics
Root-cause investigation of a real scan abort (p19734 run 1146,
TimeoutError in Daq.get_pulse_id):

- ca_tuning._sweep_loop() never called epics.ca.use_initial_context()
  before demoting channels (pv.auto_monitor = False / remove_callback,
  which calls ca_clear_subscription()) - the same CA-context class of
  bug this codebase already fixed once for real (see
  namespace_store._ca_thread, parallel_init). Fixed, with tests.

- Daq.get_pulse_id() defaulted its wait budget to self.timeout, which
  doubles as the broker HTTP request timeout (2s) - a transient ~3.4s
  CA gap had no room to resolve. Split into a dedicated
  pulse_id_timeout (5s default) so the two can be tuned independently.

- get_pulse_id()'s TimeoutError was a bare "timeout hit" with no
  evidence of why. Added ca_tuning.describe_channel() (factored out of
  report_none_read's existing connected/history/CA-cache logic) and
  wired it into both TimeoutError sites, so a future occurrence
  self-diagnoses instead of requiring log archaeology.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 22:23:47 +02:00
lemke_h 0f8b1fe682 daq fix and init all fix 2026-09-01 12:21:11 +02:00