aps-8id-dys / ipython-8idiuser

8-ID-I ipython configuration for bluesky (and other)
1 stars 1 forks source link

Rigaku Mini-class Test, Crash Report #280

Closed qzhang234 closed 2 years ago

qzhang234 commented 2 years ago

@prjemian @sureshnaps @ericmdufresne Per our discussion earlier, here's a full report of the error message from Bluesky end.

Crash occurred during daytime of 01/20/2022. No other incidences of Bluesky was running during that time.

Terminal Output ``` Start Rigaku Acquire: ZDT01_010267.bin Start Rigaku Acquire: ZDT01_010268.bin Start Rigaku Acquire: ZDT01_010269.bin Start Rigaku Acquire: ZDT01_010270.bin Start Rigaku Acquire: ZDT01_010271.bin Start Rigaku Acquire: ZDT01_010272.bin Start Rigaku Acquire: ZDT01_010273.bin Start Rigaku Acquire: ZDT01_010274.bin Start Rigaku Acquire: ZDT01_010275.bin Start Rigaku Acquire: ZDT01_010276.bin Start Rigaku Acquire: ZDT01_010277.bin Start Rigaku Acquire: ZDT01_010278.bin --------------------------------------------------------------------------- FailedStatus Traceback (most recent call last) in ----> 1 RE(Rigaku_Fast(rigaku500k, num_repeats=20000)) ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/run_engine.py in __call__(self, *args, **metadata_kw) 805 self._task_fut.add_done_callback(set_blocking_event) 806 --> 807 self._resume_task(init_func=_build_task) 808 809 if self._interrupted: ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/run_engine.py in _resume_task(self, init_func) 929 if (exc is not None 930 and not isinstance(exc, _RunEnginePanic)): --> 931 raise exc 932 933 def install_suspender(self, suspender): ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/run_engine.py in _run(self) 1498 exit_reason = str(err) 1499 self.log.exception("Run aborted") -> 1500 raise err 1501 finally: 1502 if not exit_reason: ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/run_engine.py in _run(self) 1339 # throw the exception at the current plan 1340 try: -> 1341 msg = self._plan_stack[-1].throw( 1342 stashed_exception or resp) 1343 except Exception as e: ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/preprocessors.py in __call__(self, plan) 1305 plan = monitor_during_wrapper(plan, self.monitors) 1306 plan = baseline_wrapper(plan, self.baseline) -> 1307 return (yield from plan) 1308 1309 ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/preprocessors.py in baseline_wrapper(plan, devices, name) 1160 return (yield from plan) 1161 else: -> 1162 return (yield from plan_mutator(plan, insert_baseline)) 1163 1164 ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/preprocessors.py in plan_mutator(plan, msg_proc) 76 # if we have a stashed exception, pass it along 77 try: ---> 78 msg = plan_stack[-1].throw(exception) 79 except StopIteration as e: 80 # discard the exhausted generator ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/preprocessors.py in monitor_during_wrapper(plan, signals) 801 plan1 = plan_mutator(plan, insert_after_open) 802 plan2 = plan_mutator(plan1, insert_before_close) --> 803 return (yield from plan2) 804 805 ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/preprocessors.py in plan_mutator(plan, msg_proc) 76 # if we have a stashed exception, pass it along 77 try: ---> 78 msg = plan_stack[-1].throw(exception) 79 except StopIteration as e: 80 # discard the exhausted generator ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/preprocessors.py in plan_mutator(plan, msg_proc) 76 # if we have a stashed exception, pass it along 77 try: ---> 78 msg = plan_stack[-1].throw(exception) 79 except StopIteration as e: 80 # discard the exhausted generator ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/preprocessors.py in fly_during_wrapper(plan, flyers) 859 plan1 = plan_mutator(plan, insert_after_open) 860 plan2 = plan_mutator(plan1, insert_before_close) --> 861 return (yield from plan2) 862 863 ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/preprocessors.py in plan_mutator(plan, msg_proc) 76 # if we have a stashed exception, pass it along 77 try: ---> 78 msg = plan_stack[-1].throw(exception) 79 except StopIteration as e: 80 # discard the exhausted generator ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/preprocessors.py in plan_mutator(plan, msg_proc) 76 # if we have a stashed exception, pass it along 77 try: ---> 78 msg = plan_stack[-1].throw(exception) 79 except StopIteration as e: 80 # discard the exhausted generator /home/beams10/8IDIUSER/bluesky_data/2021/2021-3/rigaku_test.py in Rigaku_Fast(rigaku500k, num_repeats) 31 yield from bps.sleep(0.1) 32 yield from bps.mv(rigaku500k.cam1.file_name, _filename) ---> 33 yield from bps.mv(rigaku500k.cam1.acquire, 1) 34 continue 35 ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/plan_stubs.py in mv(group, *args, **kwargs) 256 ret = yield Msg('set', obj, val, group=group, **kwargs) 257 status_objects.append(ret) --> 258 yield Msg('wait', None, group=group) 259 return tuple(status_objects) 260 ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/preprocessors.py in plan_mutator(plan, msg_proc) 193 try: 194 # yield out the 'current message' and collect the return --> 195 inner_ret = yield msg 196 except GeneratorExit: 197 # special case GeneratorExit. We must clean up all of our plans ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/preprocessors.py in plan_mutator(plan, msg_proc) 193 try: 194 # yield out the 'current message' and collect the return --> 195 inner_ret = yield msg 196 except GeneratorExit: 197 # special case GeneratorExit. We must clean up all of our plans ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/preprocessors.py in plan_mutator(plan, msg_proc) 193 try: 194 # yield out the 'current message' and collect the return --> 195 inner_ret = yield msg 196 except GeneratorExit: 197 # special case GeneratorExit. We must clean up all of our plans ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/preprocessors.py in plan_mutator(plan, msg_proc) 193 try: 194 # yield out the 'current message' and collect the return --> 195 inner_ret = yield msg 196 except GeneratorExit: 197 # special case GeneratorExit. We must clean up all of our plans ~/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/bluesky/preprocessors.py in plan_mutator(plan, msg_proc) 193 try: 194 # yield out the 'current message' and collect the return --> 195 inner_ret = yield msg 196 except GeneratorExit: 197 # special case GeneratorExit. We must clean up all of our plans FailedStatus: Status(obj=EpicsSignal(read_pv='8idRigaku:cam1:Acquire', name='cam1_acquire', parent='cam1', value=1, timestamp=1642688557.9922867, auto_monitor=True, string=False, write_pv='8idRigaku:cam1:Acquire', limits=False, put_complete=False), done=True, success=False) In [31]: In [31]: In [31]: ```
qzhang234 commented 2 years ago

Per @prjemian's suggestion, adding specification to Cpt rigaku500k.cam1.acquire. However now the acquisition is looping but the file name does not update unless I press 'Stop' on the EPICS IOC. This is abnormal.

@prjemian Please advise on how I can fix this.

image

image

qzhang234 commented 2 years ago

@prjemian suggested setting the attribute of Rigaku Acquire PV to False instead of True and the code is now running. Turned out that Rigaku Acquire PV does not return any values so that cause the code to hang checking for return from the PV signal.

This also goes to show that it's important to design customized detector class from scratch, because sometimes it's hard to predict how detector PVs behave (which is particularly true for R&D detectors like Rigaku).

Closing the issue now.

image