Discussion:
[conda] python with debugging symbols
Valentin Haenel
2014-12-24 23:46:44 UTC
Permalink
I am trying to run a core dump through gdb and gdb can't find the sources
(I am guessing):

Program terminated with signal 11, Segmentation fault.
#0 PyObject_Malloc (nbytes=40) at Objects/obmalloc.c:813
813 Objects/obmalloc.c: No such file or directory.
(gdb) up
#1 0x00007fe7d9f11935 in PyObject_Realloc (p=0x7fe7cf829fb0,
nbytes=<optimized out>) at Objects/obmalloc.c:1252
1252 in Objects/obmalloc.c

I have no idea what I am doing, but could it be that I need the sources or
a debug package? Is this available in conda?

V-
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Valentin Haenel
2015-02-22 17:29:38 UTC
Permalink
Any news on this?

I saw there is a:

2.7.9 d1
defaults [debug]

But I am not sure how to install this?

V-
Post by Valentin Haenel
I am trying to run a core dump through gdb and gdb can't find the sources
Program terminated with signal 11, Segmentation fault.
#0 PyObject_Malloc (nbytes=40) at Objects/obmalloc.c:813
813 Objects/obmalloc.c: No such file or directory.
(gdb) up
#1 0x00007fe7d9f11935 in PyObject_Realloc (p=0x7fe7cf829fb0,
nbytes=<optimized out>) at Objects/obmalloc.c:1252
1252 in Objects/obmalloc.c
I have no idea what I am doing, but could it be that I need the sources or
a debug package? Is this available in conda?
V-
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Ilan Schnell
2015-02-22 17:44:18 UTC
Permalink
Hi Valentin,
the C source code of Python is not included in the conda package. I would
download the Python source code from python.org, and look up line 1252 in
Objects/obmalloc.c to see what might be going on.
The [debug] package, i.e. python-2.7.9-d1.tar.bz2 does not contain the
Python source code either. It is a build of Python which uses the
--with-pydebug option during the configuration step. This option allows
having access to some Python internals at runtime such as
sys.gettotalrefcount().

- Ilan
Post by Valentin Haenel
Any news on this?
2.7.9 d1
defaults [debug]
But I am not sure how to install this?
V-
Post by Valentin Haenel
I am trying to run a core dump through gdb and gdb can't find the sources
Program terminated with signal 11, Segmentation fault.
#0 PyObject_Malloc (nbytes=40) at Objects/obmalloc.c:813
813 Objects/obmalloc.c: No such file or directory.
(gdb) up
#1 0x00007fe7d9f11935 in PyObject_Realloc (p=0x7fe7cf829fb0,
nbytes=<optimized out>) at Objects/obmalloc.c:1252
1252 in Objects/obmalloc.c
I have no idea what I am doing, but could it be that I need the sources
or a debug package? Is this available in conda?
V-
--
You received this message because you are subscribed to the Google Groups
"conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Valentin Haenel
2015-02-28 19:46:20 UTC
Permalink
Hi Ilan,

thanks for your answer!
Post by Ilan Schnell
the C source code of Python is not included in the conda package. I would
download the Python source code from python.org, and look up line 1252 in
Objects/obmalloc.c to see what might be going on.
The [debug] package, i.e. python-2.7.9-d1.tar.bz2 does not contain the
Python source code either. It is a build of Python which uses the
--with-pydebug option during the configuration step. This option allows
having access to some Python internals at runtime such as
sys.gettotalrefcount().
Okay, I actually compliled my own Python with exactly that flag and it
leads to a different error:

Fatal Python error: numpy/core/src/multiarray/refcount.c:184 object at
0x7f847a6af930 has negative ref count -2604246222170760230

hmm...

Anyway, could you tell me how to install the d1 package? I'd like to try
out and it see if that one behaves differently to the one I compiled
locally, thanks!

V-
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Ilan Schnell
2015-02-28 19:51:03 UTC
Permalink
Hi Valentin,
you can install the Python debug package using:
$ conda install debug

This installs a meta-package which adds the 'debug' feature to the conda
environment, which then causes the python package to be replaced by the one
which has this feature. This is the same mechanism which we use to switch
between mkl-linked and non-mkl-linked versions of numpy, scipy, etc.

- Ilan
Post by Valentin Haenel
Hi Ilan,
thanks for your answer!
Post by Ilan Schnell
the C source code of Python is not included in the conda package. I
would
Post by Ilan Schnell
download the Python source code from python.org, and look up line 1252
in
Post by Ilan Schnell
Objects/obmalloc.c to see what might be going on.
The [debug] package, i.e. python-2.7.9-d1.tar.bz2 does not contain the
Python source code either. It is a build of Python which uses the
--with-pydebug option during the configuration step. This option allows
having access to some Python internals at runtime such as
sys.gettotalrefcount().
Okay, I actually compliled my own Python with exactly that flag and it
Fatal Python error: numpy/core/src/multiarray/refcount.c:184 object at
0x7f847a6af930 has negative ref count -2604246222170760230
hmm...
Anyway, could you tell me how to install the d1 package? I'd like to try
out and it see if that one behaves differently to the one I compiled
locally, thanks!
V-
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Valentin Haenel
2015-02-28 19:53:47 UTC
Permalink
Post by Ilan Schnell
Hi Valentin,
$ conda install debug
This installs a meta-package which adds the 'debug' feature to the conda
environment, which then causes the python package to be replaced by the one
which has this feature. This is the same mechanism which we use to switch
between mkl-linked and non-mkl-linked versions of numpy, scipy, etc.
Awesome, thanks!

V-
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Valentin Haenel
2015-02-28 20:00:52 UTC
Permalink
Post by Valentin Haenel
Post by Ilan Schnell
Hi Valentin,
$ conda install debug
This installs a meta-package which adds the 'debug' feature to the conda
environment, which then causes the python package to be replaced by the one
which has this feature. This is the same mechanism which we use to switch
between mkl-linked and non-mkl-linked versions of numpy, scipy, etc.
Awesome, thanks!
Yeah, it gives the same error as my locally installed one.

BTW: I had to install numpy from source because it wouldn't work with
the d1 python, is this expected?

V-
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Ilan Schnell
2015-02-28 20:21:23 UTC
Permalink
Thanks for being the numpy import problem to attention. I get:
Symbol not found: _Py_InitModule4_64

This problem is not specific to numpy, however. Any C extension you try to
import from the debug build had this problem. I'm not sure how to solve
this without having to recompile the extension modules.

- Ilan
Post by Valentin Haenel
Post by Valentin Haenel
Post by Ilan Schnell
Hi Valentin,
$ conda install debug
This installs a meta-package which adds the 'debug' feature to the
conda
Post by Valentin Haenel
Post by Ilan Schnell
environment, which then causes the python package to be replaced by
the one
Post by Valentin Haenel
Post by Ilan Schnell
which has this feature. This is the same mechanism which we use to
switch
Post by Valentin Haenel
Post by Ilan Schnell
between mkl-linked and non-mkl-linked versions of numpy, scipy, etc.
Awesome, thanks!
Yeah, it gives the same error as my locally installed one.
BTW: I had to install numpy from source because it wouldn't work with
the d1 python, is this expected?
V-
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Valentin Haenel
2015-02-28 20:28:23 UTC
Permalink
Post by Ilan Schnell
Symbol not found: _Py_InitModule4_64
This problem is not specific to numpy, however. Any C extension you try to
import from the debug build had this problem. I'm not sure how to solve
this without having to recompile the extension modules.
Yes, I get the same error and had exactly the same line of reasoning.

V-
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Yuri Bochkarev
2015-03-03 14:32:29 UTC
Permalink
I want to compile CPython with custom options (--disable-pymalloc) and use
it inside of conda. How do I do that? Is there a default receipt in
conda/binstar for python that I could modify for my needs? I could not find
any. Could you point me please?
Post by Ilan Schnell
Hi Valentin,
$ conda install debug
This installs a meta-package which adds the 'debug' feature to the conda
environment, which then causes the python package to be replaced by the one
which has this feature. This is the same mechanism which we use to switch
between mkl-linked and non-mkl-linked versions of numpy, scipy, etc.
- Ilan
Post by Valentin Haenel
Hi Ilan,
thanks for your answer!
Post by Ilan Schnell
the C source code of Python is not included in the conda package. I
would
Post by Ilan Schnell
download the Python source code from python.org, and look up line 1252
in
Post by Ilan Schnell
Objects/obmalloc.c to see what might be going on.
The [debug] package, i.e. python-2.7.9-d1.tar.bz2 does not contain the
Python source code either. It is a build of Python which uses the
--with-pydebug option during the configuration step. This option allows
having access to some Python internals at runtime such as
sys.gettotalrefcount().
Okay, I actually compliled my own Python with exactly that flag and it
Fatal Python error: numpy/core/src/multiarray/refcount.c:184 object at
0x7f847a6af930 has negative ref count -2604246222170760230
hmm...
Anyway, could you tell me how to install the d1 package? I'd like to try
out and it see if that one behaves differently to the one I compiled
locally, thanks!
V-
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Yuri Bochkarev
2015-03-03 20:07:54 UTC
Permalink
For those unlucky and desperate ones who followed the path similar to mine
and didn't find a CPython recipe, here it is:
https://github.com/hajs/pylodger/tree/master/recipes/base/python
Post by Yuri Bochkarev
I want to compile CPython with custom options (--disable-pymalloc) and use
it inside of conda. How do I do that? Is there a default receipt in
conda/binstar for python that I could modify for my needs? I could not find
any. Could you point me please?
Post by Ilan Schnell
Hi Valentin,
$ conda install debug
This installs a meta-package which adds the 'debug' feature to the conda
environment, which then causes the python package to be replaced by the one
which has this feature. This is the same mechanism which we use to switch
between mkl-linked and non-mkl-linked versions of numpy, scipy, etc.
- Ilan
Post by Valentin Haenel
Hi Ilan,
thanks for your answer!
Post by Ilan Schnell
the C source code of Python is not included in the conda package. I
would
Post by Ilan Schnell
download the Python source code from python.org, and look up line
1252 in
Post by Ilan Schnell
Objects/obmalloc.c to see what might be going on.
The [debug] package, i.e. python-2.7.9-d1.tar.bz2 does not contain the
Python source code either. It is a build of Python which uses the
--with-pydebug option during the configuration step. This option
allows
Post by Ilan Schnell
having access to some Python internals at runtime such as
sys.gettotalrefcount().
Okay, I actually compliled my own Python with exactly that flag and it
Fatal Python error: numpy/core/src/multiarray/refcount.c:184 object at
0x7f847a6af930 has negative ref count -2604246222170760230
hmm...
Anyway, could you tell me how to install the d1 package? I'd like to try
out and it see if that one behaves differently to the one I compiled
locally, thanks!
V-
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.
Continue reading on narkive:
Loading...