POETSII / Orchestrator

The Orchestrator is the configuration and run-time management system for POETS platforms.
1 stars 1 forks source link

Memory leak when handling an invalid hardware description file #275

Closed DrongoTheDog closed 2 years ago

DrongoTheDog commented 3 years ago

P_engine and associated classes bypass (deliberately?) the LogServer and ultimately write direct to the console, without using Post() and going through the LogServer.

This is daft, given the philosophy and existing infrastructure of LogServer, and slightly dangerous in an MPI environment anyway. (Although I've never seen an installation where stdout/stderr doesn't attach to the console in rank 0, but it's only luck that both the ADB and MLV launchers map rank 0 to Root).

Worse, having done that, the exception handler doesn't tidy up if it finds a problem in the hardware configuration subsystem:

Post(141) stack (the line numbers probably don't line up so here are the names) Root::ProcCmnd CmLoad::operator() CmLoad::Cm_Engine HardwareFileReader::populate_hardware_model HardwareFileReader::d3_populate_hardware_model HardwareFileReader::d3_populate_validate_engine_box (in my world, line 1811)
/* Create the box (the name argument is the name of the box in the

Resource leak: 128 bytes we'll never get back. "box" is never deleted. Ever.

mvousden commented 3 years ago

On discussion with ADB, the stdout point was a trick of the eye, as the LogServer messages contain newline characters. The memory leak may well be real - here's the file that triggered it: POETSHardware.txt