Skip to content
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

plugin: using coverpkg when testing results in plugin version mismatch #23410

Open
jdef opened this issue Jan 11, 2018 · 6 comments
Open

plugin: using coverpkg when testing results in plugin version mismatch #23410

jdef opened this issue Jan 11, 2018 · 6 comments

Comments

@jdef
Copy link

@jdef jdef commented Jan 11, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

1.9.2

Does this issue reproduce with the latest release?

yes - 1.9.2 is the latest, stable release

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/vagrant/pluginbugs"
GORACE=""
GOROOT="/usr/local/go-1.9.2"
GOTOOLDIR="/usr/local/go-1.9.2/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build917652042=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

https://github.com/jdef/plugins1/blob/master/README.md

What did you expect to see?

  • all tests pass successfully

What did you see instead?

  • the go test invocation using -coverpkg fails with "plugin was built with a different version of package..." message
@bradfitz

This comment has been minimized.

Copy link
Contributor

@bradfitz bradfitz commented Jan 11, 2018

Please try go1.10beta1 or go1.10beta2, which should be out later today.

@bradfitz

This comment has been minimized.

Copy link
Contributor

@bradfitz bradfitz commented Jan 11, 2018

Actually, I can reproduce with Go tip (~Go 1.10 beta2).

@bradfitz bradfitz added NeedsFix and removed WaitingForInfo labels Jan 11, 2018
@bradfitz bradfitz added this to the Go1.11 milestone Jan 11, 2018
@bradfitz

This comment has been minimized.

Copy link
Contributor

@bradfitz bradfitz commented Jan 11, 2018

/cc @crawshaw

@sabin-rapan

This comment has been minimized.

Copy link
Contributor

@sabin-rapan sabin-rapan commented Jan 21, 2018

Hello,

I started investigating this issue. Found where the panic is issued from and managed to print the plugin link hash. Can't seem to print the runtime hash though. Any tips/pointers?
Also, can I get this issue assigned to me?

@sabin-rapan

This comment has been minimized.

Copy link
Contributor

@sabin-rapan sabin-rapan commented Jan 28, 2018

After further investigations, I have found that this issue is related somewhat to #17928 and #17832.

The -coverpkg flag modifies the package foo and rebuilds it, hence the different version error when opening the plugin.

Someone with more expertise needs to chime in on this. Ping @crawshaw

@ianlancetaylor ianlancetaylor modified the milestones: Go1.11, Unplanned Jun 27, 2018
@wenjingLi729

This comment has been minimized.

Copy link

@wenjingLi729 wenjingLi729 commented Nov 27, 2019

I have also encountered this problem. Are there any solutions yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.