-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boost.ASIO integration stopped working with master #3269
Comments
There's no usage of IOCP here, so it must be something else. Probably the switch to epoll by default? Have you tried forcing back to select? |
I'm using CMake and VS2017 for the build, I don't pass any flags to CMake apart from the BUILD_TYPE=RelWithDebInfo. The output is: So it's probably not wepoll... I'll try to track down the commit, and double check on my side. |
yeah try to bisect and see what comes up |
Could you provide some example code using Boost.Asio and libzmq that reproduces this? Then I can give it a look. |
Example that reproduces the behavior.
Output:
|
Bisecting showed that 2d9a895 is the first bad commit |
I found a simple solution. In the call to WSASocket, WSA_FLAG_OVERLAPPED must also be specified. |
Issue description
Hi,
I'm using ZeroMQ and Boost.ASIO together in a Windows application. The zmq's internal signalig socket is retrieved with ZMQ_FD socket option, and passed to ASIO wrapped in a asio::ip::tcp::socket for completion handler notification. The logic is identical to the one in AZMQ: a duplicate handle is passed, no read/write performed on the ZMQ_FD socket itself. Asio is using IOCP.
This mechanism was working fine with libzmq 4.2.5 but fails master from mid august. I get an exception in the tcp::socket constructor: 'assign: The parameter is incorrect'. If I disable the IOCP backend in ASIO it starts working again. I found something similar on StackOverflow stating that the operation fails in CreateIoCompletionPort because the socket is already associated to an IOCP.
I suspect the most recent zmq poller code uses IOCP on windows and that causes the hickup with boost. I'm not familiar with IOCP's at all. Do you think this is the case? Do I have other options than disabling IOCP in either boost or libzmq?
@rodgert Did you experience this with AZMQ?
Environment
Win7 and Win10
Boost 1.62
VS2017
libzmq version (commit hash if unreleased): libzmq master aug. 15 (2cdad3d)
The text was updated successfully, but these errors were encountered: