-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Unexpected parsing of classes by ROOT 6.24 #40375
Comments
@pcanal FYI |
A new Issue was created by @Dr15Jones Chris Jones. @Dr15Jones, @perrotta, @dpiparo, @rappoccio, @makortel, @smuzaffar can you please review it and eventually sign/assign? Thanks. cms-bot commands are listed here |
assign core |
New categories assigned: core @Dr15Jones,@smuzaffar,@makortel you have been requested to review this Pull request/Issue and eventually sign? Thanks |
I see this for other cases as well, such as One particular one that stands out is the message
where this does have an explicit dictionary
|
Does |
Yes
No, as the type has no state and is not a member of |
For debugging purpose, can you request a dictionary for |
@pcanal adding the Doing < >>> RSS key reco::Track - before 1295.516 MB - after 1299.612 MB - delta 4.096 MB
> >>> RSS key reco::Track - before 1294.924 MB - after 1299.928 MB - delta 5.004 MB
< >>> VSIZE key reco::Track - before 1830.688 MB - after 1830.700 MB - delta 0.012 MB
> >>> VSIZE key reco::Track - before 1830.180 MB - after 1830.192 MB - delta 0.012 MB
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
> We can proceed for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>. We have 1 headers.
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< We can proceed for reco::Track. We have 1 headers.
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< We can proceed for reco::Track. We have 1 headers.
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
> Starting autoparse for reco::Track
> We can proceed for reco::Track. We have 1 headers.
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Trying to autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track>
< Starting autoparse for vector<reco::Track>
< Starting autoparse for reco::Track
< Starting autoparse for edm::refhelper::FindUsingAdvance<vector<reco::Track>,reco::Track> |
I guess one difference is ROOT did not do |
Note that we were working on a similar issue (#33196) last year but did not come to a conclusion. The diff output seems to show 2 things. One is that adding the dictionary for the |
One can find the log files at FNAL |
It is puzzling why it is still doing the autoparse for |
I dug a bit of the history of the explicit |
From the debugging output from ROOT, here are all the classes for which it says it will be running the parser. The vast majority look like they are from member data we marked as transient.
|
What if in this loop any element marked 'transient' would be skipped rather than having to try to load its TClass? |
In that loop we already suspend the autoparsing, so I would suspect it would make no difference. Do you see the autoparsing coming from that path? |
I see the message prefixed by |
I believe I have found a race condition between calling I have the following executable which I build in CMSSW_13_0_ROOT6_X_2022-12-15-2300 which uses ROOT 6.27.1 #include <string>
#include <vector>
#include "TFile.h"
#include "TClass.h"
#include "TInterpreter.h"
#include "tbb/task_group.h"
#include <atomic>
#include <algorithm>
std::vector<std::string> loadClasses() {
std::vector<std::string> ret;
constexpr std::array<const char*,12> types = {{
{"edm::Wrapper<vector<reco::Muon> >"},
{"edm::Wrapper<edm::ValueMap<float> >"},
{"edm::Wrapper<edm::ValueMap<int> >"},
{"edm::Wrapper<edm::ValueMap<reco::JetID> >"},
{"edm::Wrapper<vector<L1GctFibreWord> >"},
{"edm::Wrapper<vector<L1GctInternEmCand> >"},
{"edm::Wrapper<vector<L1GctInternHFData> >"},
{"edm::Wrapper<vector<L1GctJetCounts> >"},
{"edm::Wrapper<vector<L1TriggerError> >"},
{"edm::Wrapper<edm::ValueMap<edm::Ptr<reco::PFCandidate> > >"},
{"edm::Wrapper<vector<pat::Tau> >"},
{"edm::Wrapper<vector<reco::PFV0> >"}}};
ret.reserve(types.size());
std::copy(types.begin(), types.end(), std::back_inserter(ret));
return ret;
}
int main() {
gInterpreter->SetClassAutoloading(1);
std::atomic<int> waiting(2);
tbb::task_group group;
std::unique_ptr<TFile> f;
group.run([&]() {
if( --waiting != 0) {
do {
} while(waiting.load() !=0);
}
f = std::unique_ptr<TFile>(TFile::Open("step2.root"));
});
group.run([&]() {
auto classes = loadClasses();
if( --waiting != 0) {
do {
} while(waiting.load() !=0);
}
for(auto const& c: classes) {
TClass::GetClass(c.c_str());
}
});
group.wait();
}
Which when run in GDB reports the following
and the assert with the traceback
If I modify the program to just call |
That does indicates the loop is working as expected, but it should not imply auto-parsing triggered for those classes through that code path. |
That looks indeed bad. Let me try to reproduce it. |
On another run in gdb I get a segmentation fault in the TFile::Open path while the TClass:GetClass path is running
|
So adding
to the program seems to have resolved the crashes. |
Right. I missed it but the minimal example above is missing:
|
When turning on
gDebug = 2
and INFO messages, I see the followingand
In both cases, we have explicit directives to generate the dictionaries
cmssw/TrackingTools/PatternTools/src/classes_def.xml
Line 2 in 6d2f660
cmssw/DataFormats/TrackReco/src/classes_def.xml
Line 338 in 6d2f660
The text was updated successfully, but these errors were encountered: