Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-31612

SourceCatalog.readFits segfaults when reading `AFW_TYPE="simple"`

    XMLWordPrintable

    Details

    • Type: Story
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: afw
    • Urgent?:
      No

      Description

      Trying to read a `SimpleCatalog` (with the AFW_TYPE header key set), with `SourceCatalog.readFits` results in a segfault. We should at least check that the AFW_TYPE key matches the reading class and error out early.

      A possible, though not necessary, feature would be if a user calls `SimpleCatalog.readFits` on a `SourceCatalog`, we could allow that to work, since I believe SimpleCatalog is a strict subset of SourceCatalog (though I'm not positive).

      An example from lsst_devl:

      In [1]: import lsst.afw.table
      lsst
      In [2]: lsst.afw.table.SourceCatalog.readFits('/home/parejkoj/lsst/testdata_jointcal/hsc/ref_cats/gaia_dr2_20200414/197122.fits')
      *** Error in `/software/lsstsw/stack_20210813/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe/bin/python': corrupted size vs. prev_size: 0x000055a19da41730 ***
      ======= Backtrace: =========
      /lib64/libc.so.6(+0x7f474)[0x7fa521e93474]
      /lib64/libc.so.6(+0x8156b)[0x7fa521e9556b]
      /software/lsstsw/stack_20210813/stack/miniconda3-py38_4.9.2-0.7.0/Linux64/afw/22.0.1-24-g2e899d296+4206820b0d/lib/libafw.so(_ZNSt23_Sp_counted_ptr_inplaceIN4lsst3afw5table6detail10SchemaImplESaIS4_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv+0x12a)[0x7fa44a1ab16a]
      /software/lsstsw/stack_20210813/stack/miniconda3-py38_4.9.2-0.7.0/Linux64/afw/22.0.1-24-g2e899d296+4206820b0d/lib/libafw.so(_ZN4lsst3afw5table6SchemaD1Ev+0xb8)[0x7fa44a1a9f08]
      /software/lsstsw/stack_20210813/stack/miniconda3-py38_4.9.2-0.7.0/Linux64/afw/22.0.1-24-g2e899d296+4206820b0d/lib/libafw.so(_ZNSt23_Sp_counted_ptr_inplaceIN4lsst3afw5table2io21FitsSchemaInputMapper4ImplESaIS5_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv+0xb48)[0x7fa44a229c88]
      /software/lsstsw/stack_20210813/stack/miniconda3-py38_4.9.2-0.7.0/Linux64/afw/22.0.1-24-g2e899d296+4206820b0d/lib/libafw.so(_ZN4lsst3afw5table2io21FitsSchemaInputMapperD1Ev+0x50)[0x7fa44a228580]
      /software/lsstsw/stack_20210813/stack/miniconda3-py38_4.9.2-0.7.0/Linux64/afw/22.0.1-24-g2e899d296+4206820b0d/python/lsst/afw/table/_table.so(+0x232661)[0x7fa44a68b661]
      /software/lsstsw/stack_20210813/stack/miniconda3-py38_4.9.2-0.7.0/Linux64/afw/22.0.1-24-g2e899d296+4206820b0d/python/lsst/afw/table/_table.so(+0x232a12)[0x7fa44a68ba12]
      /software/lsstsw/stack_20210813/stack/miniconda3-py38_4.9.2-0.7.0/Linux64/afw/22.0.1-24-g2e899d296+4206820b0d/python/lsst/afw/table/_table.so(+0x23b922)[0x7fa44a694922]
      /software/lsstsw/stack_20210813/stack/miniconda3-py38_4.9.2-0.7.0/Linux64/afw/22.0.1-24-g2e899d296+4206820b0d/python/lsst/afw/table/_table.so(+0x7c456)[0x7fa44a4d5456]
      

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            Parejkoj John Parejko
            Watchers:
            Ian Sullivan, Jim Bosch, John Parejko, Nate Lust
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Jenkins

                No builds found.