Skip to content

Crash in VPOverlapMonitor

Crash (rare, but with large data volume not so) in RecoMon. It crashed in TrackVPOverlapMonitor (see dbg build stack trace)

#10 LHCb::Pr::Tracks::Fit::Node::residual (this=this
entry=0x0) at ../Tr/TrackFitEvent/include/Event/PrFitNode.h:197
#11 0x00007f69ded5ac37 in LHCb::Tr::Monitor::TrackVPOverlapMonitor::fill<LHCb::PrKalmanFitResult> (this=this
entry=0x12b8c330, track=..., fr=...) at ../Tr/TrackMonitors/src/TrackVPOverlapMonitor.cpp:253
#12 0x00007f69ded5c789 in LHCb::Tr::Monitor::TrackVPOverlapMonitor::operator() (this=this
entry=0x12b8c330, tracks=...) at ../Tr/TrackMonitors/src/TrackVPOverlapMonitor.cpp:142

Access to null pointer at (https://gitlab.cern.ch/lhcb/Rec/-/blob/master/Tr/TrackMonitors/src/TrackVPOverlapMonitor.cpp#L250)

        for ( auto& xynode : xynodes ) {
          const auto& node1 = xynode.xnode;
          const auto& node2 = xynode.ynode;
          const auto  res1  = node1->residual();
          const auto  res2  = node2->residual();
          // ....
        }

Because at filling xynodes

      // fill the list of 2D nodes
      using VPXYNodeType = VPXYNode<TNode>;
      std::vector<VPXYNodeType> xynodes;
      xynodes.reserve( nodes( fr ).size() / 2 );
      VPXYNodeType currentnode;
      for ( const auto& node : nodes( fr ) ) {
        if ( node.isVP() ) {
          const auto vpid = id( node ).vpID();
          if ( vpid != currentnode.vpid ) {
            currentnode.vpid  = vpid;
            currentnode.xnode = &node;
          } else {
            currentnode.ynode = &node;
            xynodes.push_back( currentnode );
          }
        }
      }

There is a case of a node that is indeed isVP but has the default 0 vpid. Is this a symptom of something more?

Edited by Maarten Van Veghel