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

[UBSAN] fix zero size array runtime error #41771

Merged
merged 3 commits into from
May 31, 2023

Conversation

smuzaffar
Copy link
Contributor

@smuzaffar smuzaffar commented May 24, 2023

UBSAN IBs generates runtime errors [a]. This change should fix these error. UBSAN complains here https://github.com/cms-sw/cmssw/blob/master/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc#L122-L127 and this can happen when any of SL1metaPrimitives or SL3metaPrimitives is zero size

[a]
https://cmssdt.cern.ch/SDT/jenkins-artifacts/ubsan_logs/CMSSW_13_2_X_2023-05-22-2300/

  • 22 L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc:122:48: runtime error: variable length array bound evaluates to non-positive value 0
  • 20 L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc:125:48: runtime error: variable length array bound evaluates to non-positive value 0

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41771/35639

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @smuzaffar (Malik Shahzad Muzaffar) for master.

It involves the following packages:

  • L1Trigger/DTTriggerPhase2 (upgrade, l1)

@epalencia, @cmsbuild, @AdrianoDee, @srimanob, @aloeliger, @cecilecaillol can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @missirol, @JanFSchulte, @battibass this is something you requested to watch as well.
@perrotta, @dpiparo, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@aloeliger
Copy link
Contributor

@smuzaffar I'm afraid I'm not as familiar with this part of L1 code, but this would seem to me to be a fundamental change in function?

@smuzaffar
Copy link
Contributor Author

@aloeliger , correct this is a fundamental change in function. Someone should review this code. To me continuing the loop if either SL1metaPrimitives or SL3metaPrimitives is empty does not make any sense.

@aloeliger
Copy link
Contributor

@aloeliger , correct this is a fundamental change in function. Someone should review this code. To me continuing the loop if either SL1metaPrimitives or SL3metaPrimitives is empty does not make any sense.

@smuzaffar That's very probably true. I can take a look tomorrow myself, and see if I know an expert who can also weigh in. Does this have a timescale like the ppc fix?

@folguera
Copy link
Contributor

folguera commented May 30, 2023

I can look at it tomorrow, I’ve contributed to that code myself in the past so shouldn’t be hard, also @jfernan2 may help here.

@perrotta
Copy link
Contributor

type bug-fix

@aloeliger
Copy link
Contributor

@folguera If you are okay with it, then I will sign off on it.

@aloeliger
Copy link
Contributor

@smuzaffar Apologies, this is off topic, however I was reminded reading this, @cecilecaillol would like to be removed from the l1-l2 github organization, and off of buildbot's ping/permission list. What does it take to do that?

@folguera
Copy link
Contributor

I think the fix is OK, however, there are similar errors on L989 that should be fixed, should we create another PR or should we include this here @smuzaffar I've created a PR to your branch with my proposed solutions smuzaffar#3

@perrotta
Copy link
Contributor

@smuzaffar Apologies, this is off topic, however I was reminded reading this, @cecilecaillol would like to be removed from the l1-l2 github organization, and off of buildbot's ping/permission list. What does it take to do that?

Here is the bot pr to do so: cms-sw/cms-bot#1999

@smuzaffar
Copy link
Contributor Author

thanks @folguera , I have merged your smuzaffar#3

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-41771/35720

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

Pull request #41771 was updated. @epalencia, @AdrianoDee, @srimanob, @cmsbuild, @aloeliger can you please check and sign again.

@smuzaffar
Copy link
Contributor Author

please test

@aloeliger
Copy link
Contributor

I think the fix is OK, however, there are similar errors on L989 that should be fixed, should we create another PR or should we include this here @smuzaffar I've created a PR to your branch with my proposed solutions smuzaffar#3

Okay, then this is good by me. I'll sign when the tests come back.

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-e2970c/32905/summary.html
COMMIT: 5393094
CMSSW: CMSSW_13_2_X_2023-05-31-1100/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/41771/32905/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 10 lines to the logs
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3221457
  • DQMHistoTests: Total failures: 7
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3221428
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 207 log files, 159 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@AdrianoDee
Copy link
Contributor

+1

@aloeliger
Copy link
Contributor

+l1

@cmsbuild
Copy link
Contributor

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

@perrotta
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 2fd5cfb into cms-sw:master May 31, 2023
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.

6 participants