Package: python2.7
Version: 2.7.9-2+deb8u1
Severity: normal

Dear Maintainer,

It appears that the python-gdb extensions [1] do not work with the regular 
python package in Jessie.

For example:



# gdb --args /usr/bin/python test.py

....

^C
Program received signal SIGINT, Interrupt.
0x00007ffff6fd2873 in __select_nocancel () at 
../sysdeps/unix/syscall-template.S:81
81      ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) py-bt
Python Exception <class '__main__.NullPyObjectPtr'> <__main__.PyCodeObjectPtr 
object at 0x7faf9336fb90>: 
Error occurred in Python command: <__main__.PyCodeObjectPtr object at 
0x7faf9336fb90>



I suspect the problem is something to do with the way gcc arranges/optimises 
the stack frames; for example if I go to a 'PyEval_EvalFrameEx' frame and try 
to inspect the 'f' python frame object I do not get sensible results:

(gdb) frame 4
#4  PyEval_EvalFrameEx () at ../Python/ceval.c:2679
2679    ../Python/ceval.c: No such file or directory.
(gdb) p f->ob_refcnt
$5 = 140737352679576
(gdb) frame 7
#7  PyEval_EvalFrameEx () at ../Python/ceval.c:2679
2679    in ../Python/ceval.c
(gdb) p f->ob_refcnt
$6 = 140737352693232


Other versions of python built from source give similar results. The 
unoptimised build in python2.7-dbg works fine, but has too much of a 
performance hit for me.

[1] https://wiki.python.org/moin/DebuggingWithGdb

-- System Information:
Debian Release: 8.10
  APT prefers oldstable-proposed-updates
  APT policy: (500, 'oldstable-proposed-updates'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.14.30-041430-generic (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages python2.7 depends on:
ii  libpython2.7-stdlib  2.7.9-2+deb8u1
ii  mime-support         3.58
ii  python2.7-minimal    2.7.9-2+deb8u1

python2.7 recommends no packages.

Versions of packages python2.7 suggests:
ii  binutils       2.25-5+deb8u1
pn  python2.7-doc  <none>

-- no debconf information

Reply via email to