#StackBounty: #python #python-2.7 #debugging #gdb #deadlock Debugging running python app using gdb in python mode does not work

Bounty: 50

I have a multithreaded python application running using virtualenv and I can not properly attach to it using gdb. I want to debug the deadlock and I think this is the only way I can do this with because the app is too huge and I can not reproduce the issue in develop environment.
I have installed python2.7-dbg and then trying to run debugging with gdb /home/PATHTOVENV/venv/bin/python 30183. Here is the output:

GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/PATHTOVENV/venv/bin/python...(no debugging symbols found)...done.
Attaching to program: /home/PATHTOVENV/venv/bin/python, process 30183
Reading symbols from /lib/x86_64-linux-gnu/libpthread.so.0...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libpthread-2.19.so...done.
done.
[New LWP 30326]
[New LWP 30325]
[New LWP 30324]
[New LWP 30323]
[New LWP 30322]
[New LWP 30321]
[New LWP 30320]
[New LWP 30319]
[New LWP 30318]
[New LWP 30317]
[New LWP 30316]
[New LWP 30315]
[New LWP 30314]
[New LWP 30313]
[New LWP 30312]
[New LWP 30311]
[New LWP 30310]
[New LWP 30309]
[New LWP 30308]
[New LWP 30307]
[New LWP 30306]
[New LWP 30305]
[New LWP 30304]
[New LWP 30302]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Loaded symbols for /lib/x86_64-linux-gnu/libpthread.so.0
Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libc-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libc.so.6
Reading symbols from /lib/x86_64-linux-gnu/libdl.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libdl-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libdl.so.2
Reading symbols from /lib/x86_64-linux-gnu/libutil.so.1...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libutil-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libutil.so.1
Reading symbols from /lib/x86_64-linux-gnu/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libz.so.1
Reading symbols from /lib/x86_64-linux-gnu/libm.so.6...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libm-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libm.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/ld-2.19.so...done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/lxml/etree.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/lxml/etree.so
Reading symbols from /usr/lib/x86_64-linux-gnu/libxslt.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libxslt.so.1
Reading symbols from /usr/lib/x86_64-linux-gnu/libexslt.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libexslt.so.0
Reading symbols from /usr/lib/x86_64-linux-gnu/libxml2.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libxml2.so.2
Reading symbols from /lib/x86_64-linux-gnu/libgcrypt.so.11...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libgcrypt.so.11
Reading symbols from /lib/x86_64-linux-gnu/liblzma.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/liblzma.so.5
Reading symbols from /lib/x86_64-linux-gnu/libgpg-error.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libgpg-error.so.0
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_hashlib.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/_hashlib.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_hashlib.x86_64-linux-gnu.so
Reading symbols from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/datetime.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/datetime.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/datetime.x86_64-linux-gnu.so
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so
Reading symbols from /usr/lib/x86_64-linux-gnu/libffi.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libffi.so.6
Reading symbols from /lib/x86_64-linux-gnu/libuuid.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libuuid.so.1
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_ssl.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/_ssl.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_ssl.x86_64-linux-gnu.so
Reading symbols from /lib/x86_64-linux-gnu/libssl.so.1.0.0...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libssl.so.1.0.0
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/bson/_cbson.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/bson/_cbson.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/pymongo/_cmessage.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/pymongo/_cmessage.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/greenlet.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/greenlet.so
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_csv.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/_csv.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_csv.x86_64-linux-gnu.so
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_json.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/_json.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_json.x86_64-linux-gnu.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/cchardet/_cchardet.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/cchardet/_cchardet.so
Reading symbols from /usr/lib/x86_64-linux-gnu/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libstdc++.so.6
Reading symbols from /lib/x86_64-linux-gnu/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libgcc_s.so.1
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/_yaml.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/_yaml.so
Reading symbols from /usr/lib/x86_64-linux-gnu/libyaml-0.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libyaml-0.so.2
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_elementtree.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/_elementtree.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_elementtree.x86_64-linux-gnu.so
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so
Reading symbols from /lib/x86_64-linux-gnu/libexpat.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libexpat.so.1
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/datrie.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/datrie.so
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/parser.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/parser.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/parser.x86_64-linux-gnu.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/simplejson/_speedups.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/simplejson/_speedups.so
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_multiprocessing.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/_multiprocessing.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_multiprocessing.x86_64-linux-gnu.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/thrift/protocol/fastbinary.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/thrift/protocol/fastbinary.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/hiredis/hiredis.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/hiredis/hiredis.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/tornado/speedups.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/tornado/speedups.so
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_curses.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/_curses.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_curses.x86_64-linux-gnu.so
Reading symbols from /lib/x86_64-linux-gnu/libncursesw.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libncursesw.so.5
Reading symbols from /lib/x86_64-linux-gnu/libtinfo.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libtinfo.so.5
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/zope/interface/_zope_interface_coptimizations.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/zope/interface/_zope_interface_coptimizations.so
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/termios.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/termios.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/termios.x86_64-linux-gnu.so
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/resource.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/resource.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/resource.x86_64-linux-gnu.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/_psutil_linux.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/_psutil_linux.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/_psutil_posix.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/_psutil_posix.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/_pydevd_bundle/pydevd_cython.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/_pydevd_bundle/pydevd_cython.so
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_sqlite3.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/_sqlite3.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_sqlite3.x86_64-linux-gnu.so
Reading symbols from /usr/lib/x86_64-linux-gnu/libsqlite3.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libsqlite3.so.0
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_lsprof.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/_lsprof.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/_lsprof.x86_64-linux-gnu.so
Reading symbols from /lib/x86_64-linux-gnu/libnss_files.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libnss_files-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_files.so.2
Reading symbols from /lib/x86_64-linux-gnu/libnss_dns.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libnss_dns-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_dns.so.2
Reading symbols from /lib/x86_64-linux-gnu/libresolv.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libresolv-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libresolv.so.2
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/dawg.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/dawg.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/PIL/_imaging.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/PIL/_imaging.so
Reading symbols from /usr/lib/x86_64-linux-gnu/libjpeg.so.8...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libjpeg.so.8
Reading symbols from /usr/lib/x86_64-linux-gnu/libtiff.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libtiff.so.5
Reading symbols from /usr/lib/x86_64-linux-gnu/libjbig.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libjbig.so.0
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/mmap.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/mmap.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/mmap.x86_64-linux-gnu.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/maxminddb/extension.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/maxminddb/extension.so
Reading symbols from /usr/lib/x86_64-linux-gnu/libmaxminddb.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libmaxminddb.so.0
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/core/multiarray.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/core/multiarray.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/core/umath.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/core/umath.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/core/_dotblas.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/core/_dotblas.so
Reading symbols from /usr/lib/libcblas.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libcblas.so.3
Reading symbols from /usr/lib/libatlas.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libatlas.so.3
Reading symbols from /usr/lib/x86_64-linux-gnu/libgfortran.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libgfortran.so.3
Reading symbols from /usr/lib/x86_64-linux-gnu/libquadmath.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libquadmath.so.0
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/core/scalarmath.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/core/scalarmath.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/lib/_compiled_base.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/lib/_compiled_base.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/linalg/lapack_lite.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/linalg/lapack_lite.so
Reading symbols from /usr/lib/liblapack.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/liblapack.so.3
Reading symbols from /usr/lib/libf77blas.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libf77blas.so.3
Reading symbols from /usr/lib/libblas.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libblas.so.3
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/linalg/_umath_linalg.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/linalg/_umath_linalg.so
Reading symbols from /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/future_builtins.x86_64-linux-gnu.so...Reading symbols from /usr/lib/debug/usr/lib/python2.7/lib-dynload/future_builtins.x86_64-linux-gnu.so...done.
done.
Loaded symbols for /home/PATHTOVENV/venv/lib/python2.7/lib-dynload/future_builtins.x86_64-linux-gnu.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/fft/fftpack_lite.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/fft/fftpack_lite.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/random/mtrand.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/numpy/random/mtrand.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/_path.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/_path.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/ft2font.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/ft2font.so
Reading symbols from /usr/lib/x86_64-linux-gnu/libfreetype.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libfreetype.so.6
Reading symbols from /lib/x86_64-linux-gnu/libpng12.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libpng12.so.0
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/_png.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/_png.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/_cntr.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/_cntr.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/_image.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/_image.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/_tri.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/_tri.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/_qhull.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/_qhull.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/backends/_backend_agg.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/matplotlib/backends/_backend_agg.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/PIL/_imagingft.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/PIL/_imagingft.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/Crypto/Util/_counter.so...(no debugging symbols found)...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/Crypto/Util/_counter.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/Crypto/Cipher/_AES.so...(no debugging symbols found)...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/Crypto/Cipher/_AES.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/Crypto/Util/strxor.so...(no debugging symbols found)...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/Crypto/Util/strxor.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/_geohash.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/_geohash.so
Reading symbols from /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/bx/intervals/intersection.so...done.
Loaded symbols for /home/PATHTOVENV/venv/local/lib/python2.7/site-packages/bx/intervals/intersection.so
Reading symbols from /usr/lib/x86_64-linux-gnu/gconv/CP1251.so...Reading symbols from /usr/lib/debug//usr/lib/x86_64-linux-gnu/gconv/CP1251.so...done.
done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/gconv/CP1251.so
sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
85  ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S: No such file or directory.
(gdb) info thread
  Id   Target Id         Frame 
  25   Thread 0x7f08551db700 (LWP 30302) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  24   Thread 0x7f08541d9700 (LWP 30304) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  23   Thread 0x7f08539d8700 (LWP 30305) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  22   Thread 0x7f08531d7700 (LWP 30306) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  21   Thread 0x7f08529d6700 (LWP 30307) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  20   Thread 0x7f08521d5700 (LWP 30308) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  19   Thread 0x7f08519d4700 (LWP 30309) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  18   Thread 0x7f08511d3700 (LWP 30310) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  17   Thread 0x7f08509d2700 (LWP 30311) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  16   Thread 0x7f08501d1700 (LWP 30312) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  15   Thread 0x7f084f9d0700 (LWP 30313) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  14   Thread 0x7f084f1cf700 (LWP 30314) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  13   Thread 0x7f084e9ce700 (LWP 30315) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  12   Thread 0x7f084e1cd700 (LWP 30316) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  11   Thread 0x7f084d9cc700 (LWP 30317) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  10   Thread 0x7f084d1cb700 (LWP 30318) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  9    Thread 0x7f084c9ca700 (LWP 30319) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  8    Thread 0x7f084c1c9700 (LWP 30320) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  7    Thread 0x7f084b9c8700 (LWP 30321) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  6    Thread 0x7f084b1c7700 (LWP 30322) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  5    Thread 0x7f084a9c6700 (LWP 30323) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  4    Thread 0x7f084a1c5700 (LWP 30324) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  3    Thread 0x7f08499c4700 (LWP 30325) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  2    Thread 0x7f08491c3700 (LWP 30326) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
* 1    Thread 0x7f0903832740 (LWP 30183) "python" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85

The gdb sees all the threads and their sem_wait state but I can not use python helpers for GDB:

(gdb) py-list
Undefined command: "py-list".  Try "help".

OS Ubuntu 14.04, python 2.7.
I have tried different hacks I had googled (like linking python-dbg.py into virtualenv bin directory) but with no profit, may be I have do it wrong way…


Get this bounty!!!