Assertion failed: rc == 0 (connect_session.cpp:96)

Description

When I create PGM or EPGM socket with the wrong URL and try to use it, zeromq asserts in my face. It should return error instead.

Steps to reproduce (in Lua):

1 2 3 4 5 6 7 8 9 10 11 12 $ lua -l zmq -e 'print("V:", unpack(zmq.version())) ctx=zmq.init(2) c=assert(ctx:socket(zmq.SUB)) print("E:", c:bind("pgm://127.0.0.1:5555"))' V: 2 1 4 E: true nil Warn: Interface lo reports as a loopback device. Warn: Interface lo reports as a non-multicast capable device. Error: PGM protocol requires CAP_NET_RAW capability, e.g. sudo execcap 'cap_net_raw=ep' Warn: Close on IP Router Alert (RFC 2113) send socket failed: Bad file descriptor Assertion failed: rc == 0 (connect_session.cpp:96) Aborted

Another one:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 $ luajit2 -l zmq -e ' print("V:", unpack(zmq.version())) ctx=zmq.init(2) c=assert(ctx:socket(zmq.SUB)) print("E:", c:bind("epgm://eth0;172.16.150.255:5555")) print("recv") c:recv() print("closing") c:close() print("term") ctx:term() print("done") ' V: 2 1 4 E: true nil recv Assertion failed: rc == 0 (connect_session.cpp:96) Aborted

Info about system:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 $ uname -a Linux ubuntu 2.6.35-28-generic #49-Ubuntu SMP Tue Mar 1 14:40:58 UTC 2011 i686 GNU/Linux $ lua -v Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio $ luarocks show lua-zmq lua-zmq scm-1 - Lua bindings to zeromq2, with LuaJIT2 FFI support. License: MIT/X11 Homepage: http://github.com/Neopallium/lua-zmq Installed in: /usr/local Modules: zmq.poller zmq

Here is a link to the same issue in lua-zmq project:

https://github.com/Neopallium/lua-zmq/issues/8

Environment

None

Status

Assignee

Unassigned

Reporter

agladysh

Labels

None

Priority