Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in dev3 test #798

Closed
andresailer opened this issue Mar 24, 2021 · 5 comments · Fixed by #799
Closed

Error in dev3 test #798

andresailer opened this issue Mar 24, 2021 · 5 comments · Fixed by #799
Assignees
Labels

Comments

@andresailer
Copy link
Member

I am trying to figure out if this is caused by the changes in DD4hep, or root...

Failure is because "Exception" is found in the log
https://github.com/AIDASoft/DD4hep/runs/2183002592?check_suite_focus=true#step:4:4630

Not clear why this is printed now.

@andresailer andresailer self-assigned this Mar 24, 2021
@andresailer
Copy link
Member Author

For reasons that I don't understand a fraction of some file is printed at the end of this test
https://github.com/AIDASoft/DD4hep/runs/2183002592?check_suite_focus=true#step:4:4630

     /// Access the bound data payload. Exception id object is unbouna

With the addition of 4 std:: from #797 the word 'Exception' is now fully part of this printout

@andresailer
Copy link
Member Author

This also happens, for example in LCG_99 (root 6.22.06) and for all the AClick tests in some form or another. (Maybe also others 🤷 )

@MarkusFrankATcernch
Copy link
Contributor

Isn't this normally an artifact resulting from missing ROOT dictionaries, which cannot be compiled on the fly ?
Though, this usually does not happen at the end of the job...

@andresailer
Copy link
Member Author

yes, usually if there is this printout is because something went wrong with finding header files. But then the whole "file" is printed out, not some "random" fraction of it. But everything seems to work.
Running valgrind now...

@andresailer
Copy link
Member Author

So I think this is an issue with (how we call?) Geant4
at the very end of the execution valgrind reports:

==12086== Conditional jump or move depends on uninitialised value(s)
==12086==    at 0x4C2E9B9: strlen (vg_replace_strmem.c:459)
==12086==    by 0x5B793E9: length (char_traits.h:335)
==12086==    by 0x5B793E9: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (ostream:571)
==12086==    by 0x36640C31: G4strstreambuf::~G4strstreambuf() (Geant4/10.07.p01/source/global/management/include/G4strstreambuf.icc:46)
==12086==    by 0x36640BDB: G4strstreambuf::~G4strstreambuf() (Geant4/10.07.p01/source/global/management/include/G4strstreambuf.icc:42)
==12086==    by 0x36916F5E: G4iosFinalization() (Geant4/10.07.p01/source/global/management/src/G4ios.cc:86)
==12086==    by 0x36916FB8: (anonymous namespace)::cleanupG4ioSystem() (Geant4/10.07.p01/source/global/management/src/G4ios.cc:101)
==12086==    by 0x4010089: _dl_fini (in /usr/lib64/ld-2.17.so)
==12086==    by 0x6599D38: __run_exit_handlers (in /usr/lib64/libc-2.17.so)
==12086==    by 0x6599D86: exit (in /usr/lib64/libc-2.17.so)
==12086==    by 0x54B54FB: TUnixSystem::Exit(int, bool) (ROOT/HEAD/core/unix/src/TUnixSystem.cxx:2157)
==12086==    by 0x52F5266: TApplication::Terminate(int) (ROOT/HEAD/core/base/src/TApplication.cxx:1698)
==12086==    by 0x4E56961: TRint::Terminate(int) (ROOT/HEAD/core/rint/src/TRint.cxx:696)
==12086==  Uninitialised value was created by a heap allocation
==12086==    at 0x4C2B154: operator new[](unsigned long) (vg_replace_malloc.c:431)
==12086==    by 0x36917020: G4strstreambuf::G4strstreambuf() (Geant4/10.07.p01/source/global/management/include/G4strstreambuf.icc:37)
==12086==    by 0x36916A63: _G4coutbuf_p() (Geant4/10.07.p01/source/global/management/src/G4ios.cc:39)
==12086==    by 0x36916D0C: G4iosInitialization() (Geant4/10.07.p01/source/global/management/src/G4ios.cc:70)
==12086==    by 0x36916FA8: (anonymous namespace)::setupG4ioSystem() (Geant4/10.07.p01/source/global/management/src/G4ios.cc:100)
==12086==    by 0x400F9C2: _dl_init (in /usr/lib64/ld-2.17.so)
==12086==    by 0x401459D: dl_open_worker (in /usr/lib64/ld-2.17.so)
==12086==    by 0x400F7D3: _dl_catch_error (in /usr/lib64/ld-2.17.so)
==12086==    by 0x4013B8A: _dl_open (in /usr/lib64/ld-2.17.so)
==12086==    by 0x6D6EFAA: dlopen_doit (in /usr/lib64/libdl-2.17.so)
==12086==    by 0x400F7D3: _dl_catch_error (in /usr/lib64/ld-2.17.so)
==12086==    by 0x6D6F5AC: _dlerror_run (in /usr/lib64/libdl-2.17.so)

I.e. some issue with the d'tor of G4strstreambuf
https://gitlab.cern.ch/geant4/geant4/-/blob/geant4-10.7-release/source/global/management/include/G4strstreambuf.icc#L46

When I LD_PRELOAD that implementation,

with

class G4strstreambuf {
public:
   ~G4strstreambuf();
}; // Class
G4strstreambuf::~G4strstreambuf() {
    std::cout << "@@@ Replacing StreamBuffer DTor @@@" << std::endl;
}

g++ -shared -FPIC -o libPreloadBuffer.so preloadBuffer.cpp

and LD_PRELOAD=./libPreloadBuffer.so

The issue goes away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants