Skip to content

sequencerd: set SEQ_WAIT_EXPOSE before sending expose (0 s exposures hang the sequencer) - #485

Open
cfremling wants to merge 1 commit into
mainfrom
fix/sequencer-expose-bit-race
Open

cfremling wants to merge 1 commit into
mainfrom
fix/sequencer-expose-bit-race

Conversation

@cfremling

@cfremling cfremling commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

trigger_exposure() set SEQ_WAIT_EXPOSE after camerad's reply to expose and the EXPOSING database write. The async listener clears that bit on the first PIXELCOUNT and disarms. With EXPTIME 0 readout starts immediately, so PIXELCOUNT can arrive before the set; the bit is then set with nothing left to clear it and sequence_start waits on it forever. The set now happens before the command is sent.

Example, 2026-09-08 UT, CAL_BIAS id 112442 (NEXP 7, EXPTIME 0):

sequencerd_20260909.log
23:34:23.064  trigger_exposure  sending expose command
23:34:23.654  target CAL_BIAS id 112442 state exposing
23:34:23.654  waiting for exposure            <- "done waiting for expose" never follows
camerad_20260909.log
23:34:23.389  do_expose  expose is done now!   <- reply
23:36:57.585  ngps_260909_0021.fits closed; ready for next exposure

Wait bits stayed EXPOSE READOUT. Every earlier bias in the logs cleared EXPOSE 28-45 ms after "waiting for exposure".

The database part (integer keys matched with like) is now #511.

Rebuild, restart sequencerd. Tested on sky using branch cf/summit-20261030 on 2026-11-03: the evening bias series completed without hanging.

Jira: PAL-164.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@cfremling cfremling changed the title sequencerd: set SEQ_WAIT_EXPOSE before sending expose, not after the reply sequencerd: set SEQ_WAIT_EXPOSE before sending expose; match integer keys with = not like Sep 9, 2026
@cfremling

cfremling commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator Author

Tested on sky 2026-10-28 UT using branch cf/summit-20261020: the evening calibration set (CAL_BIAS first) ran straight through at 22:51-23:03 UT, where on main both bias series had wedged on 2026-10-21 and needed abort / do all / start.

…reply

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@cfremling
cfremling force-pushed the fix/sequencer-expose-bit-race branch from 8f8523a to ea76430 Compare November 5, 2026 18:55
@cfremling cfremling changed the title sequencerd: set SEQ_WAIT_EXPOSE before sending expose; match integer keys with = not like sequencerd: set SEQ_WAIT_EXPOSE before sending expose (0 s exposures hang the sequencer) Nov 5, 2026

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants