zeromq / zbroker

Elastic pipes
Mozilla Public License 2.0
50 stars 11 forks source link

Problem: zpipes_client_new asserts on rapid open #59

Closed rpedde closed 10 years ago

rpedde commented 10 years ago

Trying to repo another problem I ran into this one:

in quick succession: open writer on hosta open reader on hostb open writer on hosta

second writer open asserts:

zpipes_client.c:76: zpipes_client_new: Assertion `0' failed.
Aborted

Animate data:

14-05-02 17:07:01    420: start:
14-05-02 17:07:01    420:     OUTPUT
14-05-02 17:07:01    420:         $ lookup or create pipe
14-05-02 17:07:01    420:         $ open pipe writer
14-05-02 17:07:01    420:         > before writing
14-05-02 17:07:01    420: before writing:
14-05-02 17:07:01    420:     ok
14-05-02 17:07:01    420:         $ send OUTPUT_OK
14-05-02 17:07:01    420:         > writing
14-05-02 17:07:01    421: start:
14-05-02 17:07:01    421:     INPUT
14-05-02 17:07:01    421:         $ lookup or create pipe
14-05-02 17:07:01    421:         $ open pipe reader
14-05-02 17:07:01    421:         > before reading
14-05-02 17:07:01    421: before reading:
14-05-02 17:07:01    421:     error
14-05-02 17:07:01    421:         $ send INPUT_FAILED
14-05-02 17:07:01    421:         $ terminate
14-05-02 17:07:11    420: writing:
14-05-02 17:07:11    420:     expired
14-05-02 17:07:11    420:         $ close pipe writer
14-05-02 17:07:11    420:         $ terminate

I suspect this comment is wrong:

    {
        zpipes_msg_send_input (self->dealer, pipe_name);
        if (s_expect_reply (self, ZPIPES_MSG_INPUT_OK))
            assert (false);     //  Cannot happen in current use case                                                                                                                                                                                          
    }

:)

rpedde commented 10 years ago

this may be related to #60