Skip to content
Snippets Groups Projects

G4AtlasAlg: enable thread-checker

Merged Frank Winklmeier requested to merge fwinkl/athena:g4atlasalg into master

Mostly suppressing warnings of "unsafe" code that is used only during single-threaded execution.

Requires: !56226 (merged)

Edited by Frank Winklmeier

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • assigned to @fwinkl

  • This merge request affects 1 package:

    • Simulation/G4Atlas/G4AtlasAlg

    This merge request affects 7 files:

    • Simulation/G4Atlas/G4AtlasAlg/G4AtlasAlg/ATLAS_CHECK_THREAD_SAFETY
    • Simulation/G4Atlas/G4AtlasAlg/G4AtlasAlg/G4AtlasMTRunManager.h
    • Simulation/G4Atlas/G4AtlasAlg/G4AtlasAlg/G4AtlasRunManager.h
    • Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx
    • Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasMTRunManager.cxx
    • Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasRunManager.cxx
    • Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasWorkerRunManager.cxx

    Adding @jchapman as watcher

  • :x: CI Result FAILURE (hash 15090966)

    Athena AthSimulation AthGeneration AnalysisBase AthAnalysis DetCommon
    externals :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    cmake :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    make :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    tests :o: :o: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

    Full details available on this CI monitor view. Check the JIRA CI status board for known problems
    :white_check_mark: Athena: number of compilation errors 0, warnings 0
    :white_check_mark: AthSimulation: number of compilation errors 0, warnings 0
    :white_check_mark: AthGeneration: number of compilation errors 0, warnings 0
    :white_check_mark: AnalysisBase: number of compilation errors 0, warnings 0
    :white_check_mark: AthAnalysis: number of compilation errors 0, warnings 0
    :white_check_mark: DetCommon: number of compilation errors 0, warnings 0
    :pencil: For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 57965]

  • Frank Winklmeier changed the description

    changed the description

  • Author Maintainer

    Jenkins please retry a build

  • This merge request affects 1 package:

    • Simulation/G4Atlas/G4AtlasAlg

    This merge request affects 7 files:

    • Simulation/G4Atlas/G4AtlasAlg/G4AtlasAlg/ATLAS_CHECK_THREAD_SAFETY
    • Simulation/G4Atlas/G4AtlasAlg/G4AtlasAlg/G4AtlasMTRunManager.h
    • Simulation/G4Atlas/G4AtlasAlg/G4AtlasAlg/G4AtlasRunManager.h
    • Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx
    • Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasMTRunManager.cxx
    • Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasRunManager.cxx
    • Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasWorkerRunManager.cxx

    Adding @jchapman as watcher

  • :x: CI Result FAILURE (hash 15090966)

    Athena AthSimulation AthGeneration AnalysisBase AthAnalysis DetCommon
    externals :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    cmake :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    make :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    tests :o: :o: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

    Full details available on this CI monitor view. Check the JIRA CI status board for known problems
    :white_check_mark: Athena: number of compilation errors 0, warnings 0
    :white_check_mark: AthSimulation: number of compilation errors 0, warnings 0
    :white_check_mark: AthGeneration: number of compilation errors 0, warnings 0
    :white_check_mark: AnalysisBase: number of compilation errors 0, warnings 0
    :white_check_mark: AthAnalysis: number of compilation errors 0, warnings 0
    :white_check_mark: DetCommon: number of compilation errors 0, warnings 0
    :pencil: For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 58165]

  • Author Maintainer

    The crash in the job finalization is due to changing the singleton from its current "leaky" implementation

    G4AtlasMTRunManager* G4AtlasMTRunManager::GetG4AtlasMTRunManager()
    {
      static G4AtlasMTRunManager* thisManager = nullptr;
      if (!thisManager) { thisManager = new G4AtlasMTRunManager; }
      return thisManager;
    }

    to

    G4AtlasMTRunManager::GetG4AtlasMTRunManager()
    {
      static G4AtlasMTRunManager thisManager;
      return &thisManager;
    }

    Valgrind says:

    G4 kernel has come to Quit state.
    ==49520== Invalid read of size 8
    ==49520==    at 0x3F3851FF: G4FTFPNeutronBuilder::~G4FTFPNeutronBuilder() (G4FTFPNeutronBuilder.cc:81)
    ==49520==    by 0x3F385258: G4FTFPNeutronBuilder::~G4FTFPNeutronBuilder() (G4FTFPNeutronBuilder.cc:84)
    ==49520==    by 0x43F7822C: operator() (G4VPhysicsConstructor.cc:104)
    ==49520==    by 0x43F7822C: for_each<__gnu_cxx::__normal_iterator<G4PhysicsBuilderInterface**, std::vector<G4PhysicsBuilderInterface*> >, G4VPhysicsConstructor::TerminateWorker()::<lambda(std::vector<G4PhysicsBuilderInterface*>::value_type
    )> > (stl_algo.h:3820)
    ==49520==    by 0x43F7822C: G4VPhysicsConstructor::TerminateWorker() (G4VPhysicsConstructor.cc:102)
    ==49520==    by 0x43F78376: G4VPhysicsConstructor::~G4VPhysicsConstructor() (G4VPhysicsConstructor.cc:77)
    ==49520==    by 0x3F3D8588: G4HadronPhysicsFTFP_BERT::~G4HadronPhysicsFTFP_BERT() (G4HadronPhysicsFTFP_BERT.cc:106)
    ==49520==    by 0x43F93F8D: G4VModularPhysicsList::~G4VModularPhysicsList() (G4VModularPhysicsList.cc:62)
    ==49520==    by 0x3F3E67F6: virtual thunk to FTFP_BERT::~FTFP_BERT() (FTFP_BERT.hh:50)
    ==49520==    by 0x43F5DE69: G4RunManager::DeleteUserInitializations() (G4RunManager.cc:239)
    ==49520==    by 0x43F5EB12: G4RunManager::~G4RunManager() (G4RunManager.cc:208)
    ==49520==    by 0x5964CE8: __run_exit_handlers (in /usr/lib64/libc-2.17.so)
    ==49520==    by 0x5964D36: exit (in /usr/lib64/libc-2.17.so)
    [...]
    ==49520==  Address 0x9d5f7390 is 832 bytes inside an unallocated block of size 33,360 in arena "client"
    ==49520== 
    ==49520== Jump to the invalid address stated on the next line
    ==49520==    at 0x0: ???
    ==49520==    by 0x3F385204: G4FTFPNeutronBuilder::~G4FTFPNeutronBuilder() (G4FTFPNeutronBuilder.cc:81)
    ==49520==    by 0x3F385258: G4FTFPNeutronBuilder::~G4FTFPNeutronBuilder() (G4FTFPNeutronBuilder.cc:84)
    ==49520==    by 0x43F7822C: operator() (G4VPhysicsConstructor.cc:104)
    ==49520==    by 0x43F7822C: for_each<__gnu_cxx::__normal_iterator<G4PhysicsBuilderInterface**, std::vector<G4PhysicsBuilderInterface*> >, G4VPhysicsConstructor::TerminateWorker()::<lambda(std::vector<G4PhysicsBuilderInterface*>::value_type)> > (stl_algo.h:3820)
    ==49520==    by 0x43F7822C: G4VPhysicsConstructor::TerminateWorker() (G4VPhysicsConstructor.cc:102)
    ==49520==    by 0x43F78376: G4VPhysicsConstructor::~G4VPhysicsConstructor() (G4VPhysicsConstructor.cc:77)
    ==49520==    by 0x3F3D8588: G4HadronPhysicsFTFP_BERT::~G4HadronPhysicsFTFP_BERT() (G4HadronPhysicsFTFP_BERT.cc:106)
    ==49520==    by 0x43F93F8D: G4VModularPhysicsList::~G4VModularPhysicsList() (G4VModularPhysicsList.cc:62)
    ==49520==    by 0x3F3E67F6: virtual thunk to FTFP_BERT::~FTFP_BERT() (FTFP_BERT.hh:50)
    ==49520==    by 0x43F5DE69: G4RunManager::DeleteUserInitializations() (G4RunManager.cc:239)
    ==49520==    by 0x43F5EB12: G4RunManager::~G4RunManager() (G4RunManager.cc:208)
    ==49520==    by 0x5964CE8: __run_exit_handlers (in /usr/lib64/libc-2.17.so)
    ==49520==    by 0x5964D36: exit (in /usr/lib64/libc-2.17.so)
    [...]
    ==49520==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
    ==49520== 
     *** Break *** segmentation violation

    but I can't figure out what's going wrong.

    I am going to revert that particular change.

  • Frank Winklmeier added 284 commits

    added 284 commits

    Compare with previous version

  • This merge request affects 1 package:

    • Simulation/G4Atlas/G4AtlasAlg

    This merge request affects 7 files:

    • Simulation/G4Atlas/G4AtlasAlg/G4AtlasAlg/ATLAS_CHECK_THREAD_SAFETY
    • Simulation/G4Atlas/G4AtlasAlg/G4AtlasAlg/G4AtlasMTRunManager.h
    • Simulation/G4Atlas/G4AtlasAlg/G4AtlasAlg/G4AtlasRunManager.h
    • Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx
    • Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasMTRunManager.cxx
    • Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasRunManager.cxx
    • Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasWorkerRunManager.cxx

    Adding @jchapman as watcher

  • :white_check_mark: CI Result SUCCESS (hash c0ccb7b1)

    Athena AthSimulation AthGeneration AnalysisBase AthAnalysis DetCommon
    externals :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    cmake :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    make :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

    Full details available on this CI monitor view. Check the JIRA CI status board for known problems
    :white_check_mark: Athena: number of compilation errors 0, warnings 0
    :white_check_mark: AthSimulation: number of compilation errors 0, warnings 0
    :white_check_mark: AthGeneration: number of compilation errors 0, warnings 0
    :white_check_mark: AnalysisBase: number of compilation errors 0, warnings 0
    :white_check_mark: AthAnalysis: number of compilation errors 0, warnings 0
    :white_check_mark: DetCommon: number of compilation errors 0, warnings 0
    :pencil: For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 58227]

  • Approved
    Albert (L1)

  • added review-approved label and removed review-pending-level-1 label

  • mentioned in commit 65fc58eb

Please register or sign in to reply
Loading