[zeromq-dev] Spurious unexpected message on DEALER socket

Auer, Jens jens.auer at cgi.com
Mon Dec 7 10:33:14 CET 2015


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.





More information about the zeromq-dev mailing list