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

Seg fault when running lcio2edm4hep? #78

Closed
alexandertuna opened this issue Jul 2, 2024 · 4 comments · Fixed by #79
Closed

Seg fault when running lcio2edm4hep? #78

alexandertuna opened this issue Jul 2, 2024 · 4 comments · Fixed by #79

Comments

@alexandertuna
Copy link

Hi developers, @headunderheels and I are playing with the lcio2edm4hep executable and a few lcio files. One of our lcio files causes lcio2edm4hep to have a segmentation violation. I have hypotheses about what is happening, but I think you would figure it out much faster in case you have a moment.

To reproduce (< 1 min):

# File size: 20 MB
# `check_missing_cols` is from LCIO
wget http://osdf-public.tempest.uchicago.edu:1094/ospool/uc-shared/public/futurecolliders/tuna/data/photonGun_E_0_50_reco_10400.slcio
check_missing_cols photonGun_E_0_50_reco_10400.slcio --minimal > patch.txt
lcio2edm4hep photonGun_E_0_50_reco_10400.slcio tmp patch.txt

Log file: log.lcio2edm4hep.2024_07_01_19h00m00s.txt

Thanks for any help! And thanks for writing this nice software.
Alex


  • OS version: 22.04.2 LTS (Jammy Jellyfish)
  • Compiler version: idk
  • Package version: idk
  • Reproduced by: see above
  • Input: see above
  • Output: see above
  • Goal: see above
@tmadlener
Copy link
Contributor

Thanks for report and the nice reproducer. I can reproduce this on my end, and I am fairly certain that the "issue" in this case is that one of the events does not have any SimCalorimeterHits. In that case we seem to not create a CaloHitContribution collection. Hence, podio crashes (or throws an exception with a bit more information on newer versions) because it requires all events to have the same contents (collection wise). We had a similar issue already in key4hep/k4FWCore#156, but apparently we didn't properly back port that. I will prepare a fix later today.

Just for completeness (and for my curiosity), where did you get the software from? (i.e. a key4hep nightlies / release stack or a MuColl container, or somewhere else)

The event in question is most likely this one:

VENT: 10454
RUN: 0
DETECTOR: MuColl_10TeV_v0A
COLLECTIONS: (see below)
///////////////////////////////////

---------------------------------------------------------------------------
COLLECTION NAME               COLLECTION TYPE          NUMBER OF ELEMENTS  
===========================================================================
AllTracks                     Track                            0
ECalBarrelCollection          SimCalorimeterHit                0
ECalEndcapCollection          SimCalorimeterHit                0
HCalBarrelCollection          SimCalorimeterHit                0
HCalEndcapCollection          SimCalorimeterHit                0
IBTrackerHits                 TrackerHitPlane                  6
IBTrackerHitsRelations        LCRelation                       6
IETrackerHits                 TrackerHitPlane                  0
IETrackerHitsRelations        LCRelation                       0
InnerTrackerBarrelCollection  SimTrackerHit                   19
InnerTrackerEndcapCollection  SimTrackerHit                    0
JetOut                        ReconstructedParticle            0
MCParticle                    MCParticle                     175
MCParticle_SiTracks           LCRelation                       0
MCParticle_SiTracks_Refitted  LCRelation                       0
MUON                          CalorimeterHit                   0
OBTrackerHits                 TrackerHitPlane                  0
OBTrackerHitsRelations        LCRelation                       0
OETrackerHits                 TrackerHitPlane                  0
OETrackerHitsRelations        LCRelation                       0
OuterTrackerBarrelCollection  SimTrackerHit                    0
OuterTrackerEndcapCollection  SimTrackerHit                    0
PandoraClusters               Cluster                          0
PandoraPFOs                   ReconstructedParticle            0
PandoraStartVertices          Vertex                           0
RelationMuonHit               LCRelation                       0
SeedTracks                    Track                            0
SiTracks                      Track                            0
SiTracks_Refitted             Track                            0
VBTrackerHits                 TrackerHitPlane                  0
VBTrackerHitsRelations        LCRelation                       0
VETrackerHits                 TrackerHitPlane                  0
VETrackerHitsRelations        LCRelation                       0
VertexBarrelCollection        SimTrackerHit                    0
VertexEndcapCollection        SimTrackerHit                    0
YokeBarrelCollection          SimCalorimeterHit                0
YokeEndcapCollection          SimCalorimeterHit                0
---------------------------------------------------------------------------

@tmadlener
Copy link
Contributor

If you have created #79, which fixes the issue for me and I can successfully convert the whole event.

@alexandertuna
Copy link
Author

alexandertuna commented Jul 2, 2024

Thanks very much @tmadlener !

the "issue" in this case is that one of the events does not have any SimCalorimeterHits

That makes sense to us! We were suspicious of this event, too. Thanks for tracking it down in the code.

where did you get the software from? (i.e. a key4hep nightlies / release stack or a MuColl container, or somewhere else)

This is from a mucol container, yep. I'm not sure how to check software versions within this container. Do you have a suggestion for that? I noticed lcio2edm4hep and k4run don't have --version arguments.

If you have created #79, which fixes the issue for me and I can successfully convert the whole event.

Awesome!! Sounds great to me.

@tmadlener
Copy link
Contributor

Thanks for the clarifications. Not a lot of our (aka Key4hep) stuff currently has a --version flag. podio-dump --version should give you a hint. But with the link to dockerhub I basically know enough already :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants