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

meas_base testMonteCarlo randomly triggers recursion on Python 3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw, meas_base
    • Labels:
      None
    • Team:
      Data Release Production

      Description

      Running the tests on meas_base in my Python 3 stack, I sometimes get a failure in testSdssCentroid.testMonteCarlo:

      $ python tests/testSdssCentroid.py 
      testEdge (__main__.SdssCentroidTestCase) ... measurement: Measuring 1 sources (1 parents, 0 children) 
      ok
      testMonteCarlo (__main__.SdssCentroidTestCase)
      Test that we get exactly the right answer on an ideal sim with no noise, and that ... /Users/timj/work/lsstsw3/stack/DarwinX86/utils/12.0-9-gf85c792/python/lsst/utils/tests.py:667: DeprecationWarning: assertClose is deprecated; please use TestCase.assertFloatsAlmostEqual
        DeprecationWarning)
      Exception ignored in: <bound method Schema.<lambda> of Schema(
          (Field['L'](name="id", doc="unique ID"), Key<L>(offset=0, nElements=1)),
          (Field['Angle'](name="coord_ra", doc="position in ra/dec"), Key<Angle>(offset=8, nElements=1)),
          (Field['Angle'](name="coord_dec", doc="position in ra/dec"), Key<Angle>(offset=16, nElements=1)),
          (Field['L'](name="parent", doc="unique ID of parent source"), Key<L>(offset=24, nElements=1)),
          (Field['I'](name="deblend_nChild"), Key<I>(offset=32, nElements=1)),
          (Field['D'](name="truth_flux", doc="true flux", units="count"), Key<D>(offset=40, nElements=1)),
          (Field['D'](name="truth_x", doc="true simulated centroid", units="pixel"), Key<D>(offset=48, nElements=1)),
          (Field['D'](name="truth_y", doc="true simulated centroid", units="pixel"), Key<D>(offset=56, nElements=1)),
          (Field['Flag'](name="truth_flag", doc="set if the object is a star"), Key['Flag'](offset=64, bit=0)),
          (Field['D'](name="truth_xx", doc="true shape after PSF convolution", units="pixel^2"), Key<D>(offset=72, nElements=1)),
          (Field['D'](name="truth_yy", doc="true shape after PSF convolution", units="pixel^2"), Key<D>(offset=80, nElements=1)),
          (Field['D'](name="truth_xy", doc="true shape after PSF convolution", units="pixel^2"), Key<D>(offset=88, nElements=1)),
          (Field['Flag'](name="truth_isStar", doc="set if the object is a star"), Key['Flag'](offset=64, bit=1)),
          (Field['D'](name="base_SdssCentroid_x", doc="centroid from Sdss Centroid algorithm", units="pixel"), Key<D>(offset=96, nElements=1)),
          (Field['D'](name="base_SdssCentroid_y", doc="centroid from Sdss Centroid algorithm", units="pixel"), Key<D>(offset=104, nElements=1)),
          (Field['F'](name="base_SdssCentroid_xSigma", doc="1-sigma uncertainty on x position", units="pixel"), Key<F>(offset=112, nElements=1)),
          (Field['F'](name="base_SdssCentroid_ySigma", doc="1-sigma uncertainty on y position", units="pixel"), Key<F>(offset=116, nElements=1)),
          (Field['Flag'](name="base_SdssCentroid_flag", doc="general failure flag, set if anything went wrong"), Key['Flag'](offset=64, bit=2)),
          (Field['Flag'](name="base_SdssCentroid_flag_edge", doc="Object too close to edge"), Key['Flag'](offset=64, bit=3)),
          (Field['Flag'](name="base_SdssCentroid_flag_noSecondDerivative", doc="Vanishing second derivative"), Key['Flag'](offset=64, bit=4)),
          (Field['Flag'](name="base_SdssCentroid_flag_almostNoSecondDerivative", doc="Almost vanishing second derivative"), Key['Flag'](offset=64, bit=5)),
          (Field['Flag'](name="base_SdssCentroid_flag_notAtMaximum", doc="Object is not at a maximum"), Key['Flag'](offset=64, bit=6)),
          (Field['Flag'](name="base_SdssCentroid_flag_resetToPeak", doc="set if CentroidChecker reset the centroid"), Key['Flag'](offset=64, bit=7)),
          'base_SdssCentroid_flag_badInitialCentroid'->'truth_flag'
          'slot_Centroid'->'truth'
          'slot_Shape'->'truth'
      )
      >
      RecursionError: maximum recursion depth exceeded while calling a Python object
      Fatal Python error: Cannot recover from stack overflow.
       
      Current thread 0x00007fff76534000 (most recent call first):
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 10797 in getTable
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11035 in __getattribute__
        File "/Users/timj/work/lsstsw3/stack/DarwinX86/afw/12.0-21-g32ef022+3/python/lsst/afw/table/tableLib.py", line 11043 in __getattribute__
        ...
      Abort trap: 6
      

      and sometimes it works:

      $ python tests/testSdssCentroid.py 
      testEdge (__main__.SdssCentroidTestCase) ... measurement: Measuring 1 sources (1 parents, 0 children) 
      ok
      testMonteCarlo (__main__.SdssCentroidTestCase)
      Test that we get exactly the right answer on an ideal sim with no noise, and that ... /Users/timj/work/lsstsw3/stack/DarwinX86/utils/12.0-9-gf85c792/python/lsst/utils/tests.py:667: DeprecationWarning: assertClose is deprecated; please use TestCase.assertFloatsAlmostEqual
        DeprecationWarning)
      ok
      testNo2ndDerivative (__main__.SdssCentroidTestCase) ... measurement: Measuring 1 sources (1 parents, 0 children) 
      ok
      testNotAtMaximum (__main__.SdssCentroidTestCase) ... measurement: Measuring 1 sources (1 parents, 0 children) 
      ok
      testSingleFramePlugin (__main__.SdssCentroidTestCase)
      Test that we can call the algorithm through the SFM plugin interface. ... measurement: Measuring 1 sources (1 parents, 0 children) 
      ok
      testRegistration (__main__.SdssCentroidTransformTestCase) ... ok
      testTransform (__main__.SdssCentroidTransformTestCase) ... ok
      testFileDescriptorLeaks (__main__.TestMemory) ... ok
      testLeaks (__main__.TestMemory)
      !Check for memory leaks in the preceding tests ... ok
       
      ----------------------------------------------------------------------
      Ran 9 tests in 5.397s
       
      OK
      

      Jim Bosch seems to think it's triggered by an instability in the random seed.

      The segv happens at:

      28  _tableLib.so                  	0x000000010799eb1d SWIG_Python_GetSwigThis(_object*) + 221 (tableLib_wrap.cc:2316)
      29  _tableLib.so                  	0x000000010799e782 SWIG_Python_ConvertPtrAndOwn(_object*, void**, swig_type_info*, int, int*) + 98 (tableLib_wrap.cc:2366)
      30  _tableLib.so                  	0x0000000107929598 _wrap__SourceCatalogBase_getTable(_object*, _object*) + 88 (tableLib_wrap.cc:120031)
      

      The lines reported in the recursion trap are relating to attributes in tableLib.py

        11029     def __getattribute__(self, name):
        11030     # Catalog forwards unknown method calls to its table and column view
        11031     # for convenience.  (Feature requested by RHL; complaints about magic
        11032     # should be directed to him.)
        11033     # We have to use __getattribute__ because SWIG overrides __getattr__.
        11034         try:
        11035             return object.__getattribute__(self, name)
        11036         except AttributeError:
        11037     # self._columns is created the when self.columns is accessed -
        11038     # looking for it in self.columns below would trigger infinite
        11039     # recursion.
        11040             if name == "_columns":
        11041                 raise
        11042         try:
        11043             return getattr(self.table, name)
        11044         except AttributeError:
        11045             return getattr(self.columns, name)
        11046     table = property(getTable)
        11047     schema = property(getSchema)
      

      Trapping for "this" in addition to "_columns" on line 11040 fixes the problem but there is concern that we do not really understand the condition that is leading to this.

        Attachments

          Issue Links

            Activity

            Hide
            tjenness Tim Jenness added a comment -

            Setting the seed with numpy.random.seed(500) does not affect the behavior. Sometimes it works. I'm hoping this is a bad afw build on my system.

            Show
            tjenness Tim Jenness added a comment - Setting the seed with numpy.random.seed(500) does not affect the behavior. Sometimes it works. I'm hoping this is a bad afw build on my system.
            Hide
            nlust Nate Lust added a comment -

            This is not a bad build on your system. I am seemingly able to reproduce the same (or very similar) behavior in meas_algorithms (on the py 3 porting branch tickets/DM-7289) by running testMeasureApCorr.py . Note to run this you will probably need to set up the py 3 ticket branch of esutils as well (DM-7294).

            Show
            nlust Nate Lust added a comment - This is not a bad build on your system. I am seemingly able to reproduce the same (or very similar) behavior in meas_algorithms (on the py 3 porting branch tickets/ DM-7289 ) by running testMeasureApCorr.py . Note to run this you will probably need to set up the py 3 ticket branch of esutils as well ( DM-7294 ).
            Hide
            tjenness Tim Jenness added a comment -

            The feeling is that SWIG is requesting the "this" attribute and expecting an AttributeError to let it know that an internal SWIG object has not yet been stored.

            Show
            tjenness Tim Jenness added a comment - The feeling is that SWIG is requesting the "this" attribute and expecting an AttributeError to let it know that an internal SWIG object has not yet been stored.
            Hide
            rowen Russell Owen added a comment -

            For the record: I see the if name == "_columns": raise sequence in the Python 2 version of tableLib.py, and if I put in a test for name == "this" I get lots of hits. So I think the bug exists in Python 2 as well.

            Show
            rowen Russell Owen added a comment - For the record: I see the if name == "_columns": raise sequence in the Python 2 version of tableLib.py, and if I put in a test for name == "this" I get lots of hits. So I think the bug exists in Python 2 as well.
            Hide
            nlust Nate Lust added a comment -

            There is a solution for this problem in master now. This seems to be related to swig, and should not be necessary once the pybind11 merge is done. Verification that no further bug exists will happen during the pybind11 verification. Jim Bosch

            Show
            nlust Nate Lust added a comment - There is a solution for this problem in master now. This seems to be related to swig, and should not be necessary once the pybind11 merge is done. Verification that no further bug exists will happen during the pybind11 verification. Jim Bosch

              People

              Assignee:
              nlust Nate Lust
              Reporter:
              tjenness Tim Jenness
              Watchers:
              Jim Bosch, Nate Lust, Russell Owen, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.