zmq4 icon indicating copy to clipboard operation
zmq4 copied to clipboard

ZMQ error when ZMQ.Poll timeout occurs makes no sense on windows 7

Open vrecan opened this issue 10 years ago • 8 comments

Everything seems to work as expected. I am using dealers, req + reply, push + pull without any issues on windows and linux!

On windows when I am doing a poll that times out I get this error:

An attempt was made to load a program with an incorrect format.

On windows this usually means that the binary you are linking to is of a different format but it makes no sense in this case. for one it works correctly without any seen issues. We are pushing terabytes of data over push pulls without any known issues.

The other odd thing here is it seems to only happen when using a dealer socket. I have not seen this error message using REQ, REP, PUSH or PULL.

It only seems to be an incorrect / annoying message the app seems to work correctly, all my tests pass sending data between a dealer with another dealer.

vrecan avatar Jun 10 '15 02:06 vrecan

Running the tests inside of zmq4 I get these results:

$ go test -v
=== RUN: ExampleAuthStart
--- PASS: ExampleAuthStart (0.01s)
=== RUN: Example_socket_event
--- PASS: Example_socket_event (2.01s)
=== RUN: Example_test_remote_endpoint
--- PASS: Example_test_remote_endpoint (0.00s)
=== RUN: Example_version
--- PASS: Example_version (0.00s)
=== RUN: Example_multiple_contexts
--- PASS: Example_multiple_contexts (1.12s)
=== RUN: Example_test_abstract_ipc
--- PASS: Example_test_abstract_ipc (0.00s)
=== RUN: Example_test_conflate
--- PASS: Example_test_conflate (1.00s)
=== RUN: Example_test_connect_resolve
--- FAIL: Example_test_connect_resolve (2.29s)
got:
The device does not recognize the command.
The device does not recognize the command.
An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted.
Done
want:
invalid argument
invalid argument
protocol not supported
Done
=== RUN: Example_test_ctx_options
--- FAIL: Example_test_ctx_options (0.00s)
got:
false <nil>
true <nil>
false <nil>
true <nil>
true <nil>
<nil>
Done
want:
true <nil>
true <nil>
false <nil>
true <nil>
true <nil>
<nil>
Done
=== RUN: Example_test_disconnect_inproc
--- PASS: Example_test_disconnect_inproc (0.32s)
=== RUN: Example_test_fork
--- PASS: Example_test_fork (0.00s)
=== RUN: Example_test_hwm
--- FAIL: Example_test_hwm (1.07s)
got:
Default values
Send: An attempt was made to load a program with an incorrect format.
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 2000

Infinite send and receive
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 10000
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 10000

Infinite send buffer
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 10000
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 10000

Infinite receive buffer
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 10000
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 10000

Send and recv buffers hwm 1
Send: An attempt was made to load a program with an incorrect format.
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 2
Send: An attempt was made to load a program with an incorrect format.
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 2

Send hwm of 1, send before bind
Send: An attempt was made to load a program with an incorrect format.
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 1

Done
want:
Default values
Send: resource temporarily unavailable
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 2000

Infinite send and receive
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 10000
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 10000

Infinite send buffer
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 10000
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 10000

Infinite receive buffer
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 10000
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 10000

Send and recv buffers hwm 1
Send: resource temporarily unavailable
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 2
Send: resource temporarily unavailable
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 2

Send hwm of 1, send before bind
Send: resource temporarily unavailable
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 1

Done
=== RUN: Example_test_pair_ipc
--- FAIL: Example_test_pair_ipc (0.00s)
got:
C:/Users/ben.aldrich/go/src/github.com/pebbe/zmq4/zmq4_test.go:1049: An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted.
want:
Done
=== RUN: Example_test_pair_tcp
--- PASS: Example_test_pair_tcp (0.01s)
=== RUN: Example_test_security_curve
--- FAIL: Example_test_security_curve (4.62s)
got:
An attempt was made to load a program with an incorrect format.
An attempt was made to load a program with an incorrect format.
An attempt was made to load a program with an incorrect format.
An attempt was made to load a program with an incorrect format.
Done
Handler closed
Reactor finished
want:
resource temporarily unavailable
resource temporarily unavailable
resource temporarily unavailable
resource temporarily unavailable
Done
Handler closed
Reactor finished
=== RUN: Example_test_security_null
--- FAIL: Example_test_security_null (1.21s)
got:
An attempt was made to load a program with an incorrect format.
Done
Handler closed
Reactor finished
want:
resource temporarily unavailable
Done
Handler closed
Reactor finished
=== RUN: Example_test_security_plain
--- FAIL: Example_test_security_plain (1.20s)
got:
An attempt was made to load a program with an incorrect format.
Done
Handler closed
Reactor finished
want:
resource temporarily unavailable
Done
Handler closed
Reactor finished
FAIL
exit status 1
FAIL    github.com/pebbe/zmq4   14.953s

Have you ever seen this before?

vrecan avatar Jun 14 '15 07:06 vrecan

got same error here

$go test -v
=== RUN   ExampleAuthStart
--- PASS: ExampleAuthStart (0.03s)
=== RUN   Example_socket_event
--- PASS: Example_socket_event (2.01s)
=== RUN   Example_test_remote_endpoint
--- PASS: Example_test_remote_endpoint (0.01s)
=== RUN   Example_test_version
--- PASS: Example_test_version (0.00s)
=== RUN   Example_multiple_contexts
--- PASS: Example_multiple_contexts (1.18s)
=== RUN   Example_test_abstract_ipc
--- PASS: Example_test_abstract_ipc (0.00s)
=== RUN   Example_test_conflate
--- FAIL: Example_test_conflate (0.01s)
got:
D:/Code/golang/src/github.com/pebbe/zmq4/zmq4_test.go:279: The data is invalid.
want:
Done
=== RUN   Example_test_connect_resolve
--- FAIL: Example_test_connect_resolve (0.02s)
got:
The device does not recognize the command.
The device does not recognize the command.
An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted.
Done
want:
invalid argument
invalid argument
protocol not supported
Done
=== RUN   Example_test_ctx_options
--- FAIL: Example_test_ctx_options (0.00s)
got:
false <nil>
true <nil>
false <nil>
true <nil>
true <nil>
<nil>
Done
want:
true <nil>
true <nil>
false <nil>
true <nil>
true <nil>
<nil>
Done
=== RUN   Example_test_disconnect_inproc
--- PASS: Example_test_disconnect_inproc (0.32s)
=== RUN   Example_test_fork
--- PASS: Example_test_fork (0.01s)
=== RUN   Example_test_hwm
--- FAIL: Example_test_hwm (1.63s)
got:
Default values
Send: An attempt was made to load a program with an incorrect format.
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 2000

Infinite send and receive
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 10000
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 10000

Infinite send buffer
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 10000
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 10000

Infinite receive buffer
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 10000
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 10000

Send and recv buffers hwm 1
Send: An attempt was made to load a program with an incorrect format.
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 2
Send: An attempt was made to load a program with an incorrect format.
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 2

Send hwm of 1, send before bind
Send: An attempt was made to load a program with an incorrect format.
Recv: An attempt was made to load a program with an incorrect format.
send_count == recv_count: true
count: 1

Done
want:
Default values
Send: resource temporarily unavailable
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 2000

Infinite send and receive
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 10000
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 10000

Infinite send buffer
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 10000
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 10000

Infinite receive buffer
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 10000
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 10000

Send and recv buffers hwm 1
Send: resource temporarily unavailable
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 2
Send: resource temporarily unavailable
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 2

Send hwm of 1, send before bind
Send: resource temporarily unavailable
Recv: resource temporarily unavailable
send_count == recv_count: true
count: 1

Done
=== RUN   Example_test_pair_ipc
--- FAIL: Example_test_pair_ipc (0.00s)
got:
D:/Code/golang/src/github.com/pebbe/zmq4/zmq4_test.go:1049: An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted.
want:
Done
=== RUN   Example_test_pair_tcp
--- PASS: Example_test_pair_tcp (0.03s)
=== RUN   Example_test_security_curve
--- FAIL: Example_test_security_curve (4.65s)
got:
An attempt was made to load a program with an incorrect format.
An attempt was made to load a program with an incorrect format.
An attempt was made to load a program with an incorrect format.
An attempt was made to load a program with an incorrect format.
Done
Handler closed
Reactor finished
want:
resource temporarily unavailable
resource temporarily unavailable
resource temporarily unavailable
resource temporarily unavailable
Done
Handler closed
Reactor finished
=== RUN   Example_test_security_null
--- FAIL: Example_test_security_null (1.27s)
got:
An attempt was made to load a program with an incorrect format.
Done
Handler closed
Reactor finished
want:
resource temporarily unavailable
Done
Handler closed
Reactor finished
=== RUN   Example_test_security_plain
--- FAIL: Example_test_security_plain (1.23s)
got:
An attempt was made to load a program with an incorrect format.
Done
Handler closed
Reactor finished
want:
resource temporarily unavailable
Done
Handler closed
Reactor finished
FAIL
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
exit status 1
FAIL    github.com/pebbe/zmq4   12.796s

ensonmj avatar Sep 11 '15 04:09 ensonmj

I changed the tests. Can you try again?

pebbe avatar Sep 11 '15 09:09 pebbe

after update,there are fewer error

$go test -v
=== RUN   ExampleAuthStart
--- PASS: ExampleAuthStart (0.02s)
=== RUN   Example_socket_event
--- PASS: Example_socket_event (2.00s)
=== RUN   Example_test_remote_endpoint
--- PASS: Example_test_remote_endpoint (0.00s)
=== RUN   Example_test_version
--- PASS: Example_test_version (0.00s)
=== RUN   Example_multiple_contexts
--- PASS: Example_multiple_contexts (1.25s)
=== RUN   Example_test_abstract_ipc
--- PASS: Example_test_abstract_ipc (0.00s)
=== RUN   Example_test_conflate
--- FAIL: Example_test_conflate (0.01s)
got:
D:/Code/golang/src/github.com/pebbe/zmq4/zmq4_test.go:283: The data is invalid.
want:
Done
=== RUN   Example_test_connect_resolve
--- PASS: Example_test_connect_resolve (0.01s)
=== RUN   Example_test_ctx_options
--- FAIL: Example_test_ctx_options (0.00s)
got:
false <nil>
true <nil>
false <nil>
true <nil>
true <nil>
<nil>
Done
want:
true <nil>
true <nil>
false <nil>
true <nil>
true <nil>
<nil>
Done
=== RUN   Example_test_disconnect_inproc
--- PASS: Example_test_disconnect_inproc (0.32s)
=== RUN   Example_test_fork
--- PASS: Example_test_fork (0.03s)
=== RUN   Example_test_hwm
--- PASS: Example_test_hwm (1.58s)
=== RUN   Example_test_pair_ipc
--- FAIL: Example_test_pair_ipc (0.01s)
got:
D:/Code/golang/src/github.com/pebbe/zmq4/zmq4_test.go:1033: An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted.
want:
Done
=== RUN   Example_test_pair_tcp
--- PASS: Example_test_pair_tcp (0.02s)
=== RUN   Example_test_security_curve
--- PASS: Example_test_security_curve (4.64s)
=== RUN   Example_test_security_null
--- PASS: Example_test_security_null (1.27s)
=== RUN   Example_test_security_plain
--- PASS: Example_test_security_plain (1.20s)
FAIL
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
exit status 1
FAIL    github.com/pebbe/zmq4   12.630

ensonmj avatar Sep 11 '15 10:09 ensonmj

I use req-rep in my code, and got "An attempt was made to load a program with an incorect format" for Recv(0) when nothing Send but if send a msg, recv can got the msg

ensonmj avatar Sep 11 '15 10:09 ensonmj

Did you install ZeroMQ from source? Can you run make check in the source directory of ZeroMQ?

pebbe avatar Sep 11 '15 11:09 pebbe

Maybe this can help. I can't determine if this is real help or an attempt for you to use some malware. http://www.repair-pcerror.com/blog/repair-error-code-135-how-to-fix-an-attempt-was-made-to-use-a-join-or-subst-command-on-a-drive-that-has-already-been-substituted-pc-error

pebbe avatar Sep 11 '15 11:09 pebbe

I install zeromq from msys2 and can't complie the src caused that no configure file in src directory and run ./autogen.sh failed

ensonmj avatar Sep 12 '15 08:09 ensonmj