[zeromq-dev] Spurious unexpected message on DEALER socket

Auer, Jens jens.auer at cgi.com
Fri Jan 15 09:36:00 CET 2016


Hi Pieter,

this is just for reference if somebody else has the same problem and finds this message in the archive. I was able to reproduce and fix the issue. It is not a bug in zeroMQ. The processes were started with a port in the ephemeral port range. Most of the time this works, but when you are lucky you will start the program and the OS assigns the same port before connecting. Then, you can a TCP simultaneous connect from your client socket to the same client socket.  The test scenario was a load-testing, so many processes were started which improved our chances. The fix is to use a port not in the ephemeral range.

Best wishes,
  Jens

--
Jens Auer | CGI | Software-Engineer
CGI (Germany) GmbH & Co. KG
Rheinstraße 95 | 64295 Darmstadt | Germany
T: +49 6151 36860 154
jens.auer at cgi.com
Unsere Pflichtangaben gemäß § 35a GmbHG / §§ 161, 125a HGB finden Sie unter de.cgi.com/pflichtangaben.

CONFIDENTIALITY NOTICE: Proprietary/Confidential information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply e-mail.

________________________________________
Von: zeromq-dev-bounces at lists.zeromq.org [zeromq-dev-bounces at lists.zeromq.org]" im Auftrag von "Pieter Hintjens [ph at imatix.com]
Gesendet: Dienstag, 8. Dezember 2015 15:00
An: ZeroMQ development list
Betreff: Re: [zeromq-dev] Spurious unexpected message on DEALER socket

This is a new one. Is it possible to make a minimal case that reproduces this?

On Mon, Dec 7, 2015 at 10:33 AM, Auer, Jens <jens.auer at cgi.com> wrote:
> Hi,
>
> I have a strange case of a spurious message being received on a dealer socket which is not connected to any peers. In my setup, we have multiple processes forming a processing chain connected with PUB/SUB sockets. Each process has an additional dealer socket which can be used to send some kind of commands to the process. All processing is done in a reactor main loop with zmq_poll so there is no threading involved. In a nutshell, a process has three sockets:
> - a SUB to receive data
> - a PUB to send processed data to the next stage
> - a DEALER to receive/send commands
>
> Rarely, we see that the dealer socket receives a message, although nobody is connected to the socket. I was able to inspect the message and check the contents. It turned out that this is the probe message we send on the dealer socket to announce ourselves to the other side (which will be a router); this was before we switched to use ZMQ_PROBE_ROUTER and now an empty message is received. I have added code that overwrites the message data of the probe message after it has been sent, so I am quite sure that it is not a random pointer coincidentally pointing to that memory location. Rather, it seems that zeroMQ somehow returns the message as a newly received message.
>
> Has anybody seen this issue before?
>
> Best wishes,
>   Jens
>
> --
> Dr. Jens Auer | CGI | Software Engineer
> CGI Deutschland Ltd. & Co. KG
> Rheinstraße 95 | 64295 Darmstadt | Germany
> T: +49 6151 36860 154
> jens.auer at cgi.com
> Unsere Pflichtangaben gemäß § 35a GmbHG / §§ 161, 125a HGB finden Sie unter de.cgi.com/pflichtangaben.
>
> CONFIDENTIALITY NOTICE: Proprietary/Confidential information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply e-mail.
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev



More information about the zeromq-dev mailing list