Skip to content

Build RecHitTools per event to fix cross-stream double-free#51529

Merged
cmsbuild merged 1 commit into
cms-sw:masterfrom
felicepantaleo:fix-hgcal-associator-rechittools-doublefree
Jul 21, 2026
Merged

Build RecHitTools per event to fix cross-stream double-free#51529
cmsbuild merged 1 commit into
cms-sw:masterfrom
felicepantaleo:fix-hgcal-associator-rechittools-doublefree

Conversation

@felicepantaleo

Copy link
Copy Markdown
Contributor

The five global associator producers mutated a shared RecHitTools member via setGeometry() inside const produce(), racing across streams and giving an ASAN double-free on the RecHitTools internal vector buffer.

fixes #51380

…uble-free

The five global associator producers mutated a shared RecHitTools member via
setGeometry() inside const produce(), racing across streams and giving an ASAN
double-free on the RecHitTools internal vector buffer. Build RecHitTools as a
per-event local and pass it to the impl instead. LCToSimTS never used it, so the
geometry is dropped there.
@cmsbuild

cmsbuild commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

cms-bot internal usage

@felicepantaleo

Copy link
Copy Markdown
Contributor Author

type bugfix

@felicepantaleo

Copy link
Copy Markdown
Contributor Author

@cmsbuild please test

@cmsbuild

Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-51529/50248

@cmsbuild

Copy link
Copy Markdown
Contributor

A new Pull Request was created by @felicepantaleo for master.

It involves the following packages:

  • SimCalorimetry/HGCalAssociatorProducers (simulation)

@civanch, @kpedro88, @mdhildreth can you please review it and eventually sign? Thanks.
@rovere, @sameasy this is something you requested to watch as well.
@ftenchini, @mandrenguyen, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@cmsbuild

Copy link
Copy Markdown
Contributor

+1

Size: This PR adds an extra 24KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-3b5000/54824/summary.html
COMMIT: 29159f3
CMSSW: CMSSW_20_1_X_2026-07-20-1100/el9_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/51529/54824/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 2 lines to the logs
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 45
  • DQMHistoTests: Total histograms compared: 3548294
  • DQMHistoTests: Total failures: 106
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3548170
  • DQMHistoTests: Total skipped: 18
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 44 files compared)
  • Checked 195 log files, 163 edm output root files, 45 DQM output files
  • TriggerResults: no differences found

@civanch

civanch commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

+1

@cmsbuild

Copy link
Copy Markdown
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. @ftenchini, @mandrenguyen, @sextonkennedy (and backports should be raised in the release meeting by the corresponding L2)

@ftenchini

Copy link
Copy Markdown
Contributor

+1

@cmsbuild
cmsbuild merged commit 796a068 into cms-sw:master Jul 21, 2026
10 checks passed
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.

[ASAN] double delete in hgcal::RecHitTools::setGeometry

4 participants