simonsobs / simonsobs/socs

Issue with pysmurf zero_biases wait functionality

Open
#616 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs triage
Dominant language
Python
Stars
17
Forks
20
Avg merge
1h 22m
Merged PRs (30d)
2

Description

The beginning of a satp1 schedule failed with the error because the zero_biases is not actually waiting for set_biases to finish.

2024-01-11T22:29:36+0000 start called for uxm_relock
2024-01-11T22:29:36+0000 uxm_relock:97 Status is now "starting".
2024-01-11T22:29:36+0000 uxm_relock:97 Operation failed: set_biases is running.
2024-01-11T22:29:36+0000 uxm_relock:97 Status is now "done".
2024-01-11T22:29:36+0000 set_biases:96 Finished setting biases to 0
2024-01-11T22:29:36+0000 set_biases:96 Status is now "done".

Zero biases is implemented to call the set_biases tasks and wait to finish like this:
https://github.com/simonsobs/socs/blob/be59fa40bdd2565da61562b627d7021c476ae427/socs/agents/pysmurf_controller/agent.py#L903-L916

However now I'm not actually sure if the wait function will wait if running in a blocking-thread, since it is a generator w/ inline callbacks, meant to run in the main thread. The simplest fix is that this should probably just be a completely separate task and acquire the lock / zero the TES biases itself instead of passing params to set_biases

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in socs/agents/pysmurf_controller/agent.py at the referenced zero_biases implementation around lines 903-916. Reproduce the satp1 or uxm_relock sequence and inspect how set_biases, wait, generators, and blocking threads interact. Done means zero_biases does not let the following operation start until setting biases has actually finished.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.