[zeromq-dev] authentication failure and zmq_msg_send blocking

Goswin von Brederlow goswin-v-b at web.de
Mon May 19 15:19:04 CEST 2014


I just tried building latest git and now 3 tests block:

* test_security_null
* test_security_plain
* test_security_curve

I only looked at the first so far but I believe all will be the same

test_security_null uses a DEALER socket and tests what happens when
the authenication fails using expect_bounce_fail(). The expectation is
that the send message is never recieved and gives a timeout since the
client can't authenticate.

But now the test blocks in zmq_send(), which doesn't have a timeout. I
blieve this is a side effect of the recently merged work by hutonm
concerning handing auth errors and reporting them to the client. My
guess is this causes the DEALER socket to remain in the state where it
has no available peers, which means zmq_send() blocks till there is
one (which obviously never happens).

This behaviour seems rather suboptimal to me. Wouldn't it make more
sense for zmq_send() to return an error like EAUTH or ENOPEER when all
peers of the socket have connected but got an error back? The
connections will not be retried and wouldn't work the second time
around (usualy) anyway. So zmq_send can never succeed and waiting
seems pointless.

Secondly how is the client supposed to detect authentication failures
at all?


More information about the zeromq-dev mailing list