Re: [Bug 184920] Re: import numpy fails after Py_Finalize in embedded python

2013-04-13 Thread lcampagn
Sorry, I don't have the time to test this now. It looks like I attached a
test file and build script long ago, though..


On Sat, Apr 13, 2013 at 6:38 AM, Julian Taylor <
jtaylor.deb...@googlemail.com> wrote:

> can this issue still be reproduced in recent versions of the packaged
> numpy?
>
> ** Changed in: python-numpy (Ubuntu)
>Status: Triaged => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/184920
>
> Title:
>   import numpy fails after Py_Finalize in embedded python
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/python-numpy/+bug/184920/+subscriptions
>

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/184920

Title:
  import numpy fails after Py_Finalize in embedded python

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-numpy/+bug/184920/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 184920] Re: import numpy fails after Py_Finalize in embedded python

2008-04-04 Thread lcampagn
Here's the backtrace again after installing python-numpy-dbg:


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffce74876f0 (LWP 12541)]
0x7ffce42f6dbb in PyArray_FromScalar (scalar=, outcode=0x0) at numpy/core/src/scalartypes.inc.src:278
278 numpy/core/src/scalartypes.inc.src: No such file or directory.
in numpy/core/src/scalartypes.inc.src
Current language:  auto; currently c
(gdb) backtrace
#0  0x7ffce42f6dbb in PyArray_FromScalar (scalar=, outcode=0x0) at numpy/core/src/scalartypes.inc.src:278
#1  0x7ffce4315c1a in gentype_nonzero_number (m1=0x6d2398) at
numpy/core/src/scalartypes.inc.src:519
#2  0x7ffce6f9a417 in PyObject_IsTrue (v=0x6d2398) at
../Objects/object.c:1474
#3  0x7ffce6fe28d0 in PyEval_EvalFrameEx (f=0x6e1f40,
throwflag=) at ../Python/ceval.c:2116
#4  0x7ffce6fe5723 in PyEval_EvalFrameEx (f=0x6f2940,
throwflag=) at ../Python/ceval.c:3659
#5  0x7ffce6fe6916 in PyEval_EvalCodeEx (co=0x7ffce7389d50,
globals=, locals=,
args=0x724e80, argcount=3,
kws=0x724e98, kwcount=0, defs=0x7ffce7327568, defcount=1,
closure=0x0) at ../Python/ceval.c:2836
#6  0x7ffce6fe4967 in PyEval_EvalFrameEx (f=0x724cd0,
throwflag=) at ../Python/ceval.c:3669
#7  0x7ffce6fe6916 in PyEval_EvalCodeEx (co=0x7ffce7389be8,
globals=, locals=,
args=0x785fb8, argcount=2,
kws=0x785fc8, kwcount=0, defs=0x7ffce74799f8, defcount=2,
closure=0x0) at ../Python/ceval.c:2836
#8  0x7ffce6fe4967 in PyEval_EvalFrameEx (f=0x785df0,
throwflag=) at ../Python/ceval.c:3669
#9  0x7ffce6fe6916 in PyEval_EvalCodeEx (co=0x7ffce3e65a80,
globals=, locals=,
args=0x724a70, argcount=2,
kws=0x724a80, kwcount=0, defs=0x7ffce21fba68, defcount=1,
closure=0x0) at ../Python/ceval.c:2836
#10 0x7ffce6fe4967 in PyEval_EvalFrameEx (f=0x7248c0,
throwflag=) at ../Python/ceval.c:3669
#11 0x7ffce6fe6916 in PyEval_EvalCodeEx (co=0x7ffce263d6c0,
globals=, locals=,
args=0x861b90, argcount=2,
kws=0x861ba0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at
../Python/ceval.c:2836
#12 0x7ffce6fe4967 in PyEval_EvalFrameEx (f=0x861a00,
throwflag=) at ../Python/ceval.c:3669
#13 0x7ffce6fe6916 in PyEval_EvalCodeEx (co=0x7ffce263d828,
globals=, locals=,
args=0x69f9d0, argcount=1,
kws=0x69f9d8, kwcount=0, defs=0x7ffce73271a8, defcount=1,
closure=0x0) at ../Python/ceval.c:2836
#14 0x7ffce6fe4967 in PyEval_EvalFrameEx (f=0x69f850,
throwflag=) at ../Python/ceval.c:3669
#15 0x7ffce6fe6916 in PyEval_EvalCodeEx (co=0x7ffce735fbe8,
globals=, locals=, args=0x0,
argcount=0, kws=0x0,
kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:2836
#16 0x7ffce6fe6a32 in PyEval_EvalCode (co=0x6d2398,
globals=0x7ffce7477be8, locals=0x0) at ../Python/ceval.c:494
#17 0x7ffce6ffbeb2 in PyImport_ExecCodeModuleEx
(name=0x7fffef4b0730 "numpy.core._internal", co=0x7ffce735fbe8,
pathname=0x7fffef4ae5d0
"/usr/lib/python2.5/site-packages/numpy/core/_internal.pyc") at
../Python/import.c:675
#18 0x7ffce6ffe030 in load_source_module (name=0x7fffef4b0730
"numpy.core._internal",
pathname=0x7fffef4ae5d0
"/usr/lib/python2.5/site-packages/numpy/core/_internal.pyc", fp=) at ../Python/import.c:959
#19 0x7ffce6ffe649 in import_submodule (mod=0x7ffce72d5f30,
subname=0x7fffef4b073b "_internal", fullname=0x7fffef4b0730
"numpy.core._internal")
at ../Python/import.c:2400
#20 0x7ffce6ffeb2b in load_next (mod=0x7ffce72d5f30,
altmod=0x7ffce72724b0, p_name=,
buf=0x7fffef4b0730 "numpy.core._internal",
p_buflen=0x7fffef4b0728) at ../Python/import.c:2220
#21 0x7ffce6ffed2d in import_module_level (name=0x0,
globals=0xfffe, locals=,
fromlist=0x7ffce72724b0, level=-2)
at ../Python/import.c:2001
#22 0x7ffce6fff435 in PyImport_ImportModuleLevel
(name=0x7ffce457b914 "_internal", globals=0x850540, locals=0x850540,
fromlist=0x7ffce72724b0, level=-1)
at ../Python/import.c:2072
#23 0x7ffce6fdf17d in builtin___import__ (self=, args=, kwds=) at
../Python/bltinmodule.c:47
#24 0x7ffce6f64f53 in PyObject_Call (func=0x6d2398,
arg=0x7ffce7477be8, kw=0x0) at ../Objects/abstract.c:1861
#25 0x7ffce6fdf8ae in PyEval_CallObjectWithKeywords
(func=0x7ffce744a950, arg=0x7ffce7478418, kw=0x0) at
../Python/ceval.c:3442
#26 0x7ffce6fe2719 in PyEval_EvalFrameEx (f=0x6ea400,
throwflag=) at ../Python/ceval.c:2067
#27 0x7ffce6fe6916 in PyEval_EvalCodeEx (co=0x7ffce21dca08,
globals=, locals=, args=0x0,
argcount=0, kws=0x0,
kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:2836
#28 0x7ffce6fe6a32 in PyEval_EvalCode (co=0x6d2398,
globals=0x7ffce7477be8, locals=0x0) at ../Python/ceval.c:494
#29 0x7ffce6ffbeb2 in PyImport_ExecCodeModuleEx
(name=0x7fffef4b4d70 "numpy.core", co=0x7ffce21dca08,
pathname=0x7fffef4b1bb0
"/usr/lib/python2.5/site-packages/numpy/core/__init__.pyc") at
../Python/import.c:675
#30 0x7ffce6ffe030 in load_source_module (name=0x7fffef4b4d70 "numpy.core",
pathname=0x7fffef4b1bb0
"/usr/lib/pyth

Re: [Bug 184920] Re: import numpy fails after Py_Finalize in embedded python

2008-04-04 Thread lcampagn
I've attached two files:
- pythontest.cpp - just initializes python, imports numpy, and
finalizes, then repeats. On my machine (running hardy), the second run
through causes a segfault.
- build - a short script I used to build the executable

Here's the backtrace when I run:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f2bd23e76f0 (LWP 12345)]
0x7f2bcf256dbb in ?? () from
/usr/lib/python2.5/site-packages/numpy/core/multiarray.so
(gdb) backtrace
#0  0x7f2bcf256dbb in ?? () from
/usr/lib/python2.5/site-packages/numpy/core/multiarray.so
#1  0x7f2bcf275c1a in ?? () from
/usr/lib/python2.5/site-packages/numpy/core/multiarray.so
#2  0x7f2bd1efa417 in PyObject_IsTrue () from /usr/lib/libpython2.5.so.1.0
#3  0x7f2bd1f428d0 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.5.so.1.0
#4  0x7f2bd1f45723 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.5.so.1.0
#5  0x7f2bd1f46916 in PyEval_EvalCodeEx () from /usr/lib/libpython2.5.so.1.0
#6  0x7f2bd1f44967 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.5.so.1.0
#7  0x7f2bd1f46916 in PyEval_EvalCodeEx () from /usr/lib/libpython2.5.so.1.0
#8  0x7f2bd1f44967 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.5.so.1.0
#9  0x7f2bd1f46916 in PyEval_EvalCodeEx () from /usr/lib/libpython2.5.so.1.0
#10 0x7f2bd1f44967 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.5.so.1.0
#11 0x7f2bd1f46916 in PyEval_EvalCodeEx () from /usr/lib/libpython2.5.so.1.0
#12 0x7f2bd1f44967 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.5.so.1.0
#13 0x7f2bd1f46916 in PyEval_EvalCodeEx () from /usr/lib/libpython2.5.so.1.0
#14 0x7f2bd1f44967 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.5.so.1.0
#15 0x7f2bd1f46916 in PyEval_EvalCodeEx () from /usr/lib/libpython2.5.so.1.0
#16 0x7f2bd1f46a32 in PyEval_EvalCode () from /usr/lib/libpython2.5.so.1.0
#17 0x7f2bd1f5beb2 in PyImport_ExecCodeModuleEx () from
/usr/lib/libpython2.5.so.1.0
#18 0x7f2bd1f5e030 in ?? () from /usr/lib/libpython2.5.so.1.0
#19 0x7f2bd1f5e649 in ?? () from /usr/lib/libpython2.5.so.1.0
#20 0x7f2bd1f5eb2b in ?? () from /usr/lib/libpython2.5.so.1.0
#21 0x7f2bd1f5ed2d in ?? () from /usr/lib/libpython2.5.so.1.0
#22 0x7f2bd1f5f435 in PyImport_ImportModuleLevel () from
/usr/lib/libpython2.5.so.1.0
#23 0x7f2bd1f3f17d in ?? () from /usr/lib/libpython2.5.so.1.0
#24 0x7f2bd1ec4f53 in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#25 0x7f2bd1f3f8ae in PyEval_CallObjectWithKeywords () from
/usr/lib/libpython2.5.so.1.0
#26 0x7f2bd1f42719 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.5.so.1.0
#27 0x7f2bd1f46916 in PyEval_EvalCodeEx () from /usr/lib/libpython2.5.so.1.0
#28 0x7f2bd1f46a32 in PyEval_EvalCode () from /usr/lib/libpython2.5.so.1.0
#29 0x7f2bd1f5beb2 in PyImport_ExecCodeModuleEx () from
/usr/lib/libpython2.5.so.1.0
#30 0x7f2bd1f5e030 in ?? () from /usr/lib/libpython2.5.so.1.0
#31 0x7f2bd1f5f358 in ?? () from /usr/lib/libpython2.5.so.1.0
#32 0x7f2bd1f5e649 in ?? () from /usr/lib/libpython2.5.so.1.0
#33 0x7f2bd1f5eb2b in ?? () from /usr/lib/libpython2.5.so.1.0
#34 0x7f2bd1f5ed2d in ?? () from /usr/lib/libpython2.5.so.1.0
#35 0x7f2bd1f5f435 in PyImport_ImportModuleLevel () from
/usr/lib/libpython2.5.so.1.0
#36 0x7f2bd1f3f17d in ?? () from /usr/lib/libpython2.5.so.1.0
#37 0x7f2bd1ec4f53 in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#38 0x7f2bd1f3f8ae in PyEval_CallObjectWithKeywords () from
/usr/lib/libpython2.5.so.1.0
#39 0x7f2bd1f42719 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.5.so.1.0
#40 0x7f2bd1f46916 in PyEval_EvalCodeEx () from /usr/lib/libpython2.5.so.1.0
#41 0x7f2bd1f46a32 in PyEval_EvalCode () from /usr/lib/libpython2.5.so.1.0
#42 0x7f2bd1f5beb2 in PyImport_ExecCodeModuleEx () from
/usr/lib/libpython2.5.so.1.0
#43 0x7f2bd1f5e030 in ?? () from /usr/lib/libpython2.5.so.1.0
#44 0x7f2bd1f5f358 in ?? () from /usr/lib/libpython2.5.so.1.0
#45 0x7f2bd1f5e649 in ?? () from /usr/lib/libpython2.5.so.1.0
#46 0x7f2bd1f5eb2b in ?? () from /usr/lib/libpython2.5.so.1.0
#47 0x7f2bd1f5ed2d in ?? () from /usr/lib/libpython2.5.so.1.0
#48 0x7f2bd1f5f435 in PyImport_ImportModuleLevel () from
/usr/lib/libpython2.5.so.1.0
#49 0x7f2bd1f3f17d in ?? () from /usr/lib/libpython2.5.so.1.0
#50 0x7f2bd1ec4f53 in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#51 0x7f2bd1f3f8ae in PyEval_CallObjectWithKeywords () from
/usr/lib/libpython2.5.so.1.0
#52 0x7f2bd1f42719 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.5.so.1.0
#53 0x7f2bd1f46916 in PyEval_EvalCodeEx () from /usr/lib/libpython2.5.so.1.0
#54 0x7f2bd1f46a32 in PyEval_EvalCode () from /usr/lib/libpython2.5.so.1.0
#55 0x7f2bd1f67bac in PyRun_StringFlags () from /usr/lib/libpython2.5.so.1.0
#56 0x7f2bd1f68d50 in PyRun_SimpleStringFlags () from
/usr/lib/libpython2.5.so.1.0
#57 0x00400c4c in initPython () at

Re: [Bug 184920] Re: import numpy fails after Py_Finalize in embedded python

2008-04-04 Thread Scott Kitterman

> Unfortunately, the software I'm writing is pretty heavily tied to
> Gutsy right now. If I have time, I'll write a test program and try it
> on Hardy at some point.

We've got ~ a week to get fixes in for Hardy, so please don't wait to
long.

-- 
import numpy fails after Py_Finalize in embedded python
https://bugs.launchpad.net/bugs/184920
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 184920] Re: import numpy fails after Py_Finalize in embedded python

2008-04-04 Thread lcampagn
>  is this same behaviour with a recent version in hardy?

Unfortunately, the software I'm writing is pretty heavily tied to
Gutsy right now. If I have time, I'll write a test program and try it
on Hardy at some point.

Q

-- 
import numpy fails after Py_Finalize in embedded python
https://bugs.launchpad.net/bugs/184920
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 184920] Re: import numpy fails after Py_Finalize in embedded python

2008-04-04 Thread lcampagn
The thread is "Dynamic module not initialized properly"
http://projects.scipy.org/pipermail/numpy-discussion/2007-April/026999.html

>From this post:

"...The issue
that I encountered had to do with the "multiarraymodule.c" extension
module. When "numpy" is imported, it imports this module and the static
variable "_multiarray_module_loaded" gets set. When Python is finalized
is does not unload the multiarraymodule.c DLL. When Python is
initialized again and "numpy" is imported again, the static variable is
already set and multiarraymodule does not import correctly. Hence the
error."

"... What needs to be done long term is the removal of the static variable in
multiarraymodule. I don't understand the code well enough to know why it
is needed, but that appears to be the crux of the issue ..."

On Fri, Apr 4, 2008 at 3:37 PM, Matthias Klose <[EMAIL PROTECTED]> wrote:
> can't find the thread on 
> http://projects.scipy.org/pipermail/numpy-discussion/2007-April/thread.html
>  is this same behaviour with a recent version in hardy?
>
>
>  ** Changed in: python-numpy (Ubuntu)
>Status: New => Incomplete
>
>
>
>  --
>  import numpy fails after Py_Finalize in embedded python
>  https://bugs.launchpad.net/bugs/184920
>  You received this bug notification because you are a direct subscriber
>  of the bug.
>

-- 
import numpy fails after Py_Finalize in embedded python
https://bugs.launchpad.net/bugs/184920
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs