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

Do not call TTree cache after an exception happens #12658

Merged

Conversation

Dr15Jones
Copy link
Contributor

Since TTree is not exception safe, we must avoid calling TTree methods after we have had an exception thrown through TTree. Normally this happens when one thread throws an exception while another thread is waiting to access the same TTree.
This should avoid crashes seen in the Tier 0.

Since TTree is not exception safe, we must avoid calling TTree methods after we have had an exception thrown through TTree. Normally this happens when one thread throws an exception while another thread is waiting to access the same TTree.
This should avoid crashes seen in the Tier 0.
@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 3, 2015

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

It involves the following packages:

IOPool/Input

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

Following commands in first line of a comment are recognized

  • +1|approve[d]|sign[ed]: L1/L2's to approve it
  • -1|reject[ed]: L1/L2's to reject it
  • assign <category>[,<category>[,...]]: L1/L2's to request signatures from other categories
  • unassign <category>[,<category>[,...]]: L1/L2's to remove signatures from other categories
  • hold: L1/all L2's/release manager to mark it as on hold
  • unhold: L1/user who put this PR on hold
  • merge: L1/release managers to merge this request
  • [@cmsbuild,] please test: L1/L2 and selected users to start jenkins tests
  • [@cmsbuild,] please test with cms-sw/cmsdist#<PR>: L1/L2 and selected users to start jenkins tests using externals from cmsdist

@Dr15Jones
Copy link
Contributor Author

please test

@Dr15Jones
Copy link
Contributor Author

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 3, 2015

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/10121/console

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 3, 2015

This pull request is fully signed and it will be integrated in one of the next CMSSW_8_0_X IBs after it passes the integration tests. This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @Degano, @smuzaffar

//If a fatal exception happens we need to make a copy so we can
// rethrow that exception on other threads. This avoids TTree
// non-exception safety problems on later calls to TTree.
mutable std::unique_ptr<Exception> lastException_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this marked as mutable? Is assignment to std::unique_ptr atomic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All calls to RootDelayedReader are already serialized by the framework.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh. I guess that'll do for now then.

@bbockelm
Copy link
Contributor

bbockelm commented Dec 3, 2015

This covers when we are pulling products from the file.

Are there any concerns about interacting with trees at startup? I'd guess not, as file opens should be in a single-threaded context.

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 3, 2015

-1
Tested at: e49f2e5
I found an error when building:

>> Compiling edm plugin /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_8_0_X_2015-12-02-2300/src/RecoJets/JetProducers/plugins/JetIDProducer.cc 
>> Compiling edm plugin /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_8_0_X_2015-12-02-2300/src/RecoJets/JetProducers/plugins/MVAJetPuIdProducer.cc 
>> Compiling edm plugin /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_8_0_X_2015-12-02-2300/src/RecoJets/JetProducers/plugins/NjettinessAdder.cc 
>> Compiling edm plugin /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_8_0_X_2015-12-02-2300/src/RecoJets/JetProducers/plugins/PUFilter.cc 
/tmp/cmsbuild/workspace/ib-any-integration/CMSSW_8_0_X_2015-12-02-2300/src/RecoJets/JetProducers/plugins/NjettinessAdder.cc: In constructor 'NjettinessAdder::NjettinessAdder(const edm::ParameterSet&)':
/tmp/cmsbuild/workspace/ib-any-integration/CMSSW_8_0_X_2015-12-02-2300/src/RecoJets/JetProducers/plugins/NjettinessAdder.cc:30:3: error: 'OriginalGeometricMeasure' is not a member of 'fastjet::contrib'
   fastjet::contrib::OriginalGeometricMeasure   geometricMeasure         (beta_);// changed in 1.020
   ^
/tmp/cmsbuild/workspace/ib-any-integration/CMSSW_8_0_X_2015-12-02-2300/src/RecoJets/JetProducers/plugins/NjettinessAdder.cc:38:52: error: 'geometricMeasure' was not declared in this scope
   case OriginalGeometricMeasure    : measureDef = &geometricMeasure; break;// changed in 1.020
                                                    ^


you can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-12658/10121/summary.html

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:
77c6e15
0360c4e
4562f64
12db05f
063e673
9291ec1
190fe90
eeb9bff
1343e49
11b7bb8
3047bbb
3c78246
7a4f6ec
f0b8ebb
270e59e
2736c02
2c57e35
399188d
bdce0d1
fb7aea0
ee37e87
05d2fb3
29041da
c3a6f0c
You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-12658/10121/git-log-recent-commits
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-12658/10121/git-merge-result

@Dr15Jones
Copy link
Contributor Author

The test failure has nothing to do with this pull request and is from the broken IB.

davidlange6 added a commit that referenced this pull request Dec 4, 2015
…tion

Do not call TTree cache after an exception happens
@davidlange6 davidlange6 merged commit f7e139a into cms-sw:CMSSW_8_0_X Dec 4, 2015
@Dr15Jones Dr15Jones deleted the protectTTreeAccessAfterException branch December 8, 2015 19: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