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][Align]Runtime error where there is no globalDerivativesCalibration #46726

Open
smuzaffar opened this issue Nov 18, 2024 · 8 comments
Open

Comments

@smuzaffar
Copy link
Contributor

For UBSAN IBs, we see runtime errors like [a]. This happens when we call https://github.com/cms-sw/cmssw/blob/master/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc#L793 with empty theIntBuffer, theFloatBufferX, theFloatBufferY. Error goes away if we set ignoreHitsWithoutGlobalDerivatives to true.

@cms-sw/alca-l2 , can you please look in to this?

[a] https://cmssdt.cern.ch/SDT/cgi-bin/logreader/el8_amd64_gcc12/CMSSW_14_2_UBSAN_X_2024-11-15-2300/pyRelValMatrixLogs/run/1001.0_RunMinBias2011A/step3_RunMinBias2011A.log#/100-100

/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/include/c++/12.3.1/bits/stl_vector.h:1124:34: runtime error: reference binding to null pointer of type 'value_type'

    #0 0x148ef8da42ec in std::vector<float, std::allocator<float> >::operator[](unsigned long) /data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/include/c++/12.3.1/bits/stl_vector.h:1124
    #1 0x148ef8da42ec in MillePedeAlignmentAlgorithm::callMille2D(ReferenceCountingPointer<ReferenceTrajectoryBase> const&, unsigned int, std::vector<int, std::allocator<int> > const&, std::vector<float, std::allocator<float> > const&, std::vector<float, std::allocator<float> > const&) src/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc:1466
    #2 0x148ef8da7e75 in MillePedeAlignmentAlgorithm::callMille(ReferenceCountingPointer<ReferenceTrajectoryBase> const&, unsigned int, std::vector<int, std::allocator<int> > const&, std::vector<float, std::allocator<float> > const&, std::vector<float, std::allocator<float> > const&) src/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc:1366
    #3 0x148ef8db3142 in MillePedeAlignmentAlgorithm::addMeasurementData(edm::EventSetup const&, AlignmentAlgorithmBase::EventInfo const&, ReferenceCountingPointer<ReferenceTrajectoryBase> const&, unsigned int, AlignmentParameters*&) src/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc:793
    #4 0x148ef8dcfc4a in MillePedeAlignmentAlgorithm::addReferenceTrajectory(edm::EventSetup const&, AlignmentAlgorithmBase::EventInfo const&, ReferenceCountingPointer<ReferenceTrajectoryBase> const&) src/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc:574

@smuzaffar
Copy link
Contributor Author

assign alca

@cmsbuild
Copy link
Contributor

New categories assigned: alca

@atpathak,@consuegs,@perrotta you have been requested to review this Pull request/Issue and eventually sign? Thanks

@cmsbuild
Copy link
Contributor

cms-bot internal usage

@cmsbuild
Copy link
Contributor

A new Issue was created by @smuzaffar.

@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@smuzaffar
Copy link
Contributor Author

Note the runtime error occurs when we try to get the address of first element of zero size vector float *newGlobDerivsX = &(newGlobDerivs[0]);

@perrotta
Copy link
Contributor

@mmusich (since you were the last one who interacted with that MillePedeAlignmentAlgorithm.cc file in github): is there any reason not to set ignoreHitsWithoutGlobalDerivatives as true by default?
As correctly written at L1393 "&(localDerivatives[0]) etc. are valid - as long as vector is not empty" and it is wrong trying to enter those methods if theFloatBufferX.empty() at L788

@mmusich
Copy link
Contributor

mmusich commented Nov 19, 2024

(since you were the last one who interacted with that MillePedeAlignmentAlgorithm.cc file in github)

@perrotta please refer to Tracker DPG.

@perrotta
Copy link
Contributor

@cms-sw/trk-dpg-l2 (repeating what above): is there any reason not to set ignoreHitsWithoutGlobalDerivatives as true by default?
As correctly written at L1393 "&(localDerivatives[0]) etc. are valid - as long as vector is not empty" and it is wrong trying to enter those methods if theFloatBufferX.empty() at L788

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants