On Mon, 2018-08-13 at 14:52 +0800, 纪明 wrote:
> Hi all:
> 
>      We are using ZMQ to do some multicast work. The service keep 
> crashing, and we found it has something to do with pgm_receiver.
> 
>      Specifically, there is a function called 
> zmq::pgm_receiver_t::restart_input(), when it receives some data, it 
> calls decoder to decode the message. On line 132, it checks if the 
> message size is greater than zero. If yes, it will call
> process_input() 
> function to decode the message. However, when insize is greater than 
> zero, inpos could point to null. When this happens, zmq crashes when 
> calling memcpy to copy something to the memory that inpos points to. 
> This actually looks like a threading issue to us.
> 
>      We really appreciate if anyone familiar with this zmq could
> point 
> out a solution to this. We are using zmq in a real time environment, 
> occassional message drop is more acceptable than crashing the
> service. 
> We tried to change the source code a little bit, from "if (insize >
> 0)" 
> to "if (insize > 0 && inpos)". It caused other problem.
> 
> Thanks a lot in advance.
> Ming

Are you using a socket from multiple threads by any chance?

-- 
Kind regards,
Luca Boccassi

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
zeromq-dev mailing list
[email protected]
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to