fix(debugger): ack pending events before closing session

- ack module / isa vm bind events before close(fd)

Related-To: NEO-7960

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2023-05-09 15:20:35 +00:00
committed by Compute-Runtime-Automation
parent 0c5210cf0f
commit c4f36a6808
3 changed files with 45 additions and 0 deletions

View File

@@ -477,6 +477,18 @@ void DebugSessionLinux::readInternalEventsAsync() {
bool DebugSessionLinux::closeConnection() {
closeAsyncThread();
closeInternalEventsThread();
if (clientHandle != invalidClientHandle) {
auto numTiles = std::max(1u, connectedDevice->getNEODevice()->getNumSubDevices());
for (uint32_t i = 0; i < numTiles; i++) {
for (const auto &eventToAck : eventsToAck) {
auto moduleUUID = eventToAck.second;
ackModuleEvents(i, moduleUUID);
}
cleanRootSessionAfterDetach(i);
}
}
return closeFd();
}