X Tutup
Skip to content

Segmentation fault in QuadMeshGenerator on ppc64 #7501

@opoplawski

Description

@opoplawski

To help us understand and resolve your issue please check that you have provided
the information below.

  • Matplotlib version, Python version and Platform (Windows, OSX, Linux ...)

python2-matplotlib-2.0.0-0.3.b4.fc26.ppc64
python-2.7.12-8.fc26.ppc64
Fedora Rawhide ppc64

  • How did you install Matplotlib and Python (pip, anaconda, from source ...)

RPMs

  • If possible please supply a Short, Self Contained, Correct, Example
    that demonstrates the issue i.e a small piece of code which reproduces the issue
    and can be run with out any other (or as few as possible) external dependencies.

I'm afraid this is a random crash when trying to build the sphinx documentation for the python-astropy package. See also https://bugzilla.redhat.com/show_bug.cgi?id=1394975

  • If this is a regression (Used to work in an earlier version of Matplotlib), please
    note where it used to work.

Hard to say

gdb:

Core was generated by `/usr/bin/python2 '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00003fff7b1bca14 in QuadMeshGenerator<numpy::array_view<double const, 3> >::QuadMeshPathIterator::vertex (y=0x3ffffa94a360, x=0x3ffffa94a358, idx=<optimized out>, this=0x3ffffa94ab78)
    at src/_backend_agg.h:1099
1099                *x = (*m_coordinates)(n, m, 0);
(gdb) list
1094          private:
1095            inline unsigned vertex(unsigned idx, double *x, double *y)
1096            {
1097                size_t m = m_m + ((idx & 0x2) >> 1);
1098                size_t n = m_n + (((idx + 1) & 0x2) >> 1);
1099                *x = (*m_coordinates)(n, m, 0);
1100                *y = (*m_coordinates)(n, m, 1);
1101                return (idx) ? agg::path_cmd_line_to : agg::path_cmd_move_to;
1102            }
1103
(gdb) print m_coordinates
$1 = (const numpy::array_view<double const, 3> *) 0x3ffffa94ac18
(gdb) print *m_coordinates
$2 = {<numpy::detail::array_view_accessors<numpy::array_view, double const, 3>> = {<No data fields>}, m_arr = 0x3fff76c77a30, m_shape = 0x10013542510, m_strides = 0x10013542528,
  m_data = 0x10013817f90 ""}
(gdb) print x
$3 = (double *) 0x3ffffa94a358
(gdb) print *x
$4 = 501.59999999999997
(gdb) print n
$5 = 986115
(gdb) print m
$6 = <optimized out>
(gdb) print m_m
$7 = 0
#1  QuadMeshGenerator<numpy::array_view<double const, 3> >::QuadMeshPathIterator::vertex (
    y=0x3ffffa94a360, x=0x3ffffa94a358, this=0x3ffffa94ab78) at src/_backend_agg.h:1110
1110                return vertex(m_iterator++, x, y);
(gdb) print m_iterator
$1 = 3
(gdb) print *this
$6 = {m_iterator = 3, m_m = 0, m_n = 986114, m_coordinates = 0x3ffffa94ac18}
(gdb) print m_m + ((3 & 0x2) >> 1)
$7 = 1
(gdb) print m_n + (((3 + 1) & 0x2) >> 1)
$8 = 986114
(gdb) print *m_coordinates
$10 = {<numpy::detail::array_view_accessors<numpy::array_view, double const, 3>> = {<No data fields>}, m_arr = 0x3fff76c77a30, m_shape = 0x10013542510, m_strides = 0x10013542528,
  m_data = 0x10013817f90 ""}
(gdb) print *m_coordinates->m_shape
$11 = 257
(gdb) print *m_coordinates->m_arr
$12 = {ob_refcnt = 5, ob_type = 0x3fff7e460000}
(gdb) print *m_coordinates->m_strides
$13 = 32
(gdb) print *m_coordinates->m_data
$14 = 0 '\000'

(gdb) bt
#0  0x00003fff766eca14 in QuadMeshGenerator<numpy::array_view<double const, 3> >::QuadMeshPathIterator::vertex (y=0x3fffe7591400, x=0x3fffe75913f8, idx=<optimized out>, this=0x3fffe7591c18)
    at src/_backend_agg.h:1099
#1  QuadMeshGenerator<numpy::array_view<double const, 3> >::QuadMeshPathIterator::vertex (
    y=0x3fffe7591400, x=0x3fffe75913f8, this=0x3fffe7591c18) at src/_backend_agg.h:1110
#2  agg::conv_transform<QuadMeshGenerator<numpy::array_view<double const, 3> >::QuadMeshPathIterator, agg::trans_affine>::vertex (this=0x3fffe7591bf0, x=0x3fffe75913f8, y=0x3fffe7591400)
    at extern/agg24-svn/include/agg_conv_transform.h:43
#3  0x00003fff766ecd98 in PathNanRemover<agg::conv_transform<QuadMeshGenerator<numpy::array_view<double const, 3> >::QuadMeshPathIterator, agg::trans_affine> >::vertex (this=0x3fffe7591f80,
    x=<optimized out>, y=<optimized out>) at src/path_converters.h:251
#4  0x00003fff766ed0f8 in PathClipper<PathNanRemover<agg::conv_transform<QuadMeshGenerator<numpy::array_view<double const, 3> >::QuadMeshPathIterator, agg::trans_affine> > >::vertex (
    this=0x3fffe7591ff8, x=<optimized out>, y=<optimized out>) at src/path_converters.h:416
#5  0x00003fff766ed4f4 in agg::rasterizer_scanline_aa<agg::rasterizer_sl_clip<agg::ras_conv_dbl> >::add_path<PathClipper<PathNanRemover<agg::conv_transform<QuadMeshGenerator<numpy::array_view<double const, 3> >::QuadMeshPathIterator, agg::trans_affine> > > > (this=0x100413ba780,
    vs=..., path_id=<optimized out>)
    at extern/agg24-svn/include/agg_rasterizer_scanline_aa.h:167
#6  0x00003fff766ef604 in RendererAgg::_draw_path<PathClipper<PathNanRemover<agg::conv_transform<QuadMeshGenerator<numpy::array_view<double const, 3> >::QuadMeshPathIterator, agg::trans_affine> > > > (this=0x100413ba5f0, path=..., has_clippath=<optimized out>, face=..., gc=...)
    at src/_backend_agg.h:319
#7  0x00003fff766d5894 in RendererAgg::_draw_path_collection_generic<py::PathIterator, QuadMeshGenerator<numpy::array_view<double const, 3> >, array::empty<double>, numpy::array_view<double const, 2>, numpy::array_view<double const, 2>, array::scalar<double, 1>, array::scalar<unsigned char, 1> > (has_curves=0, check_snap=0, offset_position=OFFSET_POSITION_FIGURE,
    antialiaseds=<synthetic pointer>...,
    linestyles=std::vector of length 11, capacity -2199010330848 = {...},
    linewidths=<synthetic pointer>..., edgecolors=..., facecolors=..., offset_trans=...,
    offsets=..., transforms=<synthetic pointer>..., path_generator=..., clippath_trans=...,
    clippath=..., cliprect=..., master_transform=..., gc=..., this=0x100413ba5f0)
    at src/_backend_agg.h:1031
#8  RendererAgg::draw_quad_mesh<numpy::array_view<double const, 3>, numpy::array_view<double const, 2>, numpy::array_view<double const, 2> > (edgecolors=..., antialiased=<optimized out>,
    facecolors=..., offset_trans=..., offsets=..., coordinates=...,
    mesh_height=<optimized out>, mesh_width=<optimized out>, master_transform=..., gc=...,
    this=0x100413ba5f0) at src/_backend_agg.h:1174
#9  PyRendererAgg_draw_quad_mesh (self=<optimized out>, args=<optimized out>,
    kwds=<optimized out>) at src/_backend_agg_wrapper.cpp:424
#10 0x00003fff7b886740 in PyCFunction_Call (
    func=<built-in method draw_quad_mesh of matplotlib.backends._backend_agg.RendererAgg object at remote 0x3fff722e8bd0>, arg=<optimized out>, kw=<optimized out>)
    at /usr/src/debug/Python-2.7.12/Objects/methodobject.c:116
#11 0x00003fff7b909ab0 in call_function (oparg=<optimized out>, pp_stack=0x3fffe7592318)
    at /usr/src/debug/Python-2.7.12/Python/ceval.c:4427
#12 PyEval_EvalFrameEx (f=
    Frame 0x1003f62c6c0, for file /usr/lib64/python2.7/site-packages/matplotlib/collections.py, line 1937, in draw (self=<QuadMesh(_label=u'_collection0', _transform=<CompositeGenericTransform(_invalid=0, input_dims=2, _b=<CompositeGenericTransform(_invalid=0, input_dims=2, _b=<BboxTransformTo(_invalid=0, _inverted=<Affine2D(_invalid=0, _inverted=None, _mtx=<numpy.ndarray at remote 0x3fff725054e0>, _shorthand_name=u'', _parents=<WeakValueDictionary(_remove=<function at remote 0x3fff7240ac08>, _pending_removals=[], _iterating=set([]), data={}) at remote 0x3fff722087a0>) at remote 0x3fff70ac7ad0>, _boxout=<TransformedBbox(_invalid=0, _transform=<BboxTransformTo(_invalid=0, _inverted=None, _boxout=<TransformedBbox(_invalid=0, _transform=<Affine2D(_invalid=0, _inverted=None, _mtx=<numpy.ndarray at remote 0x3fff721f0b20>, _shorthand_name=u'', _parents=<WeakValueDictionary(_remove=<function at remote 0x3fff72268c80>, _pending_removals=[], _iterating=set([]), data={70366364464016: <KeyedRef at remote 0x3fff71f75590>, 70...(truncated),
    throwflag=<optimized out>) at /usr/src/debug/Python-2.7.12/Python/ceval.c:3061
#13 0x00003fff7b90dd98 in PyEval_EvalCodeEx (co=0x3fff77404db0, globals=<optimized out>,
    locals=<optimized out>, args=<optimized out>, argcount=<optimized out>,
    kws=0x3fff7b390068, kwcount=<optimized out>, defs=<optimized out>, defcount=0, closure=0x0)
    at /usr/src/debug/Python-2.7.12/Python/ceval.c:3659
...

Attempted workaround with:

export MPLBACKEND=cairo

But that does not remove this completely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup