stop XStatsHelper in do_scap before the interfaces are stopped.#188
stop XStatsHelper in do_scap before the interfaces are stopped.#188ShyamB97 wants to merge 11 commits into
Conversation
…lete daq_codegen function
…figuration generation infrastructure
…sue214_no_moo Johnfreeman/daq deliverables issue214 no moo
There was a problem hiding this comment.
Way too much mixing of internal logic with trying to satisfy a system wide FSM that our modules don't even have possibility to inspect...
We need a serious discussion first about how to implement this function and manage HW resources. Because the appfwk and the opmon api clearly does not have ability to disable monitorable objects' polling depending on system state. Maybe that's fine, but for sure we won't "patch"/"hack" it here, in dpdklibs as all user code is potentially affected.
|
I fully agree with the sentiment that this is a wider issue with managing HW resources, that there is very likely similar problems with other repos, and that there is a need for discussion with relevant experts. @wesketchum also some feedback from you on how to proceed would be helpful for us I think. This can also be discussed at a more appropriate forum if we deem so. |
Description
do scrap is initiated, the inferfaces are stopped correctly in the DPDKReaderModule, but not the XstatsHelper. which is used to poll metrics from the interfaces.
generate_opmon_data is called, so the XstatsHelper will try to poll metrics from an interface which has already been stopped, so this is the cause of the log messages
Fix simply sets the m_allocated flag in the XStatsHelper to false within do_scrap of the DPDKReaderModule, thus preventing metrics to be polled from the interfaces while they are being stopped.
Can best tested by taking a DAQ run and then calling scrap, and observing whether the readout application crashes. Running with detector hardware is required.
Type of change
Testing checklist
dbt-build --unittest)pytest -s minimal_system_quick_test.py)dunedaq_integtest_bundle.sh)python -m pytest)pre-commit run --all-files)Testing requires detector to check this works.
several runs taken with BDE showed the appropriate message when scrap is initiated, indicating the XStatsHelper has m_allocated set to false. None of the logs mentioned in the description occur and no segmentation faults occured over the various runs.
Further checks
dbt-build --lint, and/or see https://dune-daq-sw.readthedocs.io/en/latest/packages/styleguide/)(Indicate issue here: # (issue))