-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
get rid of more UB in TrackListMerger
#37384
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37384/29037
|
A new Pull Request was created by @mmusich (Marco Musich) for master. It involves the following packages:
@jpata, @cmsbuild, @clacaputo, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild, please test |
seems tests have been stuck here for a while? |
I checked UBSAN with this PR and the number of errors is reduced but does not completely disappear (2 errors in 100 events)
|
@smuzaffar looks like the bot may need manual intervention here, could you please check? Or would "please cancel / please test" have an effect here? |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-946778/23525/summary.html Comparison SummarySummary:
|
thanks @jpata I am addressing those. Running local tests now. |
@mmusich just to check in on this - were you able to reproduce the failing UBSAN even after this PR? |
yes, but after applying the same kind of trivial fix that I have applied everywhere (which is to return before the arrays with size diff --git a/RecoTracker/FinalTrackSelectors/plugins/TrackListMerger.cc b/RecoTracker/FinalTrackSelectors/plugins/TrackListMerger.cc
index 3be2d7e3db0..98ae408d4f0 100644
--- a/RecoTracker/FinalTrackSelectors/plugins/TrackListMerger.cc
+++ b/RecoTracker/FinalTrackSelectors/plugins/TrackListMerger.cc
@@ -448,6 +448,13 @@ void TrackListMerger::produce(edm::Event& e, const edm::EventSetup& es) {
typedef std::pair<unsigned int, const TrackingRecHit*> IHit;
std::vector<std::vector<IHit>> rh1(ngood); // "not an array" of vectors!
//const TrackingRecHit* fh1[ngood]; // first hit...
+
+ if (ngood == 0) {
+ // output empty collections and early return
+ this->returnEmptyCollections(e);
+ return;
+ }
+
reco::TrackBase::TrackAlgorithm algo[ngood];
float score[ngood]; I run into an assertion failure (for a single wf in the limited matrix cmsRun: /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/06ca28086ff42d83fe311221dd768eec/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_X_2022-04-10-2300/src/RecoLocalTracker/SubCollectionProducers/src/TrackClusterRemoverPhase2.cc:156: virtual void {anonymous}::TrackClusterRemoverPhase2::produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const: Assertion `s == (*quals).size()' failed. a quick solution would just be to create the arrays |
type tracking |
@cms-sw/reconstruction-l2 any thoughts on this came up in the past 15 days? |
Naively, why does the assert in TrackClusterRemoverPhase2.cc:156 get triggered? By a quick look, it's comparing the number of tracks (apparently not 0) to the number of quals (which should be 0, because there were no tracks). |
this is quite literally what the assertion message is saying. |
Sure, I'm trying to undestand why?
Sounds fine to me. |
+reconstruction
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-946778/24218/summary.html Comparison Summary@slava77 comparisons for the following workflows were not done due to missing matrix map:
Summary:
|
+1 |
PR description:
In response to #35036 (comment), follow-up to #37308.
PR validation:
cmssw
compiles, also runrunTheMatrix.py -l limited -j 8 --ibeos
if this PR is a backport please specify the original PR and why you need to backport that PR:
N/A