[Bug python/21366] Python script causes GDB core dump

dwjbosman at yahoo dot com sourceware-bugzilla@sourceware.org
Tue Apr 11 09:58:00 GMT 2017


https://sourceware.org/bugzilla/show_bug.cgi?id=21366

--- Comment #2 from Dinne Bosman <dwjbosman at yahoo dot com> ---
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/special/tmp/bin/arm-none-eabi-gdb --command
test_error.py'.

(test_error.py is the following program:

import sys
import os
import zmq
c = zmq.Context.instance()
s = c.socket(zmq.ROUTER)
print(s)
s.bind_to_random_port("tcp://127.0.0.1")
print("works")
sys.exit(0)

)

Program terminated with signal SIGABRT, Aborted.
The backtrace of commit 5809899dad253e2fefcb6f7ae57a6f43cfa4e3c5:

#0  0x00007f3d64eeb067 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f3d64eec448 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007f3d6349ef78 in _Unwind_SetGR (context=<optimized out>,
index=<optimized out>, val=<optimized out>) at
/gcc-build/libgcc/unwind-dw2.c:271
#3  0x00007f3d63734c62 in __gxx_personality_v0 () from
/opt/conda/envs/gdb_ipykernel/lib/libstdc++.so.6
#4  0x00000000008bd653 in _Unwind_RaiseException_Phase2 ()
#5  0x00000000008bde97 in _Unwind_Resume ()
#6  0x0000000000892b0a in std::ostreambuf_iterator<char, std::char_traits<char>
> std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
>::_M_insert_int<unsigned long>(std::ostreambuf_iterator<char,
std::char_traits<char> >, std::ios_base&, char, unsigned long) const ()
#7  0x0000000000892b1d in std::num_put<char, std::ostreambuf_iterator<char,
std::char_traits<char> > >::do_put(std::ostreambuf_iterator<char,
std::char_traits<char> >, std::ios_base&, char, unsigned long) const ()
#8  0x00007f3d637b18ea in std::ostream& std::ostream::_M_insert<unsigned
long>(unsigned long) () from /opt/conda/envs/gdb_ipykernel/lib/libstdc++.so.6
#9  0x00007f3d63aab1e9 in operator<< (__n=0, this=<optimized out>) at
/usr/include/c++/4.9/ostream:185
#10 zmq::tcp_address_t::to_string (this=this@entry=0x16b5f60, addr_=...) at
src/tcp_address.cpp:523
#11 0x00007f3d63aae04d in zmq::tcp_listener_t::set_address
(this=this@entry=0x16b5c20, addr_=<optimized out>) at src/tcp_listener.cpp:222
#12 0x00007f3d63aa0680 in zmq::socket_base_t::bind (this=0x16b55b0,
addr_=addr_@entry=0x7f3d64ab13d0 "tcp://127.0.0.1:*") at
src/socket_base.cpp:407
#13 0x00007f3d63ab34c9 in zmq_bind (s_=<optimized out>,
addr_=addr_@entry=0x7f3d64ab13d0 "tcp://127.0.0.1:*") at src/zmq.cpp:305
#14 0x00007f3d62c4e864 in __pyx_pf_3zmq_7backend_6cython_6socket_6Socket_12bind
(__pyx_v_addr=0x7f3d64ab13b0, __pyx_v_self=0x7f3d62c0ffa8) at
zmq/backend/cython/socket.c:5433
#15 __pyx_pw_3zmq_7backend_6cython_6socket_6Socket_13bind
(__pyx_v_self=0x7f3d62c0ffa8, __pyx_v_addr=<optimized out>) at
zmq/backend/cython/socket.c:5294
#16 0x00007f3d6328d696 in __Pyx_CyFunction_CallMethod (kw=<optimized out>,
arg=0x7f3d64d10c18, self=0x7f3d62c0ffa8, func=0x7f3d649ebb10) at
zmq/backend/cython/error.c:1965
#17 __Pyx_CyFunction_CallAsMethod (func=0x7f3d649ebb10, args=<optimized out>,
kw=<optimized out>) at zmq/backend/cython/error.c:2004
#18 0x00007f3d65a04236 in PyObject_Call (func=0x7f3d649ebb10, arg=<optimized
out>, kw=<optimized out>) at Objects/abstract.c:2165
#19 0x00007f3d65ade314 in do_call (nk=<optimized out>, na=2,
pp_stack=0x7ffcbc5fe2e8, func=0x7f3d649ebb10) at Python/ceval.c:4936
#20 call_function (oparg=<optimized out>, pp_stack=0x7ffcbc5fe2e8) at
Python/ceval.c:4732
#21 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at
Python/ceval.c:3236
#22 0x00007f3d65ae1b49 in _PyEval_EvalCodeWithName (_co=<optimized out>,
globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
argcount=2, kws=0x7f3d64db6ba8, kwcount=0, defs=0x7f3d62c394e0, defcount=3,
kwdefs=0x0, closure=0x0, name=0x7f3d64a5d348, qualname=0x7f3d62c29df0) at
Python/ceval.c:4018
#23 0x00007f3d65ae0df5 in fast_function (nk=<optimized out>, na=2, n=<optimized
out>, pp_stack=0x7ffcbc5fe508, func=0x7f3d62c3c0d0) at Python/ceval.c:4813
#24 call_function (oparg=<optimized out>, pp_stack=0x7ffcbc5fe508) at
Python/ceval.c:4730
#25 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at
Python/ceval.c:3236
#26 0x00007f3d65ae1b49 in _PyEval_EvalCodeWithName (_co=<optimized out>,
globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0,
name=0x0, qualname=0x0) at Python/ceval.c:4018
#27 0x00007f3d65ae1cd8 in PyEval_EvalCodeEx (_co=<optimized out>,
globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0, defcount=0,
kwdefs=0x0, closure=0x0) at Python/ceval.c:4039
#28 0x00007f3d65ae1d1b in PyEval_EvalCode (co=<optimized out>,
globals=<optimized out>, locals=<optimized out>) at Python/ceval.c:777
#29 0x00007f3d65b07020 in run_mod (arena=0x15bcfb0, flags=0x0,
locals=0x7f3d64e63248, globals=0x7f3d64e63248, filename=0x7f3d6499b3b0,
mod=0x15f73f0) at Python/pythonrun.c:976
#30 PyRun_FileExFlags (fp=0x15bcd10, filename_str=<optimized out>,
start=<optimized out>, globals=0x7f3d64e63248, locals=0x7f3d64e63248,
closeit=<optimized out>, flags=0x0) at Python/pythonrun.c:929
#31 0x00007f3d65b08623 in PyRun_SimpleFileExFlags (fp=0x15bcd10,
filename=<optimized out>, closeit=0, flags=0x0) at Python/pythonrun.c:396
#32 0x000000000049192e in python_run_simple_file (file=0x15bcd10,
filename=0x7ffcbc60090e "test_error.py") at ./python/python.c:379
#33 0x0000000000492b50 in gdbpy_source_script (extlang=0x8df9c0
<extension_language_python>, file=0x15bcd10, filename=0x7ffcbc60090e
"test_error.py") at ./python/python.c:911
#34 0x000000000046d5f5 in source_script_from_stream (stream=0x15bcd10,
file=0x7ffcbc60090e "test_error.py", file_to_open=0x7ffcbc60090e
"test_error.py") at ./cli/cli-cmds.c:577
#35 0x000000000046d6e8 in source_script_with_search (file=0x7ffcbc60090e
"test_error.py", from_tty=1, search_path=0) at ./cli/cli-cmds.c:630
#36 0x000000000046d71b in source_script (file=0x7ffcbc60090e "test_error.py",
from_tty=1) at ./cli/cli-cmds.c:640
#37 0x00000000005a9de5 in catch_command_errors_const (command=0x46d6f6
<source_script(char const*, int)>, arg=0x7ffcbc60090e "test_error.py",
from_tty=1) at main.c:402
#38 0x00000000005ab142 in captured_main (data=0x7ffcbc5feaa0) at main.c:1124
#39 0x00000000005ab206 in gdb_main (args=0x7ffcbc5feaa0) at main.c:1161
#40 0x000000000040d43d in main (argc=3, argv=0x7ffcbc5feba8) at gdb.c:32

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list