Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
//
// Test DuneDeconvolutionService.
//
// This test crashes in cleanup until this problem is resolved:
// https://cdcvs.fnal.gov/redmine/issues/10618
// This test previously crashed during cleanup (larsoft issue
// https://cdcvs.fnal.gov/redmine/issues/10618) because the art services
// were destroyed at program exit, after the ROOT/Cling interpreter they
// rely on had already been torn down. It now tears the services down
// explicitly (ArtServiceHelper::unload_services()) before main returns.

#include <string>
#include <iostream>
Expand Down Expand Up @@ -120,6 +123,10 @@ int main(int argc, char* argv[]) {
ssarg >> a_LogLevel;
}
int rstat = test_DuneDeconvolutionService(a_LogLevel);
// Destroy the art services while ROOT/Cling is still alive; otherwise
// they are destroyed at program exit when the interpreter state they
// rely on may already be gone, causing a crash (larsoft issue 10618).
ArtServiceHelper::unload_services();
cout << myname << "Exiting." << endl;
return rstat;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ int main(int argc, char* argv[]) {
istringstream ssarg(argv[1]);
ssarg >> a_LogLevel;
}
return test_DuneRoiBuildingService(a_LogLevel);
int rstat = test_DuneRoiBuildingService(a_LogLevel);
// Destroy the art services while ROOT/Cling is still alive; otherwise
// they are destroyed at program exit when the interpreter state they
// rely on may already be gone, causing a crash.
ArtServiceHelper::unload_services();
return rstat;
}

//**********************************************************************
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,12 @@ int main(int argc, char* argv[]) {
}
cout << " LogLevel: " << a_LogLevel << endl;
cout << " explicitFcl: " << explicitFcl << endl;
return test_KeepAllRoiBuildingService(a_LogLevel, explicitFcl);
int rstat = test_KeepAllRoiBuildingService(a_LogLevel, explicitFcl);
// Destroy the art services while ROOT/Cling is still alive; otherwise
// they are destroyed at program exit when the interpreter state they
// rely on may already be gone, causing a crash.
ArtServiceHelper::unload_services();
return rstat;
}

//**********************************************************************
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,12 @@ int main(int argc, char* argv[]) {
istringstream ssarg(argv[1]);
ssarg >> a_LogLevel;
}
return test_StandardAdcWireBuildingService(a_LogLevel);
int rstat = test_StandardAdcWireBuildingService(a_LogLevel);
// Destroy the art services while ROOT/Cling is still alive; otherwise
// they are destroyed at program exit when the interpreter state they
// rely on may already be gone, causing a crash.
ArtServiceHelper::unload_services();
return rstat;
}

//**********************************************************************
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,12 @@ int main(int argc, char* argv[]) {
string sarg(argv[2]);
useFclFile = sarg == "true" || sarg == "1";
}
return test_StandardRawDigitPrepService(useExistingFcl, useFclFile);
int rstat = test_StandardRawDigitPrepService(useExistingFcl, useFclFile);
// Destroy the art services while ROOT/Cling is still alive; otherwise
// they are destroyed at program exit when the interpreter state they
// rely on may already be gone, causing a crash.
ArtServiceHelper::unload_services();
return rstat;
}

//**********************************************************************
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,12 @@ int main(int argc, char* argv[]) {
useExistingFcl = sarg == "true" || sarg == "1";
}
TH1::AddDirectory(false);
return test_ToolBasedRawDigitPrepService(useExistingFcl);
int rstat = test_ToolBasedRawDigitPrepService(useExistingFcl);
// Destroy the art services while ROOT/Cling is still alive; otherwise
// they are destroyed at program exit when the interpreter state they
// rely on may already be gone, causing a crash.
ArtServiceHelper::unload_services();
return rstat;
}

//**********************************************************************
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,12 @@ int main(int argc, char* argv[]) {
useExistingFcl = sarg == "true" || sarg == "1";
}
TH1::AddDirectory(false);
return test_TpcToolBasedRawDigitPrepService(useExistingFcl);
int rstat = test_TpcToolBasedRawDigitPrepService(useExistingFcl);
// Destroy the art services while ROOT/Cling is still alive; otherwise
// they are destroyed at program exit when the interpreter state they
// rely on may already be gone, causing a crash.
ArtServiceHelper::unload_services();
return rstat;
}

//**********************************************************************
7 changes: 6 additions & 1 deletion dunedataprep/DataPrep/Tool/test/test_AcdWireReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,12 @@ int main(int argc, char* argv[]) {
}
useExistingFcl = sarg == "true" || sarg == "1";
}
return test_AcdWireReader(useExistingFcl);
int rstat = test_AcdWireReader(useExistingFcl);
// Destroy the art services while ROOT/Cling is still alive; otherwise
// they are destroyed at program exit when the interpreter state they
// rely on may already be gone, causing a crash.
ArtServiceHelper::unload_services();
return rstat;
}

//**********************************************************************
7 changes: 6 additions & 1 deletion dunedataprep/DataPrep/Tool/test/test_VintageDeconvoluter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@ int main(int argc, char* argv[]) {
}
useExistingFcl = sarg == "true" || sarg == "1";
}
return test_VintageDeconvoluter(useExistingFcl);
int rstat = test_VintageDeconvoluter(useExistingFcl);
// Destroy the art services while ROOT/Cling is still alive; otherwise
// they are destroyed at program exit when the interpreter state they
// rely on may already be gone, causing a crash.
ArtServiceHelper::unload_services();
return rstat;
}

//**********************************************************************