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

Runtime errors in StarVMC/StarAgmlLib when using ROOT 6.24 #620

Closed
plexoos opened this issue Nov 2, 2023 · 4 comments · Fixed by #641
Closed

Runtime errors in StarVMC/StarAgmlLib when using ROOT 6.24 #620

plexoos opened this issue Nov 2, 2023 · 4 comments · Fixed by #641
Labels
ROOT6 Issues and changes related to transition from ROOT5 to ROOT6

Comments

@plexoos
Copy link
Member

plexoos commented Nov 2, 2023

After a couple of fixes, our code seems to compile fine against ROOT6.24 (See #619)

However, some test jobs fail at what appears to be the geometry loading stage. The errors point to the code in StarVMC/StarAgmlLib. Here is an example error message:

https://github.com/star-bnl/star-sw/actions/runs/6727541469/job/18287828236?pr=619

In file included from /tmp/root/spack-stage/spack-stage-root-6.24.06-gbmdgvxscayjf6nqc5tatcs424pan4gs/spack-build-gbmdgvx/input_line_9:15:
In file included from /tmp/root/spack-stage/spack-stage-root-6.24.06-gbmdgvxscayjf6nqc5tatcs424pan4gs/spack-build-gbmdgvx/etc/dictpch/allHeaders.h:120:
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/set:60:
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/stl_tree.h:1423:13: error: no viable conversion from returned value of type 'pair<...>' to function return type 'pair<...>'
            return _Res(0, _M_rightmost());
                   ^~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/stl_tree.h:1673:19: note: in instantiation of member function 'std::_Rb_tree<int, std::pair<const int, std::vector<TString, std::allocator<TString> > >, std::_Select1st<std::pair<const int, std::vector<TString, std::allocator<TString> > > >, std::less<int>, std::allocator<std::pair<const int, std::vector<TString, std::allocator<TString> > > > >::_M_get_insert_hint_unique_pos' requested here
            auto __res = _M_get_insert_hint_unique_pos(__pos, _S_key(__z));
                         ^
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/stl_map.h:465:15: note: in instantiation of function template specialization 'std::_Rb_tree<int, std::pair<const int, std::vector<TString, std::allocator<TString> > >, std::_Select1st<std::pair<const int, std::vector<TString, std::allocator<TString> > > >, std::less<int>, std::allocator<std::pair<const int, std::vector<TString, std::allocator<TString> > > > >::_M_emplace_hint_unique<const std::piecewise_construct_t &, std::tuple<const int &>, std::tuple<> >' requested here
          __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
                     ^
/star-sw/.sl79_gcc485/OBJ/StarVMC/StarAgmlLib/AgShape.h:70:53: note: in instantiation of member function 'std::map<int, std::vector<TString, std::allocator<TString> >, std::less<int>, std::allocator<std::pair<const int, std::vector<TString, std::allocator<TString> > > > >::operator[]' requested here
  std::vector< TString > &parList(){ return mParList[mId]; }
                                                    ^
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/stl_pair.h:127:17: note: candidate constructor not viable: no known conversion from '_Res' (aka 'pair<std::_Rb_tree_node_base *, std::_Rb_tree_node_base *>') to 'const std::pair<std::_Rb_tree_node_base *, std::_Rb_tree_node_base *> &' for 1st argument
      constexpr pair(const pair&) = default;
                ^
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/stl_pair.h:128:17: note: candidate constructor not viable: no known conversion from '_Res' (aka 'pair<std::_Rb_tree_node_base *, std::_Rb_tree_node_base *>') to 'std::pair<std::_Rb_tree_node_base *, std::_Rb_tree_node_base *> &&' for 1st argument
      constexpr pair(pair&&) = default;
                ^
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/stl_pair.h:124:12: note: candidate template ignored: deduced type 'const pair<...>' of 1st parameter does not match adjusted type 'pair<...>' of argument [with _U1 = std::_Rb_tree_node_base *, _U2 = std::_Rb_tree_node_base *, $2 = void]
        constexpr pair(const pair<_U1, _U2>& __p)
                  ^
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/stl_pair.h:150:12: note: candidate template ignored: deduced type 'pair<...>' of 1st parameter does not match adjusted type 'pair<...>' of argument [with _U1 = std::_Rb_tree_node_base *, _U2 = std::_Rb_tree_node_base *, $2 = void]
        constexpr pair(pair<_U1, _U2>&& __p)
                  ^

cc @klendathu2k @fgeurts

@plexoos plexoos added the ROOT6 Issues and changes related to transition from ROOT5 to ROOT6 label Nov 2, 2023
@klendathu2k
Copy link
Contributor

klendathu2k commented Nov 2, 2023

This is not reproducible in the production environment (i.e. built on an rcas node). Could you point me to instructions on how to load the container that the test runs in?

@plexoos

klendathu2k added a commit to klendathu2k/star-sw-1 that referenced this issue Nov 2, 2023
plexoos pushed a commit to plexoos/star-sw that referenced this issue Nov 3, 2023
plexoos pushed a commit to plexoos/star-sw that referenced this issue Nov 7, 2023
plexoos pushed a commit to plexoos/star-sw that referenced this issue Nov 8, 2023
plexoos pushed a commit to plexoos/star-sw that referenced this issue Nov 15, 2023
plexoos pushed a commit to plexoos/star-sw that referenced this issue Nov 16, 2023
@plexoos
Copy link
Member Author

plexoos commented Nov 29, 2023

This issue can be resolved by circumventing the use of inlined non-const map accessors. E.g. a9609e7

@plexoos
Copy link
Member Author

plexoos commented Nov 29, 2023

Could you point me to instructions on how to load the container that the test runs in?

Very easy. Download an artifact from the Build Pull Request action page, create a docker image with docker load < star-sw-root6-gcc485.tar, then run it

@klendathu2k
Copy link
Contributor

Okay. Have things running under docker. Unfortunately no GDB. However, once I built the star-sw under the eval area in afs, I was able to reproduce the issue in the production environment.

The problem occurs when the StiMasterDetectorBuilder tries to create a copy (clone) of the geometry. The crash appears to happen inside of root. I can reproduce this very simply by doing

# Load a geometry macro
$ root.exe y2012.C

# Clone the geometry
gGeoManager->Clone("CloneGeom");
 *** Break *** segmentation violation
 Generating stack trace...

So... moving to 6.24 will require a workaround (or bug fix in root). In the past we have not cloned the geometry, but rather operated on the geometry in memory and then restored from a cached file. So we should have a workaround available. Will return to this tomorrow.

dkapukchyan pushed a commit to dkapukchyan/star-sw that referenced this issue Mar 11, 2024
dkapukchyan pushed a commit to dkapukchyan/star-sw that referenced this issue Mar 11, 2024
Resolves star-bnl#620

Co-authored-by: klendathu2k <jwebb@bnl.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ROOT6 Issues and changes related to transition from ROOT5 to ROOT6
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants