cms-sw / cmssw

CMS Offline Software
http://cms-sw.github.io/
Apache License 2.0
1.09k stars 4.32k forks source link

[UBSAN][LST]Fix runtime error by keep the region object alive #46758

Closed smuzaffar closed 3 days ago

smuzaffar commented 3 days ago

This should fix the UBSAN runtime error [a]. The issue is that GlobalTrackingRegion() gets destroyed after the https://github.com/cms-sw/cmssw/blob/CMSSW_14_2_UBSAN_X_2024-11-20-2300/RecoTracker/LST/plugins/LSTOutputConverter.cc#L198C28-L198C50 call and the pointer to this stored https://github.com/cms-sw/cmssw/blob/CMSSW_14_2_UBSAN_X_2024-11-20-2300/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc#L55 is invalid when seedCreator_->makeSeed(seeds, hitsForSeed); call is make

[a] https://cmssdt.cern.ch/SDT/jenkins-artifacts/ubsan_logs/CMSSW_14_2_X_2024-11-20-2300/

[1 RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc:119:48: runtime error: member call on address 0x7ffc2e1a4fb0 which does not point to an object of type 'TrackingRegion'](https://cmssdt.cern.ch/SDT/jenkins-artifacts/ubsan_logs/CMSSW_14_2_X_2024-11-20-2300/logs/e2/e29e8ea225af97ed47471854089ce942/log)
[1 RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc:149:48: runtime error: member call on address 0x14f6e55f8680 which does not point to an object of type 'TrackingRegion'](https://cmssdt.cern.ch/SDT/jenkins-artifacts/ubsan_logs/CMSSW_14_2_X_2024-11-20-2300/logs/59/59239ac295c69eb51ea906bb27ee3f55/log)
[1 RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc:82:24: runtime error: member call on address 0x14f6e75f7680 which does not point to an object of type 'TrackingRegion'](https://cmssdt.cern.ch/SDT/jenkins-artifacts/ubsan_logs/CMSSW_14_2_X_2024-11-20-2300/logs/a9/a9209aee6ea190192918bd5dde34a8b1/log)
smuzaffar commented 3 days ago

please test

cmsbuild commented 3 days ago

cms-bot internal usage

cmsbuild commented 3 days ago

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46758/42739

cmsbuild commented 3 days ago

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

It involves the following packages:

@jfernan2, @mandrenguyen can you please review it and eventually sign? Thanks. @GiacomoSguazzoni, @VinInn, @VourMa, @dgulhan, @felicepantaleo, @gpetruc, @missirol, @mmusich, @mtosi, @rovere this is something you requested to watch as well. @antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

smuzaffar commented 3 days ago

test parameters:

smuzaffar commented 3 days ago

please test

smuzaffar commented 3 days ago

please test for CMSSW_14_2_UBSAN_X

cmsbuild commented 3 days ago

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d7fe39/43000/summary.html COMMIT: 0ffb4c030bd8f02b23e78cfe4a9f75d73605cabc CMSSW: CMSSW_14_2_UBSAN_X_2024-11-20-2300/el8_amd64_gcc12 User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/46758/43000/install.sh to create a dev area with all the needed externals and cmssw changes.

cmsbuild commented 3 days ago

+1

Size: This PR adds an extra 20KB to repository Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d7fe39/42999/summary.html COMMIT: 0ffb4c030bd8f02b23e78cfe4a9f75d73605cabc CMSSW: CMSSW_14_2_X_2024-11-21-1100/el8_amd64_gcc12 User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/46758/42999/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

smuzaffar commented 3 days ago

ubsan runtime errors are fixed now

jfernan2 commented 3 days ago

+1

cmsbuild commented 3 days ago

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

antoniovilela commented 3 days ago

+1