A putenv call is made inside of the TShielding constructor in line 162 of the G4 file physics_lists/lists/include/Shielding.icc: if ( LEN_model == "HP" ) { //Activate prodcuton of fission fragments in neutronHP char env_ff[]="G4NEUTRONHP_PRODUCE_FISSION_FRAGMENTS=1"; putenv(env_ff); // Oops--caching pointer to stack variable } The putenv call accepts a char* argument, which is cached by the environment. The above argument code compiles because a char[] array decays to a char*. The problem is that env_ff is a stack variable that goes away once the program goes past line 163. Subsequent calls to getenv in the TROOT destructor (or anywhere else) will likely fail because an invalid pointer is accessed. This error is preventing the Mu2e experiment from using multi-threaded processing of events, which is where the error was first noticed.
Krzysztof has informed me that this bug has been fixed with 10.5. Will mark this as resolved. My apologies for the noise.