[zeromq-dev] zmq "bug"

Matus Hamorsky mhamorsky at gmail.com
Mon Dec 22 15:08:45 CET 2008


Comments inlined

On Mon, Dec 22, 2008 at 2:49 PM, Martin Sustrik <sustrik at fastmq.com> wrote:
> Comments inlined:
>
>> zmq_server &
>> ./q_test.py
>> ./q_send.py Q_TEST hello
>>  -- q_test prints 'hello'
>> killall zmq_server
>
> At this point q_test still runs, however, there is no directory service
> (zmq_server) running that is able to identify actual location of q_test on
> the network.

True, but the problem is that I need to reach that non-responding
process. The q_test process is still running correctly and I need
either to work after restarting the zmq_server or to terminate
gracefully (to close all files, transactions, connections etc.).

Maybe if zmq_server stored the queue:port bindings in a persistent manner,
such as shared memory or like, so the information would persist
between zmq_server restarts.

>> ./q_send.py Q_TEST hello
>
> I would expect q_send to fail here as it cannot access zmq_server. Am I
> right?


true,

~/zmq/report|0|$ ./qsend.py Q_TEST hello
Connection refused
rc != -1 (tcp_socket.cpp:153)
Aborted

but after I restart zmq_server and run it again ...

>
>>  -- q_test IS STILL RUNNING but prints nothing
>
> q_test prints nothing because q_send failed.

... q_test prints nothing but q_send fails with

python2.6: api_thread.cpp:151: void zmq::api_thread_t::bind(const
char*, const char*, zmq::i_thread*, zmq::i_thread*): Assertion `false'
failed.
Aborted

>>  -- I start zmq_server again
>> zmq_server &
>
>>  -- Ctrl-C to q_test.py does nothing.
>
> This is pretty strange. We'll have a look at it.

the receive() I am using is blocking.

>> I try to terminate it with an
>> 'EXIT' message
>> ./q_send.py Q_TEST EXIT
>> ~/zmq/report|0|$ ./qsend.py Q_TEST EXIT
>> python2.6: api_thread.cpp:151: void zmq::api_thread_t::bind(const
>> char*, const char*, zmq::i_thread*, zmq::i_thread*): Assertion `false'
>> failed.
>> Aborted
>>
>> THE BUG: q_test.py is now hanging. no new q_test.py can be launched
>> b/c the port is in use:
>>
>> ~/zmq/report|0|$ ./q_test.py
>> Address already in use
>> rc == 0 (tcp_listener.cpp:125)
>> Aborted
>
> Thanks for reporting the problem!
> Martin
>

no problem :)

m



More information about the zeromq-dev mailing list