zeromq / cppzmq

Header-only C++ binding for libzmq
http://www.zeromq.org
MIT License
1.94k stars 757 forks source link

crash with `inproc` mode #498

Open navono opened 3 years ago

navono commented 3 years ago

OS: Win10 Version: cppzmq: 4.7.1

Follow the pubsub_multithread_inproc.cpp code, everything is OK, but if I move the subscriber to dll and when some conditions are met, exit the thread, then process crash.

I have a reproduce repo in here. Any suggestions?

mq1

mq2

navono commented 3 years ago

Dig some info in stackoverflow, not very precisely, but I guess is that the ctx value passed cross module caused. Currently, just change inproc to tcp also work(need change ctx io threads to non-zero value).

jlucke86 commented 3 years ago

I was sure I read somewhere that inproc:// is not supported on windows. Is it now supported?

aviallon commented 2 years ago

@jlucke86 No, it's ipc, as mentioned here: http://api.zeromq.org/2-1:zmq-ipc

The inter-process transport is currently only implemented on operating systems that provide UNIX domain sockets.