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

Segfault when attempting to construct an image

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Won't Fix
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I don't expect this to necessarily give me a valid image, but I don't expect it to segfault:

      In [1]: import lsst.afw.image as afwImage
       
      In [2]: afwImage.ImageF(None)
      Segmentation fault
      

      Guessing this is a pybind11 problem.

        Attachments

          Activity

          Hide
          yusra Yusra AlSayyad added a comment - - edited

          This appears to have worked itself out with python 3 and v15 stack.

          • w_2018_22 on lsst_dev
          • lsst_distrib: 15.0-2-gda316d8+48 on my laptopĀ 

          [yusra@lsst-dev01 logs]$ python
          Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:51:32)
          [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
          Type "help", "copyright", "credits" or "license" for more information.
          >>> import lsst.afw.image as afwImage
          >>> afwImage.ImageF(None)
          <lsst.afw.image.image.image.ImageF object at 0x7f73e52e94c8>
           
           
          nat-oitwireless-inside-vapornet100-a-32347:lsstsw yusra$ python
          Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:14:59) 
          [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
          Type "help", "copyright", "credits" or "license" for more information.
          >>> import lsst.afw.image as afwImage
          >>> afwImage.ImageF(None)
          <lsst.afw.image.image.image.ImageF object at 0x108eb3fb8>
          

          However, on my laptop with version14.0-45-gaff501c of afw with python 2.7 did seg-fault:

          nat-oitwireless-inside-vapornet100-a-32347:~ yusra$ python
          Python 2.7.12 |Continuum Analytics, Inc.| (default, Jul  2 2016, 17:43:17) 
          [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on darwin
          Type "help", "copyright", "credits" or "license" for more information.
          Anaconda is brought to you by Continuum Analytics.
          Please check out: http://continuum.io/thanks and https://anaconda.org
          >>> import lsst.afw.image as afwImage
          >>> afwImage.ImageF(None)
          Caught signal 11, backtrace follows:
          0   libutils.dylib                      0x0000000103f020e1 lsst::utils::(anonymous namespace)::signalHandler(int) + 81
          1   libsystem_platform.dylib            0x00007fff9aed452a (null) + 26
          1   libsystem_platform.dylib            0x00007fff9aed452a _sigtramp + 26
          2   ???                                 0x00000001022fa600 0x0 + 4331644416
          3   image.so                            0x000000011e9788b1 pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> > pybind11::detail::argument_loader<lsst::afw::image::Image<float>*, ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&>::call_impl<void, void pybind11::detail::init<ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&>::execute<pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> >, pybind11::arg, pybind11::arg_v, pybind11::arg_v, 0>(pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> >&, pybind11::arg const&, pybind11::arg_v const&, pybind11::arg_v const&)::'lambda'(lsst::afw::image::Image<float>*, ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&)&, 0ul, 1ul, 2ul, 3ul>(void pybind11::detail::init<ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&>::execute<pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> >, pybind11::arg, pybind11::arg_v, pybind11::arg_v, 0>(pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> >&, pybind11::arg const&, pybind11::arg_v const&, pybind11::arg_v const&)::'lambda'(lsst::afw::image::Image<float>*, ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&)&&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul>) + 33
          4   image.so                            0x000000011e978605 void pybind11::cpp_function::initialize<void pybind11::detail::init<ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&>::execute<pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> >, pybind11::arg, pybind11::arg_v, pybind11::arg_v, 0>(pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> >&, pybind11::arg const&, pybind11::arg_v const&, pybind11::arg_v const&)::'lambda'(lsst::afw::image::Image<float>*, ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&), void, lsst::afw::image::Image<float>*, ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, pybind11::arg_v, pybind11::arg_v>(pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> >&&, void (*)(lsst::afw::image::Image<float>*, ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&, pybind11::arg const&, pybind11::arg_v const&, pybind11::arg_v const&)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const + 245
          5   backtrace.so                        0x0000000107b2c9d2 pybind11::cpp_function::dispatcher(_object*, _object*, _object*) + 2498
          6   libpython2.7.dylib                  0x000000010000c761 PyObject_Call + 97
          7   libpython2.7.dylib                  0x000000010001e7d7 instancemethod_call + 503
          8   libpython2.7.dylib                  0x000000010000c761 PyObject_Call + 97
          9   libpython2.7.dylib                  0x000000010006673a slot_tp_init + 106
          10  libpython2.7.dylib                  0x0000000100062465 type_call + 229
          11  libpython2.7.dylib                  0x000000010000c761 PyObject_Call + 97
          12  libpython2.7.dylib                  0x00000001000a35a5 PyEval_EvalFrameEx + 4405
          13  libpython2.7.dylib                  0x00000001000ac7dc PyEval_EvalCodeEx + 2092
          14  libpython2.7.dylib                  0x00000001000ac856 PyEval_EvalCode + 54
          15  libpython2.7.dylib                  0x00000001000ccb42 PyRun_InteractiveOneFlags + 578
          16  libpython2.7.dylib                  0x00000001000ccc9e PyRun_InteractiveLoopFlags + 222
          17  libpython2.7.dylib                  0x00000001000ccd4a PyRun_AnyFileExFlags + 122
          18  libpython2.7.dylib                  0x00000001000e01ca Py_Main + 2938
          19  python                              0x0000000100000f14 start + 52
          

          Show
          yusra Yusra AlSayyad added a comment - - edited This appears to have worked itself out with python 3 and v15 stack. w_2018_22 on lsst_dev lsst_distrib: 15.0-2-gda316d8+48 on my laptopĀ  [yusra@lsst-dev01 logs]$ python Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:51:32) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import lsst.afw.image as afwImage >>> afwImage.ImageF(None) <lsst.afw.image.image.image.ImageF object at 0x7f73e52e94c8>     nat-oitwireless-inside-vapornet100-a-32347:lsstsw yusra$ python Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:14:59) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import lsst.afw.image as afwImage >>> afwImage.ImageF(None) <lsst.afw.image.image.image.ImageF object at 0x108eb3fb8> However, on my laptop with version14.0-45-gaff501c of afw with python 2.7 did seg-fault: nat-oitwireless-inside-vapornet100-a-32347:~ yusra$ python Python 2.7.12 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:43:17) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on darwin Type "help", "copyright", "credits" or "license" for more information. Anaconda is brought to you by Continuum Analytics. Please check out: http://continuum.io/thanks and https://anaconda.org >>> import lsst.afw.image as afwImage >>> afwImage.ImageF(None) Caught signal 11, backtrace follows: 0 libutils.dylib 0x0000000103f020e1 lsst::utils::(anonymous namespace)::signalHandler(int) + 81 1 libsystem_platform.dylib 0x00007fff9aed452a (null) + 26 1 libsystem_platform.dylib 0x00007fff9aed452a _sigtramp + 26 2 ??? 0x00000001022fa600 0x0 + 4331644416 3 image.so 0x000000011e9788b1 pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> > pybind11::detail::argument_loader<lsst::afw::image::Image<float>*, ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&>::call_impl<void, void pybind11::detail::init<ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&>::execute<pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> >, pybind11::arg, pybind11::arg_v, pybind11::arg_v, 0>(pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> >&, pybind11::arg const&, pybind11::arg_v const&, pybind11::arg_v const&)::'lambda'(lsst::afw::image::Image<float>*, ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&)&, 0ul, 1ul, 2ul, 3ul>(void pybind11::detail::init<ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&>::execute<pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> >, pybind11::arg, pybind11::arg_v, pybind11::arg_v, 0>(pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> >&, pybind11::arg const&, pybind11::arg_v const&, pybind11::arg_v const&)::'lambda'(lsst::afw::image::Image<float>*, ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&)&&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul>) + 33 4 image.so 0x000000011e978605 void pybind11::cpp_function::initialize<void pybind11::detail::init<ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&>::execute<pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> >, pybind11::arg, pybind11::arg_v, pybind11::arg_v, 0>(pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> >&, pybind11::arg const&, pybind11::arg_v const&, pybind11::arg_v const&)::'lambda'(lsst::afw::image::Image<float>*, ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&), void, lsst::afw::image::Image<float>*, ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, pybind11::arg_v, pybind11::arg_v>(pybind11::class_<lsst::afw::image::Image<float>, std::__1::shared_ptr<lsst::afw::image::Image<float> >, lsst::afw::image::ImageBase<float> >&&, void (*)(lsst::afw::image::Image<float>*, ndarray::Array<float, 2, 1> const&, bool, lsst::afw::geom::Point<int, 2> const&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&, pybind11::arg const&, pybind11::arg_v const&, pybind11::arg_v const&)::'lambda'(pybind11::detail::function_call&)::operator()(pybind11::detail::function_call&) const + 245 5 backtrace.so 0x0000000107b2c9d2 pybind11::cpp_function::dispatcher(_object*, _object*, _object*) + 2498 6 libpython2.7.dylib 0x000000010000c761 PyObject_Call + 97 7 libpython2.7.dylib 0x000000010001e7d7 instancemethod_call + 503 8 libpython2.7.dylib 0x000000010000c761 PyObject_Call + 97 9 libpython2.7.dylib 0x000000010006673a slot_tp_init + 106 10 libpython2.7.dylib 0x0000000100062465 type_call + 229 11 libpython2.7.dylib 0x000000010000c761 PyObject_Call + 97 12 libpython2.7.dylib 0x00000001000a35a5 PyEval_EvalFrameEx + 4405 13 libpython2.7.dylib 0x00000001000ac7dc PyEval_EvalCodeEx + 2092 14 libpython2.7.dylib 0x00000001000ac856 PyEval_EvalCode + 54 15 libpython2.7.dylib 0x00000001000ccb42 PyRun_InteractiveOneFlags + 578 16 libpython2.7.dylib 0x00000001000ccc9e PyRun_InteractiveLoopFlags + 222 17 libpython2.7.dylib 0x00000001000ccd4a PyRun_AnyFileExFlags + 122 18 libpython2.7.dylib 0x00000001000e01ca Py_Main + 2938 19 python 0x0000000100000f14 start + 52
          Hide
          czw Christopher Waters added a comment -

          This can no longer be reproduced:

          import lsst.afw.image as afwImage
          afwImage.ImageF(None)
          lsst.afw.image.image.ImageF=[], bbox=(minimum=(0, 0), maximum=(-1, -1))
          

          Show
          czw Christopher Waters added a comment - This can no longer be reproduced: import lsst.afw.image as afwImage afwImage.ImageF(None) lsst.afw.image.image.ImageF=[], bbox=(minimum=( 0 , 0 ), maximum=(- 1 , - 1 ))

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            swinbank John Swinbank
            Watchers:
            Christopher Waters, Yusra AlSayyad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins Builds

                No builds found.