add error log when opening dev/mem
Build on RHEL8 docker image / build (push) Failing after 14s
Build on RHEL9 docker image / build (push) Successful in 3m53s
Run Simulator Tests on local RHEL9 / build (push) Successful in 18m18s
Run Simulator Tests on local RHEL8 / build (push) Successful in 21m50s

This commit is contained in:
2026-05-29 17:45:23 +02:00
parent 2a3ac07aa7
commit b4ddb3b9b6
2 changed files with 7 additions and 1 deletions
@@ -80,6 +80,7 @@ int main(int argc, char *argv[]) {
pause(); // wait for signal to exit
}
} catch (...) {
LOG(logERROR) << "Some Error occured in Stop Server, exiting";
kill(getppid(), SIGINT); // tell parent to exit // TODO: should then
// also return EXIT_FAILURE
}
@@ -100,6 +101,7 @@ int main(int argc, char *argv[]) {
pause(); // wait for signal to exit
}
} catch (...) {
LOG(logERROR) << "Some Error occured in Control Server, exiting";
LOG(sls::logINFOBLUE)
<< "Exiting Control Server [ Tid: " << gettid() << " ]";
LOG(sls::logINFO) << "Exiting Detector Server";
@@ -18,6 +18,7 @@ void HardwareMemoryModel::mapToMemory() {
int fd = open("/dev/mem", O_RDWR | O_SYNC, 0);
if (fd == -1) {
LOG(logERROR) << "Can't open /dev/mem: " << strerror(errno);
throw std::runtime_error("Can't find /dev/mem");
}
@@ -52,6 +53,9 @@ void HardwareMemoryModel::unmapMemory() {
}
}
HardwareMemoryModel::~HardwareMemoryModel() { unmapMemory(); }
HardwareMemoryModel::~HardwareMemoryModel() {
LOG(logDEBUG1) << "HardwareMemoryModel destructor called, unmapping memory";
unmapMemory();
}
} // namespace sls