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

Avoid race condition in PluginFactoryBase #35388

Merged
merged 1 commit into from
Sep 24, 2021

Conversation

Dr15Jones
Copy link
Contributor

PR description:

Use atomic form of entry into the tbb::concurrent_unordered_map to avoid getting an empty entry.
This was pointed to by the UBSAN test showing where a reference was using a nullptr address.

PR validation:

Code compiles. All framework unit tests pass.

Use atomic form of entry into the tbb::concurrent_unordered_map to avoid getting an empty entry.
@Dr15Jones
Copy link
Contributor Author

From https://cmssdt.cern.ch/SDT/cgi-bin/buildlogs/raw/slc7_amd64_gcc10/CMSSW_12_1_UBSAN_X_2021-09-22-1600/pyRelValMatrixLogs/run/11640.0_MinBias_14TeV+2021+MinBias_14TeV_pythia8_TuneCP5_GenSimINPUT+Digi+Reco+HARVEST+ALCA/step3_MinBias_14TeV+2021+MinBias_14TeV_pythia8_TuneCP5_GenSimINPUT+Digi+Reco+HARVEST+ALCA.log

/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/tbb/v2021.3.0-d08d4722ccbb5e1470ca0b76226c3cf7/include/oneapi/tbb/detail/_segment_table.h:524:23: runtime error: reference binding to null pointer of type 'struct value_type'
/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/tbb/v2021.3.0-d08d4722ccbb5e1470ca0b76226c3cf7/include/oneapi/tbb/concurrent_vector.h:728:97: runtime error: reference binding to null pointer of type 'struct value_type'
/data/cmsbld/jenkins/workspace/build-any-ib/w/slc7_amd64_gcc10/external/tbb/v2021.3.0-d08d4722ccbb5e1470ca0b76226c3cf7/include/oneapi/tbb/concurrent_vector.h:723:70: runtime error: reference binding to null pointer of type 'const struct value_type'
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/8a9f7cd15d83de9af8b390bae4e6d7d1/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_1_UBSAN_X_2021-09-22-1600/src/FWCore/PluginManager/src/PluginFactoryBase.cc:84:49: runtime error: reference binding to null pointer of type 'const struct PluginMakerInfo'
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/8a9f7cd15d83de9af8b390bae4e6d7d1/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_1_UBSAN_X_2021-09-22-1600/src/FWCore/PluginManager/src/PluginFactoryBase.cc:85:30: runtime error: member access within null pointer of type 'const struct PluginMakerInfo'
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/8a9f7cd15d83de9af8b390bae4e6d7d1/opt/cmssw/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_1_UBSAN_X_2021-09-22-1600/src/FWCore/PluginManager/src/PluginFactoryBase.cc:85:20: runtime error: member access within null pointer of type 'const struct PluginMakerInfo'

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35388/25485

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @Dr15Jones (Chris Jones) for master.

It involves the following packages:

  • FWCore/PluginManager (core)

@makortel, @smuzaffar, @cmsbuild, @Dr15Jones can you please review it and eventually sign? Thanks.
@makortel, @wddgit this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-1494bb/18870/summary.html
COMMIT: d616869
CMSSW: CMSSW_12_1_X_2021-09-23-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35388/18870/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-1494bb/18870/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-1494bb/18870/git-merge-result

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 40
  • DQMHistoTests: Total histograms compared: 3211080
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3211052
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 39 files compared)
  • Checked 169 log files, 37 edm output root files, 40 DQM output files
  • TriggerResults: no differences found

@makortel
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. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@qliphy
Copy link
Contributor

qliphy commented Sep 24, 2021

+1

@cmsbuild cmsbuild merged commit 98ead96 into cms-sw:master Sep 24, 2021
@Dr15Jones Dr15Jones deleted the raceconditionPlugin branch September 28, 2021 19:48
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