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

Fix possible race in WaitingTaskHolder if reused #25803

Merged
merged 1 commit into from
Jan 31, 2019

Conversation

Dr15Jones
Copy link
Contributor

If the same WaitingTaskHolder is reused indirectly by the task it was holding, it was possible to cause the task being held to be lost.

If the same WaitingTaskHolder is reused indirectly by the
task it was holding, it was possible to cause the task being
held to be lost.
@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@Dr15Jones
Copy link
Contributor Author

@wddgit here is the fix for the potential problem you spotted.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25803/8238

  • 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/Concurrency

@cmsbuild, @smuzaffar, @Dr15Jones can you please review it and eventually sign? Thanks.
@makortel, @Martin-Grunewald, @wddgit this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@wddgit
Copy link
Contributor

wddgit commented Jan 30, 2019

Looks good. I think that would have avoided the problem even without the locks.

@Dr15Jones
Copy link
Contributor Author

please test

@Dr15Jones
Copy link
Contributor Author

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 30, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/32910/console Started: 2019/01/30 20:50

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs after it passes the integration tests. This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@Dr15Jones
Copy link
Contributor Author

Looks good. I think that would have avoided the problem even without the locks.
The more I think about it, the less I think that is the case. There was no synchronization mechanism happening within the body of doneWaiting and therefore reusuing the WaitingTaskHolder without an explicit syncrhonization mechanism external to doneWaiting is still a race condition (i.e. there is nothing that forces the CPU cache that holds m_task to get updated across the CPUs).

@wddgit
Copy link
Contributor

wddgit commented Jan 30, 2019

After thinking some more, I think you are right. There is no explicit synchronization mechanism.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-25803/32910/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 3097440
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3097242
  • DQMHistoTests: Total skipped: 197
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 31 files compared)
  • Checked 133 log files, 14 edm output root files, 32 DQM output files

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit b1b222c into cms-sw:master Jan 31, 2019
@Dr15Jones Dr15Jones deleted the fixWaitingTaskHolders branch February 4, 2019 17:46
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