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

TClass::GetListOfDataMembers returns an empty list even-though the information is available. #6666

Closed
1 task done
pcanal opened this issue Oct 19, 2020 · 1 comment · Fixed by #6668 or #6669
Closed
1 task done

Comments

@pcanal
Copy link
Member

pcanal commented Oct 19, 2020

  • Checked for duplicates

Describe the bug

As reported at cms-sw/cmsdist#6314 (comment)
we now are getting error:

An exception of category 'FatalRootError' occurred while
   [0] Constructing the EventProcessor
   [1] Constructing module: class=L2MuonProducer label='hltL2Muons'
   Additional Info:
      [a] Fatal Root Error: @SUB=TProtoClass::FindDataMember
data member with index 0 is not found in class tbb::internal::atomic_impl<unsigned long>

due to some inconsistencies.

Expected behavior

No error.

To Reproduce

scram p CMSSW_11_2_ROOT622_X_2020-10-15-1100
cd CMSSW_11_2_ROOT622_X_2020-10-15-1100/
cmsenv
runTheMatrix.py -l 11634.0
cd 11634.0_*
gdb --args cmsRun step2_DIGI_L1_DIGI2RAW_HLT.py

Setup

"the changes we are testing are d6156de...e4cd9d3 "

Additional context

@pcanal pcanal added the bug label Oct 19, 2020
@pcanal
Copy link
Member Author

pcanal commented Oct 19, 2020

This is due to the introduction (in commit f3f0f13) of a fast path in TClass::GetListOfDataMember which did not take in consideration the case:

c = GetClass(someclassname)
c->GetState() == TClass::kForwardDeclared
c->GetListOfDataMember() -> list is now created but empty.
load and parse header file for `someclass`
c->GetState() == TClass::kInterpreted
c->GetListOfDataMember() -> list is still empty but should have been filled (loaded at this point).

The logic assumed incorrectly that if someclassname was indeed pointing to a class or struct and the list was created then it was loaded.

@pcanal pcanal self-assigned this Oct 19, 2020
@pcanal pcanal modified the milestones: 6.24/00, 6.22/04 Oct 19, 2020
pcanal added a commit to pcanal/root that referenced this issue Oct 22, 2020
The problem was due  the introduction (in commit f3f0f13) of a fast path in TClass::GetListOfDataMember which did not take in consideration the case:

c = GetClass(someclassname)
c->GetState() == TClass::kForwardDeclared
c->GetListOfDataMember() -> list is now created but empty.
load and parse header file for
c->GetState() == TClass::kInterpreted
c->GetListOfDataMember() -> list is still empty but should have been filled (loaded at this point).

The logic assumed incorrectly that if someclassname was indeed pointing to a class or struct and the list was created then it was loaded.

To keep the fast path and correct the logic, we need to 'promote' TListOfDataMembers::fIsLoaded to be an std::atomic

Fixes Issue root-project#6666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment