Project

General

Profile

Bug #7115

v1_07_03 registry_via_id.h:cet::registry_via_id<K,V>::put( collection_type const & c ) SEGV

Added by Ron Rechenmacher about 6 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
10/06/2014
Due date:
% Done:

100%

Estimated time:
Experiment:
Co-Assignees:
Duration:

Description

After upgrading all the software to e6:s5, artdaq-demo SEGVs on the line: ParentageRegistry::put(*parentageMap);

I the old v1_06_02 version, it seems the put actually does not do anything because (from my notes):
(gdb) p c.begin()
$1 = {_M_node = 0x7f927bffcf18}
(gdb) p c.end()
$2 = {_M_node = 0x7f927bffcf18}

Because this involves many packages, MRB seems the right tool to use. However, I'm struggling with it and cluck was rebooted and I've lost the debug session history; therefore
having troubles efficiently comparing the old to the new.

I did record that the new ends up calling:
(gdb) s
cet::registry_via_id<art::Hash<5>, art::Parentage>::put (c=...) at /mu2e/ups/cetlib/v1_07_03/include/cetlib/registry_via_id.h:147
147 put(c.cbegin(), c.cend());

More later.


Related issues

Related to artdaq - Bug #7114: The Aggregator crashes whne using e6:s5Closed10/06/201410/24/2014

History

#1 Updated by Christopher Green about 6 years ago

  • Status changed from New to Feedback
  • Assignee set to Christopher Green

Please let us know exactly what you are building: packages and tagged versions (or HEAD): I attempted to build the HEAD of artdaq-core this morning and received a compile failure in the dictionary.

#2 Updated by Christopher Green about 6 years ago

From Ron via email:

I just cloned artdaq-core and HEAD built fine for me.

Ignoring that for the moment...

Try this:

mkdir e6s5; cd e6s5
git clone ssh://p-artdaq-demo@cdcvs.fnal.gov/cvs/projects/artdaq-demo
cd artdaq-demo
./tools/quick-start.sh --tag=feature/e6s5_try  --run-demo --debug # answer "y" (enter)

#3 Updated by Kurt Biery about 6 years ago

Chris,
Thanks for the fixes to NetMonInput_source and NetMonOutput_module in the artdaq package to help with this.

As we mentioned yesterday, when we try to run the artdaq-demo or ds50daq system with this change, we see the following message:

Thu Oct 09 08:38:10 -0500 2014: %MSG-i Root_Information: NetMonOutput:netMonOutput TClass::TClass() run: 1009 subRun: 1 event: 3
Thu Oct 09 08:38:10 -0500 2014: no dictionary for class pair<const art::Hash<5>,art::Parentage> is available
Thu Oct 09 08:38:10 -0500 2014: %MSG

When I tried adding the "const" qualifier to the art::ParentageID in artdaq/ArtModules/classes.h and classes_def.xml, I get the following compiler errors:

I've tried a couple of things (like creating a typedef of (const art::ParentageID) and using that in the two classes files, but that didn't help.

Building CXX object artdaq/Application/MPI2/CMakeFiles/EventBuilderMain.dir/EventBuilderMain.cc.o
In file included from /products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/stl_algobase.h:64:0,
from /products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/char_traits.h:39,
from /products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/string:40,
from /products/art/v1_12_01/include/art/Persistency/Provenance/BranchID.h:11,
from /products/art/v1_12_01/include/art/Persistency/Provenance/Parentage.h:14,
from /products/art/v1_12_01/include/art/Persistency/Provenance/ParentageRegistry.h:10,
from /home/biery/repo/artdaq/artdaq/ArtModules/classes.h:1,
from /home/biery/scratch/artdaqBuild/artdaq/ArtModules/artdaq_ArtModules_dict.cpp:29:
/products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/stl_pair.h: In instantiation of ‘std::pair<_T1, T2>& std::pair<_T1, _T2>::operator=(const std::pair<_T1, _T2>&) [with _T1 = const art::Hash<5>; _T2 = art::Parentage]’:
/home/biery/repo/artdaq/artdaq/ArtModules/classes.h:5:21: required from here
/products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/stl_pair.h:160:8: error: no match for ‘operator=’ (operand types are ‘const art::Hash<5>’ and ‘const art::Hash<5>’)
first = __p.first;
^
/products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/stl_pair.h:160:8: note: candidate is:
In file included from /products/art/v1_12_01/include/art/Persistency/Provenance/ParentageID.h:5:0,
from /products/art/v1_12_01/include/art/Persistency/Provenance/Parentage.h:15,
from /products/art/v1_12_01/include/art/Persistency/Provenance/ParentageRegistry.h:10,
from /home/biery/repo/artdaq/artdaq/ArtModules/classes.h:1,
from /home/biery/scratch/artdaqBuild/artdaq/ArtModules/artdaq_ArtModules_dict.cpp:29:
/products/art/v1_12_01/include/art/Persistency/Provenance/Hash.h:126:3: note: const art::Hash<I>& art::Hash<I>::operator=(const art::Hash<I>&) [with int I = 5] <near match>
Hash<I>::operator=(Hash<I> const& iRHS)
^
/products/art/v1_12_01/include/art/Persistency/Provenance/Hash.h:126:3: note: no known conversion for implicit ‘this’ parameter from ‘const art::Hash<5>*’ to ‘art::Hash<5>*’
In file included from /products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/stl_algobase.h:64:0,
from /products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/char_traits.h:39,
from /products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/string:40,
from /products/art/v1_12_01/include/art/Persistency/Provenance/BranchID.h:11,
from /products/art/v1_12_01/include/art/Persistency/Provenance/Parentage.h:14,
from /products/art/v1_12_01/include/art/Persistency/Provenance/ParentageRegistry.h:10,
from /home/biery/repo/artdaq/artdaq/ArtModules/classes.h:1,
from /home/biery/scratch/artdaqBuild/artdaq/ArtModules/artdaq_ArtModules_dict.cpp:29:
/products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/stl_pair.h: In instantiation of ‘std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_T1, _T2>&&) [with _T1 = const art::Hash<5>; _T2 = art::Parentage]’:
/home/biery/repo/artdaq/artdaq/ArtModules/classes.h:5:21: required from here
/products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/stl_pair.h:170:8: error: no match for ‘operator=’ (operand types are ‘const art::Hash<5>’ and ‘const art::Hash<5>’)
first = std::forward<first_type>(
_p.first);
^
/products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/stl_pair.h:170:8: note: candidate is:
In file included from /products/art/v1_12_01/include/art/Persistency/Provenance/ParentageID.h:5:0,
from /products/art/v1_12_01/include/art/Persistency/Provenance/Parentage.h:15,
from /products/art/v1_12_01/include/art/Persistency/Provenance/ParentageRegistry.h:10,
from /home/biery/repo/artdaq/artdaq/ArtModules/classes.h:1,
from /home/biery/scratch/artdaqBuild/artdaq/ArtModules/artdaq_ArtModules_dict.cpp:29:
/products/art/v1_12_01/include/art/Persistency/Provenance/Hash.h:126:3: note: const art::Hash<I>& art::Hash<I>::operator=(const art::Hash<I>&) [with int I = 5] <near match>
Hash<I>::operator=(Hash<I> const& iRHS)
^
/products/art/v1_12_01/include/art/Persistency/Provenance/Hash.h:126:3: note: no known conversion for implicit ‘this’ parameter from ‘const art::Hash<5>*’ to ‘art::Hash<5>*’
In file included from /products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/stl_pair.h:59:0,
from /products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/stl_algobase.h:64,
from /products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/char_traits.h:39,
from /products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/string:40,
from /products/art/v1_12_01/include/art/Persistency/Provenance/BranchID.h:11,
from /products/art/v1_12_01/include/art/Persistency/Provenance/Parentage.h:14,
from /products/art/v1_12_01/include/art/Persistency/Provenance/ParentageRegistry.h:10,
from /home/biery/repo/artdaq/artdaq/ArtModules/classes.h:1,
from /home/biery/scratch/artdaqBuild/artdaq/ArtModules/artdaq_ArtModules_dict.cpp:29:
/products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/move.h: In instantiation of ‘void std::swap(Tp&, _Tp&) [with _Tp = const art::Hash<5>]’:
/products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/stl_pair.h:199:23: required from ‘void std::pair<_T1, _T2>::swap(std::pair<_T1, _T2>&) [with _T1 = const art::Hash<5>; _T2 = art::Parentage]’
/home/biery/repo/artdaq/artdaq/ArtModules/classes.h:5:21: required from here
/products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/move.h:176:11: error: no match for ‘operator=’ (operand types are ‘const art::Hash<5>’ and ‘std::remove_reference<const art::Hash<5>&>::type {aka const art::Hash<5>}’)
__a = _GLIBCXX_MOVE(
_b);
^
/products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/move.h:176:11: note: candidate is:
In file included from /products/art/v1_12_01/include/art/Persistency/Provenance/ParentageID.h:5:0,
from /products/art/v1_12_01/include/art/Persistency/Provenance/Parentage.h:15,
from /products/art/v1_12_01/include/art/Persistency/Provenance/ParentageRegistry.h:10,
from /home/biery/repo/artdaq/artdaq/ArtModules/classes.h:1,
from /home/biery/scratch/artdaqBuild/artdaq/ArtModules/artdaq_ArtModules_dict.cpp:29:
/products/art/v1_12_01/include/art/Persistency/Provenance/Hash.h:126:3: note: const art::Hash<I>& art::Hash<I>::operator=(const art::Hash<I>&) [with int I = 5] <near match>
Hash<I>::operator=(Hash<I> const& iRHS)
^
/products/art/v1_12_01/include/art/Persistency/Provenance/Hash.h:126:3: note: no known conversion for implicit ‘this’ parameter from ‘const art::Hash<5>*’ to ‘art::Hash<5>*’
In file included from /products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/stl_pair.h:59:0,
from /products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/stl_algobase.h:64,
from /products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/char_traits.h:39,
from /products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/string:40,
from /products/art/v1_12_01/include/art/Persistency/Provenance/BranchID.h:11,
from /products/art/v1_12_01/include/art/Persistency/Provenance/Parentage.h:14,
from /products/art/v1_12_01/include/art/Persistency/Provenance/ParentageRegistry.h:10,
from /home/biery/repo/artdaq/artdaq/ArtModules/classes.h:1,
from /home/biery/scratch/artdaqBuild/artdaq/ArtModules/artdaq_ArtModules_dict.cpp:29:
/products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/move.h:177:11: error: no match for ‘operator=’ (operand types are ‘const art::Hash<5>’ and ‘std::remove_reference<const art::Hash<5>&>::type {aka const art::Hash<5>}’)
_b = _GLIBCXX_MOVE(_tmp);
^
/products/gcc/v4_9_1/Linux64bit+2.6-2.12/include/c++/4.9.1/bits/move.h:177:11: note: candidate is:
In file included from /products/art/v1_12_01/include/art/Persistency/Provenance/ParentageID.h:5:0,
from /products/art/v1_12_01/include/art/Persistency/Provenance/Parentage.h:15,
from /products/art/v1_12_01/include/art/Persistency/Provenance/ParentageRegistry.h:10,
from /home/biery/repo/artdaq/artdaq/ArtModules/classes.h:1,
from /home/biery/scratch/artdaqBuild/artdaq/ArtModules/artdaq_ArtModules_dict.cpp:29:
/products/art/v1_12_01/include/art/Persistency/Provenance/Hash.h:126:3: note: const art::Hash<I>& art::Hash<I>::operator=(const art::Hash<I>&) [with int I = 5] <near match>
Hash<I>::operator=(Hash<I> const& iRHS)
^
/products/art/v1_12_01/include/art/Persistency/Provenance/Hash.h:126:3: note: no known conversion for implicit ‘this’ parameter from ‘const art::Hash<5>*’ to ‘art::Hash<5>*’
make2: * [artdaq/ArtModules/CMakeFiles/artdaq_ArtModules_dict.dir/artdaq_ArtModules_dict.cpp.o] Error 1
make1:
[artdaq/ArtModules/CMakeFiles/artdaq_ArtModules_dict.dir/all] Error 2
make1: *
* Waiting for unfinished jobs....

Suggestions?
Thanks!
Kurt

#4 Updated by Christopher Green about 6 years ago

  • Project changed from cetlib to artdaq
  • Status changed from Feedback to Resolved
  • % Done changed from 0 to 100

As you infer, the original problem was due to a mismatch between the actual type of the object to be stored (std::map<art::Hash<5> const, art::Parentage>) and the type requested for the TClass system (std::map<art::Hash<5> const, art::Parentage>). The aforementioned commits to NetMonInput_source.cc and NetMonOutput_module.cc solve the primary problem, as you note. The remaining problem of the missing pair dictionary is solved by the patch below. Note the change of the template forward declaration to a dummy instantiation of an object in classes.h:

diff --git a/artdaq/ArtModules/classes.h b/artdaq/ArtModules/classes.h
index 656b5e7..201ea26 100644
--- a/artdaq/ArtModules/classes.h
+++ b/artdaq/ArtModules/classes.h
@@ -2,10 +2,9 @@
 #include "art/Persistency/Provenance/ParentageID.h" 
 #include "art/Persistency/Common/Wrapper.h" 

-template class std::pair<art::ParentageID, art::Parentage>;
-
 namespace {
   struct dictionary {
+    std::pair<const art::ParentageID, art::Parentage> pp;
     art::ParentageMap pm;
   };
 }
diff --git a/artdaq/ArtModules/classes_def.xml b/artdaq/ArtModules/classes_def.xml
index 47f7161..d9c374e 100644
--- a/artdaq/ArtModules/classes_def.xml
+++ b/artdaq/ArtModules/classes_def.xml
@@ -1,4 +1,4 @@
 <lcgdict>
- <class name="std::pair<art::ParentageID, art::Parentage>"/>
+ <class name="std::pair<const art::ParentageID, art::Parentage>"/>
  <class name="art::ParentageMap"/>
 </lcgdict>
If you have any remaining problems, please let me know.

#5 Updated by Kurt Biery about 6 years ago

  • Target version set to v1_12_04

#6 Updated by Kurt Biery about 5 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF