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

RecoVertex/PrimaryVertexProducer: fix heap buffer overflow found by ASAN. #32028

Conversation

gartung
Copy link
Member

@gartung gartung commented Nov 4, 2020

PR description:

Change size of pcut_cache from nt to nv to avoid heap buffer overflow when nt < nv.

PR validation:

Ran runTheMatrix in CMSSW_11_2_ASAN_X_2020-11-02-2300.

if this PR is a backport please specify the original PR and why you need to backport that PR:

Before submitting your pull requests, make sure you followed this checklist:

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 4, 2020

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 4, 2020

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32028/19573

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 4, 2020

A new Pull Request was created by @gartung (Patrick Gartung) for master.

It involves the following packages:

RecoVertex/PrimaryVertexProducer

@perrotta, @jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@makortel, @GiacomoSguazzoni, @JanFSchulte, @rovere, @VinInn, @ebrondol, @mtosi, @dgulhan this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@gartung gartung changed the base branch from master to CMSSW_11_2_X November 4, 2020 17:11
@gartung
Copy link
Member Author

gartung commented Nov 4, 2020

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 4, 2020

@gartung, CMSSW_11_2_X branch is closed for direct updates. cms-bot is going to move this PR to master branch.
In future, please use cmssw master branch to submit your changes.

@cmsbuild cmsbuild changed the base branch from CMSSW_11_2_X to master November 4, 2020 17:12
@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 4, 2020

The tests are being triggered in jenkins.

@gartung
Copy link
Member Author

gartung commented Nov 4, 2020

please test for CMSSW_11_2_ASAN_X

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 4, 2020

The tests are being triggered in jenkins.
Test Parameters:

@gartung gartung force-pushed the gartung-RecoVertex-PrimaryVertexProducer-fix-heap-buffer-overflow branch from 033c003 to 45ec02a Compare November 4, 2020 17:43
@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 4, 2020

-1

Tested at: 787bba7

CMSSW: CMSSW_11_2_ASAN_X_2020-11-02-2300
SCRAM_ARCH: slc7_amd64_gcc820

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ecae04/10515/git-log-recent-commits
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ecae04/10515/git-merge-result

You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ecae04/10515/summary.html

I found follow errors while testing this PR

Failed tests: UnitTests RelVals AddOn

  • Unit Tests:

I found errors in the following unit tests:

---> test testUCTUnpacker had ERRORS
---> test TestDQMServicesDemo had ERRORS

  • RelVals:

When I ran the RelVals I found an error in the following workflows:
1001.0 step4

runTheMatrix-results/1001.0_RunMinBias2011A+RunMinBias2011A+TIER0EXP+ALCAEXP+ALCAHARVDSIPIXELCALRUN1+ALCAHARVD1+ALCAHARVD2+ALCAHARVD3+ALCAHARVD4+ALCAHARVD5/step4_RunMinBias2011A+RunMinBias2011A+TIER0EXP+ALCAEXP+ALCAHARVDSIPIXELCALRUN1+ALCAHARVD1+ALCAHARVD2+ALCAHARVD3+ALCAHARVD4+ALCAHARVD5.log

23234.0 step3
runTheMatrix-results/23234.0_TTbar_14TeV+2026D49+TTbar_14TeV_TuneCP5_GenSimHLBeamSpot14+DigiTrigger+RecoGlobal+HARVESTGlobal/step3_TTbar_14TeV+2026D49+TTbar_14TeV_TuneCP5_GenSimHLBeamSpot14+DigiTrigger+RecoGlobal+HARVESTGlobal.log

28234.0 step3
runTheMatrix-results/28234.0_TTbar_14TeV+2026D60+TTbar_14TeV_TuneCP5_GenSimHLBeamSpot14+DigiTrigger+RecoGlobal+HARVESTGlobal/step3_TTbar_14TeV+2026D60+TTbar_14TeV_TuneCP5_GenSimHLBeamSpot14+DigiTrigger+RecoGlobal+HARVESTGlobal.log

23434.999 step4
runTheMatrix-results/23434.999_TTbar_14TeV+2026D49PU_PMXS1S2PR+TTbar_14TeV_TuneCP5_GenSimHLBeamSpot14+PREMIX_PremixHLBeamSpot14PU+DigiTriggerPU+RecoGlobalPU+HARVESTGlobalPU/step4_TTbar_14TeV+2026D49PU_PMXS1S2PR+TTbar_14TeV_TuneCP5_GenSimHLBeamSpot14+PREMIX_PremixHLBeamSpot14PU+DigiTriggerPU+RecoGlobalPU+HARVESTGlobalPU.log

  • AddOn:

I found errors in the following addon tests:

cmsRun /cvmfs/cms-ib.cern.ch/week1/slc7_amd64_gcc820/cms/cmssw/CMSSW_11_2_ASAN_X_2020-11-02-2300/src/HLTrigger/Configuration/test/OnLine_HLT_GRun.py realData=False globalTag=@ inputFiles=@ : FAILED - time: date Wed Nov 4 23:03:26 2020-date Wed Nov 4 22:15:37 2020 s - exit: 256
cmsRun /cvmfs/cms-ib.cern.ch/week1/slc7_amd64_gcc820/cms/cmssw/CMSSW_11_2_ASAN_X_2020-11-02-2300/src/HLTrigger/Configuration/test/OnLine_HLT_PRef.py realData=False globalTag=@ inputFiles=@ : FAILED - time: date Wed Nov 4 22:52:17 2020-date Wed Nov 4 22:15:43 2020 s - exit: 256
cmsRun /cvmfs/cms-ib.cern.ch/week1/slc7_amd64_gcc820/cms/cmssw/CMSSW_11_2_ASAN_X_2020-11-02-2300/src/HLTrigger/Configuration/test/OnLine_HLT_Fake.py realData=False globalTag=@ inputFiles=@ : FAILED - time: date Wed Nov 4 22:51:05 2020-date Wed Nov 4 22:15:53 2020 s - exit: 256
cmsRun /cvmfs/cms-ib.cern.ch/week1/slc7_amd64_gcc820/cms/cmssw/CMSSW_11_2_ASAN_X_2020-11-02-2300/src/HLTrigger/Configuration/test/OnLine_HLT_HIon.py realData=False globalTag=@ inputFiles=@ : FAILED - time: date Wed Nov 4 22:53:56 2020-date Wed Nov 4 22:15:56 2020 s - exit: 256
cmsRun /cvmfs/cms-ib.cern.ch/week1/slc7_amd64_gcc820/cms/cmssw/CMSSW_11_2_ASAN_X_2020-11-02-2300/src/HLTrigger/Configuration/test/OnLine_HLT_Fake2.py realData=False globalTag=@ inputFiles=@ : FAILED - time: date Wed Nov 4 22:54:16 2020-date Wed Nov 4 22:15:59 2020 s - exit: 256
cmsRun /cvmfs/cms-ib.cern.ch/week1/slc7_amd64_gcc820/cms/cmssw/CMSSW_11_2_ASAN_X_2020-11-02-2300/src/HLTrigger/Configuration/test/OnLine_HLT_Fake1.py realData=False globalTag=@ inputFiles=@ : FAILED - time: date Wed Nov 4 22:53:34 2020-date Wed Nov 4 22:16:04 2020 s - exit: 256
cmsRun /cvmfs/cms-ib.cern.ch/week1/slc7_amd64_gcc820/cms/cmssw/CMSSW_11_2_ASAN_X_2020-11-02-2300/src/HLTrigger/Configuration/test/OnLine_HLT_PIon.py realData=False globalTag=@ inputFiles=@ : FAILED - time: date Wed Nov 4 22:59:45 2020-date Wed Nov 4 22:30:16 2020 s - exit: 256

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ecae04/10515/git-log-recent-commits
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ecae04/10515/git-merge-result

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 4, 2020

Comparison job queued.

@perrotta
Copy link
Contributor

perrotta commented Nov 5, 2020

This is a rather obvious and trivial fix (thank you @gartung ) and the remaining errors while running with ASAN are due to other open issues (one of them should be fixed by #32021, but the tests I've tried to launch there together with PR for CMSSW_11_2_ASAN_X did not start... ). I think this could even be merged as such, perhaps after having tested it in the "normal" IB.

@perrotta
Copy link
Contributor

perrotta commented Nov 5, 2020

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 5, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 5, 2020

+1
Tested at: 787bba7
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ecae04/10526/summary.html
CMSSW: CMSSW_11_2_X_2020-11-05-1100
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 5, 2020

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 5, 2020

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ecae04/10526/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 35
  • DQMHistoTests: Total histograms compared: 2544144
  • DQMHistoTests: Total failures: 7
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2544115
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 34 files compared)
  • Checked 149 log files, 22 edm output root files, 35 DQM output files

@perrotta
Copy link
Contributor

perrotta commented Nov 6, 2020

+1

  • Trivial and logical fix
  • Jenkins tests pass with no no difference, as expected because it is unlikely that there are less tracks than vertices in an event

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 6, 2020

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. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@silviodonato
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 4a58219 into cms-sw:master Nov 6, 2020
@gartung gartung deleted the gartung-RecoVertex-PrimaryVertexProducer-fix-heap-buffer-overflow branch December 16, 2020 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants