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

Open
yythac opened this issue Apr 22, 2019 · 3 comments

Comments

@yythac
Copy link

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

This comment has been minimized.

Copy link

commented Apr 22, 2019

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

@yythac

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Member

commented Apr 23, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.