-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: zeromq version error when tests are run with -race flag in 1.10 #23057
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
Comments
Which version of the zmq library do you have installed on the system? Did you upgrade or downgrade the zmq library while testing go1.10beta1? CC @rsc because this works with |
Nope. I have 4.2.2. I had upgraded from 4.2.1 quite some time ago. It was working fine with Go 1.9.2. I just downloaded 1.10beta1 and tried to execute my UTs and then saw this. |
Can you please post the output of Thanks. |
Also please try provoking the failure and then I thought maybe we were mishandling pkg-config output during partially cached builds, but it doesn't look like we are. It looks to me like maybe you did:
and the last command reused the built zmq package from when 4.2.1 was current, and that reused package has references to the 4.2.1 zmq4. Or maybe I have it backward. But that kind of "reuse objects even though pkg-config output changed" is my best guess right now. We know about that inadequacy in caching; if you change pkg-config you need to go clean -cache or go build -a or go install -a (before you had to go build -a or go install -a too). |
I had 4.2.2 already installed some time back. But when I saw this, I uninstalled and then reinstalled. Maybe the build step slipped in somewhere. Here is the failure output -
And this is when it passes -
I can confirm that |
When you do move between different versions of zmq, what do you use? Do you change $PKG_CONFIG_PATH or are you actually just running commands to change the default zmq library version? |
I just upgrade the Does that answer your question ? I have never touched the $PKG_CONFIG_PATH anytime. |
Yes, thanks. I was curious what we should be watching to find out that the build is stale, and it sounds like the answer is "nothing about pkg-config". If we knew the specific libzmq.so that the build used then we could watch that. That's worth knowing for the future, although I don't have any concrete plans to start doing that (it's a bit tricky). Thanks for all the information. As discussed above, I'll close this now and make sure to mention some of these things in the 'go help cache' text I still need to write. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.10beta1
Does this issue reproduce with the latest release?
It passes when I run with tip.
What operating system and processor architecture are you using (
go env
)?What did you do?
I took the 1.10 beta release out for a spin. Found that my unit tests are failing when I run with the
-race
flag.Here is a sample code -
What did you expect to see?
The test to pass with both
go test
andgo test -race
commands.What did you see instead?
Failure in
go test -race
It works fine with 1.9.2 and with the tip. So, maybe this issue can be closed. However, just wanted to bring this to notice in case there is something that I have missed.
It also works fine when the
GOCACHE
flag is set to off.The error mentions a zmq version mismatch -
zmq4 was installed with ZeroMQ version 4.2.1, but the application links with version 4.2.2
.So, just to be sure, I uninstalled and reinstalled my zmq library. And then uninstalled and reinstalled the zmq package. But still results are the same.
The text was updated successfully, but these errors were encountered: