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][LST]Fix runtime error by keep the region object alive #46758

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

smuzaffar
Copy link
Contributor

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)
src/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc:119:48: runtime error: member call on address 0x7ffc2e1a4fb0 which does not point to an object of type 'TrackingRegion'
0x7ffc2e1a4fb0: note: object has invalid vptr
 03 00 00 00  40 4c dc 9c f7 14 00 00  80 4c dc 9c f7 14 00 00  80 4c dc 9c f7 14 00 00  00 00 00 00
    #0 0x14f684bf3e4d in SeedFromConsecutiveHitsCreator::initialKinematic(GlobalTrajectoryParameters&, SeedingHitSet const&) const src/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc:119
    #1 0x14f684c10535 in SeedFromConsecutiveHitsCreator::makeSeed(std::vector<TrajectorySeed, std::allocator<TrajectorySeed> >&, SeedingHitSet const&) src/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc:74
    #2 0x14f683fbf896 in LSTOutputConverter::produce(edm::Event&, edm::EventSetup const&) src/RecoTracker/LST/plugins/LSTOutputConverter.cc:199
    #3 0x14f7d58db29f in edm::stream::EDProducerAdaptorBase::doEvent(edm::EventTransitionInfo const&, edm::ActivityRegistry*, edm::ModuleCallingContext const*) src/FWCore/Framework/src/stream/EDProducerAdaptorBase.cc:83

@smuzaffar
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 21, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

  • RecoTracker/LST (reconstruction)

@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
Copy link
Contributor Author

test parameters:

  • workflow = 24834.703

@smuzaffar
Copy link
Contributor Author

please test

@smuzaffar
Copy link
Contributor Author

please test for CMSSW_14_2_UBSAN_X

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d7fe39/43000/summary.html
COMMIT: 0ffb4c0
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
Copy link
Contributor

+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: 0ffb4c0
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
Copy link
Contributor Author

ubsan runtime errors are fixed now

@jfernan2
Copy link
Contributor

+1

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

@antoniovilela
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 6ac9132 into cms-sw:master Nov 22, 2024
18 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.

4 participants