On Jan 27, 2010, at 9:51 PM, Hoyt Koepke wrote:
> I'm really not sure which mailing list to report this on -- it has got
> to rank up there with one of the most obscure errors of all times. I
> suspect it's an error in gcc's new openmp implementation, gomp, but
> not sure; I can report it there if people think I should.
I'm guessing that's the issue, but just to be sure, try using the bare
----------- empty.cpp -----------------
#include "Python.h"
static struct PyMethodDef methods[] = {
{0, 0, 0, 0}
};
PyMODINIT_FUNC initemptymodule(void) {
Py_InitModule4("emptymodule", methods, 0, 0, PYTHON_API_VERSION);
}
-------------------------------------------
to make your empty module.
> In gcc 4.4.1, when I compile a completely empty .pyx module in (1) c++
> mode and (2) pass -lgomp to the linker, simply (3) importing that
> empty module causes any subsequent use of matplotlib to segfault the
> program. Changing either (1), (2) or (3) makes the error go away.
>
> I'm using the latest 32bit ubuntu (9.10), python 2.6.4, with the
> latest cython-devel (2820:105c661599c9) and the latest matplotlib from
> svn (8097). In matplotlib, I'm using the qt4agg backend. Everything
> else appears to be working save for this error.
>
> If my main file is simply:
>
> import tests.emptymodule
> import tests.plottest
>
> where emptymodules is a completely empty cython module and plottest is
>
> from matplotlib.pylab import *
>
> figure()
> plot([0,1], [0,1], '-b')
> show()
>
> The program segfaults on the plot() call, with backtrace
>
> (gdb) bt 8
> #0 0x00e03bc7 in __cxa_allocate_exception () from /usr/lib/libstdc+
> +.so.6
> #1 0x0093f282 in py_to_agg_transformation_matrix (obj=0x8223f58,
> errors=false) at src/agg_py_transforms.cpp:20
> #2 0x00946ff3 in _path_module::update_path_extents (this=0x8856098,
> args=...) at src/path.cpp:346
> #3 0x0094e2fd in
> Py::ExtensionModule<_path_module>::invoke_method_varargs (this=<value
> optimized out>, method_def=0x8476e00, args=...)
> at ./CXX/Python2/ExtensionModule.hxx:184
> #4 0x0093ae26 in method_varargs_call_handler
> (_self_and_name_tuple=0x888448c, _args=0x8f052fc) at
> CXX/Python2/cxx_extensions.cxx:1714
> #5 0x080dc0d0 in PyEval_EvalFrameEx ()
> #6 0x080dddf2 in PyEval_EvalCodeEx ()
> #7 0x080dc1b4 in PyEval_EvalFrameEx ()
>
> Other commands like imshow also cause a segfault.
>
> Anyway, I can get by for now without openmp, but I'm curious if anyone
> has ideas about this bug. I've attached a tarball with the code that
> reproduces it for me; simply run build.sh and run.
>
> Thanks!
> -- hoyt
>
> ++++++++++++++++++++++++++++++++++++++++++++++++
> + Hoyt Koepke
> + University of Washington Department of Statistics
> + http://www.stat.washington.edu/~hoytak/
> + [email protected]
> ++++++++++++++++++++++++++++++++++++++++++
> <cython-gomp-matplotlib-
> error.tar.bz2>_______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev