Navigation Menu

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

"etcd/clientv3" new() function lead to "fatal error: bad symbol table" #31610

Closed
yythac opened this issue Apr 22, 2019 · 4 comments
Closed

"etcd/clientv3" new() function lead to "fatal error: bad symbol table" #31610

yythac opened this issue Apr 22, 2019 · 4 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@yythac
Copy link

yythac commented Apr 22, 2019

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

$ go version
go version go1.11.4 windows/386

Does this issue reproduce with the latest release?

yes

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

go env Output
$ go env
set GOARCH=386
set GOBIN=
set GOCACHE=C:\Users\yuyutang\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=386
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\yuyutang\go
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_386
set GCCGO=gccgo
set GO386=sse2
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m32 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\yuyutang\AppData\Local\Temp\go-build1165024
86=/tmp/go-build -gno-record-gcc-switches

What did you do?

using etcd/clientv3" new() function to connect to ectd servers.

What did you expect to see?

connect to etcd server successfully!

What did you see instead?

runtime: pcdata is -2 and 11 locals stack map entries for crypto/aes.newCipherGeneric (targetpc=0x54b927)
fatal error: bad symbol table

runtime stack:
runtime.throw(0xd5b33a, 0x10)
C:/Go/src/runtime/panic.go:608 +0x64
runtime.getStackMap(0x35fcfbb4, 0x35fcfc34, 0xba3701, 0xef72d, 0x54b928, 0x35fcfab8, 0xd8a901)
C:/Go/src/runtime/stack.go:1210 +0x5af
runtime.adjustframe(0x35fcfbb4, 0x35fcfc28, 0xba3701)
C:/Go/src/runtime/stack.go:628 +0x5b
runtime.gentraceback(0xffffffff, 0xffffffff, 0x0, 0x13953b20, 0x0, 0x0, 0x7fffffff, 0xd897cc, 0x35fcfc28, 0x0, ...)
C:/Go/src/runtime/traceback.go:325 +0x10a8
runtime.copystack(0x13953b20, 0x2000, 0xba3700)
C:/Go/src/runtime/stack.go:845 +0x1d4
runtime.shrinkstack(0x13953b20)
C:/Go/src/runtime/stack.go:1104 +0x11c
runtime.scanstack(0x13953b20, 0x1382c960)
C:/Go/src/runtime/mgcmark.go:770 +0x1da
runtime.scang(0x13953b20, 0x1382c960)
C:/Go/src/runtime/proc.go:947 +0x201
runtime.markroot.func1()
C:/Go/src/runtime/mgcmark.go:264 +0x58
runtime.markroot(0x1382c960, 0x40)
C:/Go/src/runtime/mgcmark.go:245 +0x1ac
runtime.gcDrain(0x1382c960, 0x5)
C:/Go/src/runtime/mgcmark.go:882 +0x119
runtime.gcBgMarkWorker.func2()
C:/Go/src/runtime/mgc.go:1839 +0x6b
runtime.systemstack(0x35fcff24)
C:/Go/src/runtime/asm_386.s:396 +0x53
runtime.mstart()
C:/Go/src/runtime/proc.go:1229

@julieqiu
Copy link
Member

@yythac would you mind providing a code sample of how you were using the etcd/clientv3" new() function?

@julieqiu julieqiu added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Apr 22, 2019
@yythac
Copy link
Author

yythac commented Apr 23, 2019

Not every time lead to "fatal error: bad symbol table", there is about 30% probability of error

import(
	etcdclient "github.com/coreos/etcd/clientv3"
)

func (this *EtcdCluster) Connect () error {
	// load cert
       cert, err := tls.LoadX509KeyPair(this.etcdConfig.Etcd_client_pem, this.etcdConfig.Etcd_client_key_pem)
	if err != nil {
		return  err
	}
	// load root ca
	caData, err := ioutil.ReadFile(this.etcdConfig.Etcd_ca_pem)
	if err != nil {
		return  err
	}
	pool := x509.NewCertPool()
	pool.AppendCertsFromPEM(caData)

	_tlsConfig := &tls.Config{
		Certificates: []tls.Certificate{cert},
		RootCAs:      pool,
	}

	cfg := etcdclient.Config{
		Endpoints: this.etcdConfig.Etcd_dsn,
		TLS:       _tlsConfig,
		DialTimeout:ETCD_CONNECT_TIMEOUT,
		AutoSyncInterval: time.Second * 300,
	}

	client, err := etcdclient.New(cfg)
	if err != nil {
		return err
	}
	time.Sleep(5*time.Second)
	this.kapi = client
	return nil
}

@agnivade
Copy link
Contributor

@yythac - Please give us a complete program which we can run to reproduce the issue, not a part of the code.

@ALTree
Copy link
Member

ALTree commented Jun 18, 2021

This has been in waiting for info for more than 2 years, it was reported against a version of Go that is no longer supported, and we still don't have a reproducer, so let's archive this. If it comes out again on a recent Go version we can open a new issue.

@ALTree ALTree closed this as completed Jun 18, 2021
@golang golang locked and limited conversation to collaborators Jun 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants