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

panic: unknown export format version 6 ("version 6") #510

Open
OneOfOne opened this issue Apr 15, 2018 · 8 comments
Open

panic: unknown export format version 6 ("version 6") #510

OneOfOne opened this issue Apr 15, 2018 · 8 comments

Comments

@OneOfOne
Copy link

go version devel +49e3e436e7 2018-04-14 21:59:08 +0000 linux/amd64

@quasilyte
Copy link

Confirming this issue.

panic: unknown export format version 6 ("version 6")
1(runtime.call32): ~/go/src/runtime/asm_amd64.s:545
2(runtime.gopanic): ~/go/src/runtime/panic.go:494
3(main.(*gc_bin_parser).parse_export): ~/gotools/src/github.com/nsf/gocode/package_bin.go:126
4(main.(*package_file_cache).process_package_data): ~/gotools/src/github.com/nsf/gocode/package.go:132
5(main.(*package_file_cache).update_cache): ~/gotools/src/github.com/nsf/gocode/package.go:92
6(main.update_packages.func1): ~/gotools/src/github.com/nsf/gocode/autocompletecontext.go:455
7(runtime.goexit): ~/go/src/runtime/asm_amd64.s:1356

~/go is GOROOT.
~/gotools is GOPATH that is used for installed gocode.

@mattn
Copy link
Contributor

mattn commented Apr 19, 2018

please try @zchee's PR. #512

@quasilyte
Copy link

See $GOROOT/src/cmd/compile/internal/gc/bexport.go:

// Current export format version. Increase with each format change.
// 6: package height (CL 105038)
// 5: improved position encoding efficiency (issue 20080, CL 41619)
// 4: type name objects support type aliases, uses aliasTag
// 3: Go1.8 encoding (same as version 2, aliasTag defined but never used)
// 2: removed unused bool in ODCL export (compiler only)
// 1: header format change (more regular), export package for _ struct fields
// 0: Go1.7 encoding
const exportVersion = 6

git blame:
07029254 (Matthew Dempsky 2018-04-05 14:29:32 -0700 145) const exportVersion = 6

https://go-review.googlesource.com/105038

@quasilyte
Copy link

@mattn, I will, thanks.
Didn't know there is PR already.

@quasilyte
Copy link

quasilyte commented Apr 19, 2018

PR fixes the problem on go tip.

@OneOfOne
Copy link
Author

I can confirm the PR fixes the issue for me on go version devel +c63e047dac 2018-04-19 17:13:21 +0000 linux/amd64.

@fsouza
Copy link

fsouza commented Apr 28, 2018

Indeed that PR fixed the original issue for me, but now I'm seeing a different panic on go version devel +adb52cff58 Fri Apr 27 20:57:51 2018 +0000 darwin/amd64 😞

2018/04/28 12:55:01 -------------------------------------------------------
2018/04/28 12:55:01 Found "os" at "/Users/fsouza/.gimme/versions/go/pkg/darwin_amd64/os.a"
2018/04/28 12:55:01 Found "os/user" at "/Users/fsouza/.gimme/versions/go/pkg/darwin_amd64/os/user.a"
2018/04/28 12:55:01 Error parsing input file (inner block):
2018/04/28 12:55:01  8:8: expected selector or type assertion, found ';'
panic: unknown export format version -1 ("i\x00\xbe\x03\xfa\x02\x1d$GOROOT/src/os/user/lookup.go\x00\x04User\busername\x03uid\x04name\x05Group\x03gid\x1b$GOROOT/src/os/user/user.go\x03Uid\x03Gid\bUsername\x04Name\aHomeDir\bGroupIds\x01u\aesc:0x9\x05Error\x01e\x12UnknownUserIdError\x10UnknownUserError\aesc:0x1\x13user: unknown user \x13UnknownGroupIdError\x17group: unknown groupid \x11UnknownGroupError\x15group: unknown group \x0f<autogenerated>\x04user\aCurrent\x06Lookup\vLookupGroup\rLookupGroupId\bLookupId\x04init\x17UnknownGroupError.Error\x19UnknownGroupIdError.Error\x16UnknownUserError.Error\x00\x1f\x1e\x01 F\u007f\x14\x00\x00\x02\x00\x1e#\x00\x1e\x13\x1e\x00F\u007f8\x00\x01\x00$\x10\x02\x00\x1e#\x00\x1e\x13\x00\x1e\x1e\x00F\u007fJ\x00\x01\x00-\x10\x02\x00\x1e#\x00\x1e\x13\x00\x1e\x1e\x00\x006\x1e\x01YF\u007f\\\x00\x01\x001\x10\x02\x00\x1e\\\x00\x1e\x13\x00\x1e\x1e\x00F\u007fh\x00\x01\x00<\x10\x02\x00\x1e\\\x00\x1e\x13\x00\x1e\x1e\x00\a\x1e\x05\u007fD@\\\x10\x00\x1e")
1(runtime.call32): /Users/fsouza/.gimme/versions/go/src/runtime/asm_amd64.s:545
2(runtime.gopanic): /Users/fsouza/.gimme/versions/go/src/runtime/panic.go:494
3(main.(*gc_bin_parser).parse_export): /Users/fsouza/src/github.com/nsf/gocode/package_bin.go:126
4(main.(*package_file_cache).process_package_data): /Users/fsouza/src/github.com/nsf/gocode/package.go:132
5(main.(*package_file_cache).update_cache): /Users/fsouza/src/github.com/nsf/gocode/package.go:92
6(main.update_packages.func1): /Users/fsouza/src/github.com/nsf/gocode/autocompletecontext.go:455
7(runtime.goexit): /Users/fsouza/.gimme/versions/go/src/runtime/asm_amd64.s:1356

panic: One of the package cache updaters panicked
1(runtime.call32): /Users/fsouza/.gimme/versions/go/src/runtime/asm_amd64.s:545
2(runtime.gopanic): /Users/fsouza/.gimme/versions/go/src/runtime/panic.go:494
3(main.update_packages): /Users/fsouza/src/github.com/nsf/gocode/autocompletecontext.go:463
4(main.(*auto_complete_context).update_caches): /Users/fsouza/src/github.com/nsf/gocode/autocompletecontext.go:178
5(main.(*auto_complete_context).apropos): /Users/fsouza/src/github.com/nsf/gocode/autocompletecontext.go:360
6(main.server_auto_complete): /Users/fsouza/src/github.com/nsf/gocode/server.go:202
7(main.(*RPC).RPC_auto_complete): /Users/fsouza/src/github.com/nsf/gocode/rpc.go:26
8(runtime.call64): /Users/fsouza/.gimme/versions/go/src/runtime/asm_amd64.s:546
9(reflect.Value.call): /Users/fsouza/.gimme/versions/go/src/reflect/value.go:447
10(reflect.Value.Call): /Users/fsouza/.gimme/versions/go/src/reflect/value.go:308
11(net/rpc.(*service).call): /Users/fsouza/.gimme/versions/go/src/net/rpc/server.go:384
12(runtime.goexit): /Users/fsouza/.gimme/versions/go/src/runtime/asm_amd64.s:1356

panic: unknown export format version -1 ("i\x00\xf9.\xe0O\x15$GOROOT/src/os/env.go\x01s\amapping\x00\aesc:0x1\x03key\x05value\x17$GOROOT/src/os/error.go\x02Op\x04Path\x03Err\x05Error\x01e\tPathError\aTimeout\aesc:0x9\aSyscall\fSyscallError\asyscall\x03err\x16$GOROOT/src/os/exec.go\x03Pid\x06handle\x06isdone\x05sigMu\aRWMutex\x04sync\asetDone\x01p\aProcess\x04done\aRelease\x04Kill\x04Wait\fProcessState\x06Signal\x03sig\x1c$GOROOT/src/os/exec_posix.go\x04kill\x1b$GOROOT/src/os/exec_unix.go\x04wait\x02ps\x06signal\arelease\x1c$GOROOT/src/os/wait_unimp.go\x12blockUntilWaitable\x03Dir\x03Env\x05Files\x04File\x03Sys\vSysProcAttr\x06String\x03pid\x04name\x04argv\x04attr\bProcAttr\x06status")
1(runtime.call32): /Users/fsouza/.gimme/versions/go/src/runtime/asm_amd64.s:545
2(runtime.gopanic): /Users/fsouza/.gimme/versions/go/src/runtime/panic.go:494
3(main.(*gc_bin_parser).parse_export): /Users/fsouza/src/github.com/nsf/gocode/package_bin.go:126
4(main.(*package_file_cache).process_package_data): /Users/fsouza/src/github.com/nsf/gocode/package.go:132
5(main.(*package_file_cache).update_cache): /Users/fsouza/src/github.com/nsf/gocode/package.go:92
6(main.update_packages.func1): /Users/fsouza/src/github.com/nsf/gocode/autocompletecontext.go:455
7(runtime.goexit): /Users/fsouza/.gimme/versions/go/src/runtime/asm_amd64.s:1356

@quasilyte
Copy link

quasilyte commented Apr 29, 2018

@fsouza, you're right. Thanks for details.
Mentioned pull request includes comments that refer to that problem.
#512 (comment)

The main options I see are:

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

No branches or pull requests

4 participants