Repository navigation
Bind only missing ZeroMQ endpoints - #2829
Open
MichaelHuth wants to merge 2 commits into
Open
MichaelHuth wants to merge 2 commits into
MichaelHuth wants to merge 2 commits into
Conversation
MichaelHuth
force-pushed
the
feature/2829-zeromq-bound-endpoints
branch
2 times, most recently
from
November 9, 2026 10:41
2ae99a9 to
587e566
Compare
StartZeroMQSockets can't tell whether a failed bind means that this Igor Pro instance or another process holds the endpoint. The ZeroMQ XOP now returns the endpoints it has bound with zeromq_get_bound_endpoints(), added in its PR 84. PR 89 fixes a hang of this function: it waited for the mutex of the server socket, which the thread of a running message handler takes again every 1 ms, so Igor Pro could hang for good. The XOP also fixes lost CallFunction replies when several clients are connected, e.g. two Igor Pro instances, and adds a receive timeout for zeromq_client_recv() in PR 83, and fixes the clang-tidy findings in PR 85. With PR 75, errors of the zmq library are no longer printed to the history but only returned as runtime errors. The Windows and macOS XOPs are the Release builds from the CI package job of ZeroMQ-XOP main at d9173ee4 (Merge pull request #89 from AllenInstitute/mh_fix_endpoint_list_starvation, 2026-11-10), which includes PRs 83, 84, 85, 75 and 89. The help file is unchanged since PR 85, and CHI_CheckInstallation checks the hash of the new Windows XOP.
MichaelHuth
force-pushed
the
feature/2829-zeromq-bound-endpoints
branch
from
November 10, 2026 18:16
587e566 to
a27e23d
Compare
Since 9aaf9f2 (Wrap zeromq_stop() in its own function, adding a restart if the Igor Pro Bridge, 2026-08-19) StartZeroMQSockets binds the MIES endpoints also when another package, e.g. the Igor Pro Bridge, already started the message handler. A failed bind was treated as the endpoint being bound by MIES in this Igor Pro instance, as the ZeroMQ XOP could not tell otherwise. When a second Igor Pro instance holds the endpoint, MIES therefore reported success without listening on it. The ZeroMQ XOP now returns the endpoints it has bound with zeromq_get_bound_endpoints(). StartZeroMQSockets only binds the MIES endpoints missing from that list, so a failed bind is a real error. It names the endpoint and returns the error, but keeps the endpoints of the other packages if they started the message handler. The socket types for zeromq_get_bound_endpoints() are added to the copy of ZeroMQ_Interop.ipf.
MichaelHuth
force-pushed
the
feature/2829-zeromq-bound-endpoints
branch
from
November 10, 2026 18:20
a27e23d to
9564d3f
Compare
t-b
approved these changes
Nov 10, 2026
t-b
enabled auto-merge
November 10, 2026 19:38
Collaborator
|
Review: 7e251b8 (XOPs: Update the ZeroMQ XOP, 2026-10-30)
9564d3f (StartZeroMQSockets: Bind only the endpoints missing in this instance, 2026-10-30) Looks good. I've filed byte-physics/igortest#513 to make that nicer in the future. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Uses the Zeromq XOP from AllenInstitute/ZeroMQ-XOP#85 in the first commit.
StartZeroMQSockets could not tell whether a failed bind meant that this Igor Pro instance or another process holds the MIES endpoint, so it treated every failed bind as "already bound". With a second Igor Pro instance holding the port, MIES reported success without listening on it.
Changes
CHI_CheckInstallation.StartZeroMQSocketsasks the XOP for its bound endpoints with the newzeromq_get_bound_endpoints()and only binds the missing MIES endpoints. A failed bind is now reported as an error, naming the endpoint. The endpoints of other packages using the XOP, e.g. the Igor Pro Bridge, stay untouched.The Zeromq XOP added by this PR also fixes #2823
close #2823