ACCL icon indicating copy to clipboard operation
ACCL copied to clipboard

Cannot do subsequent runs using xrt driver without hot resetting the board

Open PedrooHR opened this issue 3 years ago • 4 comments

The first execution of the test/host/xrt/test.cpp test works fine (using hardware). When doing a subsequent runs of this test, it fails and shows errors like the ones present in the subsequent-run.log file (subsequent runs work fine in the pynq tri test). We are only able to execute the test again successfully, using the xrt driver, if doing a hot reset on the board.

PedrooHR avatar Jun 27 '22 16:06 PedrooHR

Thanks @PedrooHR for reporting this. I was able to replicate this issue on our end.

quetric avatar Jun 28 '22 08:06 quetric

Appears that #134 improves soft reset functionality but is not a complete fix.

quetric avatar Dec 15 '22 13:12 quetric

I'm still not able to do subsequent runs.

Now, when I correctly call ACCL destructor I get this error

terminate called after throwing an instance of 'std::runtime_error'
  what():  internal error: missing kds device

I'm not sure why, but I've tracked the source and the error occurs during the execution of the call for config scenario with cfgFunc::reset_periph function in the ACCL::deinit() function

EDIT 1: It was a problem of the ending operations when ending OMPC runtime (due the "non-natural" way we do that). But I still have other problems that I am investigating.

EDIT 2: deinit() operation seems fine now. Although, I am get an error in the subsequent run when opening the ports:

terminate called after throwing an instance of 'xrt_core::system_error'
  what():  failed to launch execution buffer: Resource deadlock avoided

PedrooHR avatar Feb 08 '23 17:02 PedrooHR

your deinit() issues are probably a race condition with XRT destruction. Since the ACCL destructor uses XRT to access the CCLO and clean it up, it must always run before the XRT device is destroyed. The EDIT2 issue might come from the TCP stack being incorrectly deinitialized when exiting the previous run - I will investigate.

quetric avatar Feb 09 '23 12:02 quetric