_config
object contains state
not suitable for multiprocessing
#646
Labels
Milestone
_config
object contains state
not suitable for multiprocessing
#646
Overview
Many
garak._config
namespace variables such astransient, run, reporting
are currently populated at state during execution. The management of these values between testing runs for a long running service does not lend to a singleton as then only one of each can exist at a time in the python interpreter. Further since this data is populated into a namespace variable reload of the namespace will not maintain these values.The behavior of the
multiprocessing
package is more akin to launching another new python process that uses only the files directly connected to the source objects passed.#645 addresses an instance that exposed this concern.
Current state example
In the case of the
probe
class and its associated class hierarchy being called the only argument is defined in the same class and state of config is not passed.Desired state
Any stateful
_config
likely needs to either be passed or consistently reloaded in new processes. Investigation and understanding of use cases needs occur to consolidate on patterns either in code standards or library framework supporting task execution with all required context.The text was updated successfully, but these errors were encountered: