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

x/tools/gopls: error getting package metadata for "builtin" package: /usr/bin/gopackagesdriver #33420

Closed
DazWilkin opened this issue Aug 1, 2019 · 1 comment
Labels
Milestone

Comments

@DazWilkin
Copy link

@DazWilkin DazWilkin commented Aug 1, 2019

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

$ go version
go version go1.12.5 linux/amd64

Does this issue reproduce with the latest release?

Visual Studio Code:

Version: 1.34.0
Commit: a622c65b2c713c890fcf4fbf07cf34049d5fe758
Date: 2019-05-15T21:55:35.507Z
Electron: 3.1.8
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.19.37-5-amd64

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/usr/local/.../dazwilkin/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/usr/local/google/home/dazwilkin/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/golang"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=".../image-transparency/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build170336520=/tmp/go-build -gno-record-gcc-switches"

What did you do?

settings.json:

{
    "go.autocompleteUnimportedPackages": true,
    "go.useLanguageServer": true,
    "[go]": {
        "editor.snippetSuggestions": "none",
        "editor.formatOnSave": true,
        "editor.codeActionsOnSave": {
            "source.organizeImports": true
        }
    },
    "gopls": {
        "usePlaceholders": true
    },
    "files.eol": "\n",
    "go.toolsEnvVars": {
        "GO111MODULE": "on",
        "GOPROXY": "https://proxy.golang.org"
    },
    "go.languageServerFlags": [
        "-rpc.trace",
        "serve",
        "--debug=localhost:6060",
    ]
}

I've been using the language server in Visual Studio Code for a few weeks and it's been working correctly, packages become underlined, I can check function signatures, goto definitions etc.

This week (since returning from a week away), I'm unable to do any of the above and receive the following error recurring:

2019/08/01 14:04:43 Debug serving
	Port = 6060
[Error - 2:04:43 PM] error getting package metadata for "builtin" package: /usr/bin/gopackagesdriver: exit status 2: runtime: running GoogleExitFunction

goroutine 1 [running]:
google3/third_party/golang/go_tools/go/packages/packages.invokeGo.func1(0xc00014b480, 0xc0003882c0, 0xc0002a3900, 0xa, 0x10, 0xc0001b6c00, 0xbf48f2daf7e9e239, 0x260854b, 0x1bc5d60)
	third_party/golang/go_tools/go/packages/golist.go:761 +0x180
google3/third_party/golang/go_tools/go/packages/packages.invokeGo(0xc00014b480, 0xc0002a3900, 0xa, 0x10, 0xc0001b65a0, 0x0, 0x0)
	third_party/golang/go_tools/go/packages/golist.go:841 +0xfe7
google3/third_party/golang/go_tools/go/packages/packages.golistDriver(0xc00014b480, 0xc000436be0, 0x1, 0x1, 0xffffffffffffffff, 0xc00027eff0, 0x203000)
	third_party/golang/go_tools/go/packages/golist.go:584 +0x99
google3/third_party/golang/go_tools/go/packages/packages.goListDriver(0xc00014b480, 0xc00000e090, 0x1, 0x1, 0x0, 0x0, 0x1bc6fe0)
	third_party/golang/go_tools/go/packages/golist.go:131 +0x335
google3/third_party/golang/go_tools/go/packages/packages.InternalDoNotCallMeGoListDriver(...)
	third_party/golang/go_tools/go/packages/google_expose_golist_driver.go:6
main.main()
	go/tools/gopackagesdriver/gopackagesdriver.go:133 +0x36e

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xda3c80]

What did you expect to see?

What did you see instead?

@gopherbot gopherbot added this to the Unreleased milestone Aug 1, 2019
@gopherbot gopherbot added the gopls label Aug 1, 2019
@stamblerre

This comment has been minimized.

Copy link
Contributor

@stamblerre stamblerre commented Aug 1, 2019

This is an internal Google bug.

@stamblerre stamblerre closed this Aug 1, 2019
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
3 participants
You can’t perform that action at this time.