Skip to content

Fix async issue with upload candidate

I noticed during a py3 test run that I got the following error:

Traceback (most recent call last):
  File "/fred/oz016/envs/mambaforge/envs/igwn-py38-testing-spiir/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/fred/oz016/envs/mambaforge/envs/igwn-py38-testing-spiir/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/fred/oz016/tdavies/projects/gstreamer_python_upgrade/install_2/lib/python3.8/site-packages/gstlal_spiir/pipemodules/postcoh_finalsink.py", line 1166, in upload_to_gracedb
    self.onperformer.update_eye_candy(self.candidate.postcoh_inspiral,
AttributeError: 'NoneType' object has no attribute 'postcoh_inspiral'

I believe this is an async issue in spiir-O4-EW-development, though I've not seen any similar errors there. Both have this same line, which is called within a thread, and while this thread is running, the main finalsink thread may clear or update 'self.candidate'. As this is the last line in the upload function, it would only affect our monitoring. Maybe py2's threads are worse at reporting the crash?

As far as I can tell, this is the only self.<variable> used in the upload process that is mutated after the FinalSink constructor is called.

It's worth noting that this code isn't in our live run. I'm reasonably sure that we've tested this version with uploads & monitoring, but maybe the async issue didn't kick in...

Merge request reports

Loading