We have had an issue where a python IOC would hang sometimes and have to be restarted. We narrowed it down to calling my_record.set() within the on_update callback for my_record and removing that has fixed the problem.
I have added a branch with a minimal example to reproduce the problem. The instructions in the README should be sufficient to run it. The traceback provoked by faulthandler consistently shows the IOC stuck in db_put_field:
Thread 0x00007f66f4cef700 (most recent call first):
File "/scratch/development/pythonSoftIoc/venv/lib/python3.7/site-packages/cothread/cothread.py", line 984 in __call__
File "/scratch/development/pythonSoftIoc/venv/lib/python3.7/site-packages/softioc/cothread_dispatcher.py", line 32 in __call__
File "/scratch/development/pythonSoftIoc/venv/lib/python3.7/site-packages/softioc/device.py", line 221 in _process
File "/scratch/development/pythonSoftIoc/venv/lib/python3.7/site-packages/softioc/device_core.py", line 165 in __call_instance_method
File "/scratch/development/pythonSoftIoc/venv/lib/python3.7/site-packages/softioc/device_core.py", line 145 in <lambda>
Current thread 0x00007f6728ed8740 (most recent call first):
File "/scratch/development/pythonSoftIoc/venv/lib/python3.7/site-packages/softioc/imports.py", line 24 in db_put_field
File "/scratch/development/pythonSoftIoc/venv/lib/python3.7/site-packages/softioc/device.py", line 243 in set
File "/scratch/development/pythonSoftIoc/example/cothread_ioc.py", line 10 in useless_callback
File "/scratch/development/pythonSoftIoc/venv/lib/python3.7/site-packages/softioc/cothread_dispatcher.py", line 29 in wrapper
File "/scratch/development/pythonSoftIoc/venv/lib/python3.7/site-packages/cothread/cothread.py", line 971 in callback_events
File "/scratch/development/pythonSoftIoc/venv/lib/python3.7/site-packages/cothread/cothread.py", line 671 in __run
This was tested with base 7.0.7.0 and it does not seem to happen with 3.14.12.7.
We have had an issue where a python IOC would hang sometimes and have to be restarted. We narrowed it down to calling
my_record.set()within theon_updatecallback formy_recordand removing that has fixed the problem.I have added a branch with a minimal example to reproduce the problem. The instructions in the README should be sufficient to run it. The traceback provoked by faulthandler consistently shows the IOC stuck in
db_put_field:This was tested with base 7.0.7.0 and it does not seem to happen with 3.14.12.7.