Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault in zbeacon.new() #5

Closed
mhaberler opened this issue Nov 18, 2013 · 3 comments
Closed

segfault in zbeacon.new() #5

mhaberler opened this issue Nov 18, 2013 · 3 comments

Comments

@mhaberler
Copy link
Member

not sure why - happens to me on jessie as well as lucid:

mah@wheezy:~/src/czmq$ gdb python
GNU gdb (GDB) 7.6.1 (Debian 7.6.1-1)
Copyright (C) 2013 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 "i486-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/bin/python2.7...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/python
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
Python 2.7.5+ (default, Sep 17 2013, 17:31:54)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import pyczmq
pyczmq.zmq.version()
(4, 1, 0)
from pyczmq import zbeacon
service_beacon = zbeacon.new(10042)

Program received signal SIGSEGV, Segmentation fault.
zctx__socket_new (self=self@entry=0x273a, type=type@entry=0) at zctx.c:326
326 if (!self->context) {
(gdb) backtrace
#0 zctx__socket_new (self=self@entry=0x273a, type=type@entry=0) at zctx.c:326
#1 0xb774ef89 in zctx__socket_pipe (self=self@entry=0x273a) at zctx.c:364
#2 0xb7762c9e in zthread_fork (ctx=ctx@entry=0x273a, thread_fn=thread_fn@entry=0xb774a390 <s_agent_task>, args=args@entry=0x0)

at zthread.c:182

#3 0xb774ac51 in zbeacon_new (ctx=0x273a, port_nbr=137740368) at zbeacon.c:108
#4 0xb79ea58a in ffi_call_SYSV () from /usr/lib/i386-linux-gnu/libffi.so.5
#5 0xb79ea20d in ffi_call () from /usr/lib/i386-linux-gnu/libffi.so.5
#6 0xb7fccead in cdata_call (cd=0x87079e0, args=0x870dbac, kwds=0x0) at c/_cffi_backend.c:2323
#7 0x08151f9d in PyEval_EvalFrameEx ()
#8 0x081a5392 in ?? ()
#9 0x08153536 in PyEval_EvalFrameEx ()
#10 0x08189972 in PyEval_EvalCodeEx ()
#11 0x08151ac4 in PyEval_EvalFrameEx ()
#12 0x08189972 in PyEval_EvalCodeEx ()
#13 0x081efa97 in PyEval_EvalCode ()
#14 0x081f419d in ?? ()
#15 0x080ac9f9 in PyRun_InteractiveOneFlags ()
#16 0x080acb2e in PyRun_InteractiveLoopFlags ()
#17 0x080ad2ca in PyRun_AnyFileExFlags ()
#18 0x080adf5e in Py_Main ()
#19 0x080ae03d in main ()

(gdb)

@michelp
Copy link
Contributor

michelp commented Nov 18, 2013

Hey Michael,

I can't reproduce this on 12.04 LTS, the code you pasted works fine. libzmq 4.0.1, czmq 2.0.3, pyczmq master, and the stock python-dev and libffi-dev packages.

@claws
Copy link
Member

claws commented Nov 19, 2013

I confirm I observe the error on 12.04.3 LTS using the current github master of libsodium, libzmq, czmq & pyczmq.

The cause is that the constructor of the zbeacon class in czmq was updated recently (~13 days ago) to take a zctx. We'll need to update pyczmq accordingly.

@claws claws mentioned this issue Nov 19, 2013
@mhaberler
Copy link
Member Author

btw there's another regression relative to czmq master:

tests.test_zauth.test_zauth ... python: zsockopt.c:455: zsocket_set_curve_secretkey_bin: Assertion `rc == 0 || zmq_errno () == (156384712 + 53)' failed.
Aborted (core dumped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants