Wrong wait status after aborting
I have a problem with FlowVR. I am running my PDI tests in a loop and sometimes (~1/400, ~1/950, ~1/1800 runs) the abort signal from one module doesn't go to the second module, but most of the time everything works perfectly. Maybe there is some problem with synchronization when calling wait
to frequently?
Here is a part of the log from one of my test:
...
[PDI][/8ef555d808bd/7627/read:P/recv][07:35:33] *** warning: (FlowVR) Module (recv): Got `abort' abort event. Aborting...
[PDI][07:35:33] *** info: Finalization
[PDI][/8ef555d808bd/7627/read:P/recv][07:35:33] *** debug: (FlowVR) Module (recv): Close flowvr module
[PDI][/8ef555d808bd/7627/read:P/recv][07:35:33] *** debug: (FlowVR) Module (recv): Clear traces
[PDI][/8ef555d808bd/7627/read:P/recv][07:35:33] *** debug: (FlowVR) Module (recv): Clear plugins intput ports
[PDI][/8ef555d808bd/7627/read:P/recv][07:35:33] *** debug: (FlowVR) Module (recv): Clear plugins output ports
[PDI][/8ef555d808bd/7627/read:P/recv][07:35:33] *** info: (FlowVR) Module (recv): Module finalized
[PDI][/8ef555d808bd/7627/read:P/send][07:35:33] *** debug: (FlowVR) Output Mouse Payload (mouseOut): Pressed key with descriptor `middle_button'
[PDI][/8ef555d808bd/7627/read:P/send][07:35:33] *** debug: (FlowVR) Output Mouse Payload (mouseOut): Mouse position [12.3, -23.4]
[PDI][/8ef555d808bd/7627/read:P/send][07:35:33] *** debug: (FlowVR) Module (send): Calling flowvr_module->wait()
[PDI][/8ef555d808bd/7627/read:P/send][07:35:33] *** debug: (FlowVR) Module (send): `wait' returned status: 3
[PDI][/8ef555d808bd/7627/read:P/send][07:35:33] *** debug: (FlowVR) Output Mouse Payload (mouseOut): Copy mouse button state to `right_button'
[PDI][/8ef555d808bd/7627/read:P/send][07:35:33] *** debug: (FlowVR) Output Mouse Payload (mouseOut): Copy mouse button state to `middle_button'
[PDI][/8ef555d808bd/7627/read:P/send][07:35:33] *** debug: (FlowVR) Output Mouse Payload (mouseOut): Copy mouse button state to `left_button'
[PDI][/8ef555d808bd/7627/read:P/send][07:35:33] *** debug: (FlowVR) Output Mouse Payload (mouseOut): Copy mouse position to `pos_xy'
[PDI][/8ef555d808bd/7627/read:P/send][07:35:34] *** debug: (FlowVR) Output Mouse Payload (mouseOut): Pressed key with descriptor `middle_button'
[PDI][/8ef555d808bd/7627/read:P/send][07:35:34] *** debug: (FlowVR) Output Mouse Payload (mouseOut): Pressed key with descriptor `left_button'
[PDI][/8ef555d808bd/7627/read:P/send][07:35:34] *** debug: (FlowVR) Output Mouse Payload (mouseOut): Mouse position [13.53, -25.74]
[PDI][/8ef555d808bd/7627/read:P/send][07:35:34] *** debug: (FlowVR) Module (send): Calling flowvr_module->wait()
[PDI][/8ef555d808bd/7627/read:P/send][07:35:34] *** debug: (FlowVR) Module (send): `wait' returned status: 3
...
This log is from in PDI repo plugins/flowvr/src/module.h
source code.
Abort section:
if (!m_flowvr_module) return;
context().logger()->warn("(FlowVR) Module ({}): Got `{}' abort event. Aborting...", m_module_name, abort_event);
m_flowvr_module->abort();
Wait section:
context().logger()->debug("(FlowVR) Module ({}): Calling flowvr_module->wait()", m_module_name);
int wait_status = m_flowvr_module->wait();
if (!wait_status) {
context().logger()->warn("(FlowVR) Module ({}): `wait' returned status: {}", m_module_name, wait_status);
} else {
context().logger()->debug("(FlowVR) Module ({}): `wait' returned status: {}", m_module_name, wait_status);
}
If you want to reproduce my error. I have created a docker image that fails at some point (tests are running in infinite loop). Here is URL: https://hub.docker.com/r/pdireg/flowvr_inf_tests
.
Image is created from this PDI tree: https://gitlab.maisondelasimulation.fr/jbigot/pdi/tree/docker_ci
To run an image, call: docker run pdireg/flowvr_inf_tests