Navigation Menu

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

Fix sorting in TTUTrackingAlg (10_6_X) #31416

Merged
merged 3 commits into from Sep 10, 2020

Conversation

makortel
Copy link
Contributor

@makortel makortel commented Sep 9, 2020

PR description:

Backport of #31415:

This PR fixes a bug in the sorting comparison functions in TTUTrackingAlg that cause crashes reported in #31258 and #31410. The std::sort requires the comparison functor to meet the requirements of Compare (loosely needs "less than"), which the current "less or equal than" does not meet, leading to undefined behavior. This PR changes the functors to use "less than" comparison.

Furthermore, as pointed out in #31258 (comment), this PR proposes to fix a logic bug in the code that assumes std::sort() to be stable (it is not) by combining the two comparison operations into one, and replacing the function structs with lambdas.

For consistency this PR also changes the subsequent call to std::unique() to use a lambda instead of function object.

Resolves #31410.

PR validation:

The crash reported in #31410 disappears, limited matrix runs.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 9, 2020

A new Pull Request was created by @makortel (Matti Kortelainen) for CMSSW_10_6_X.

It involves the following packages:

L1Trigger/RPCTechnicalTrigger

@cmsbuild, @rekovic, @benkrikler can you please review it and eventually sign? Thanks.
@Martin-Grunewald 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

@makortel
Copy link
Contributor Author

makortel commented Sep 9, 2020

backport of #31415

@makortel
Copy link
Contributor Author

makortel commented Sep 9, 2020

type bug-fix

@qliphy
Copy link
Contributor

qliphy commented Sep 10, 2020

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 10, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+1
Tested at: 9241eef
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7d47c9/9241/summary.html
CMSSW: CMSSW_10_6_X_2020-09-09-2300
SCRAM_ARCH: slc7_amd64_gcc700

@cmsbuild
Copy link
Contributor

Comparison job queued.

@silviodonato
Copy link
Contributor

merge

@cmsbuild cmsbuild merged commit 6e29f93 into cms-sw:CMSSW_10_6_X Sep 10, 2020
@cmsbuild
Copy link
Contributor

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 3214631
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3214295
  • DQMHistoTests: Total skipped: 334
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 140 log files, 14 edm output root files, 34 DQM output files

@makortel makortel deleted the fixTTUTrackingAlg_106x branch September 10, 2020 18:20
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

4 participants