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

Investigate GC problems with Storable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Labels:
      None
    • Templates:
    • Story Points:
      6
    • Sprint:
      AP F19-5 (October)
    • Team:
      Alert Production

      Description

      DM-19582 revealed that a Python subclass of lsst.afw.typehandling.Storable may be garbage collected while C++ code still has a pointer to it (for example, if the Python object is constructed as a "temporary" that is never bound to a name). When this happens, the C++ Storable does not segfault, but instead behaves as if none of Storable's methods were overridden.

      This is a known bug in pybind11, but two years of discussion have failed to converge to a solution. There are several workarounds posted on GitHub; I briefly tried the one listed in pybind11#1546 (which most closely matches our case) but wasn't able to fix the problem.

      Investigate this issue more systematically and determine if there is any workaround that works in our case. This problem is unlikely to be fixed upstream, and being unable to use Python subclasses of Storable from C++ will significantly impair our persistence plans.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                krzys Krzysztof Findeisen
                Reporter:
                krzys Krzysztof Findeisen
                Reviewers:
                Jim Bosch
                Watchers:
                Jim Bosch, Krzysztof Findeisen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel