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: runtime error: cgo argument has Go pointer to Go pointer #6

Open
zhengxiaochuan-3 opened this issue Aug 14, 2017 · 4 comments
Open

Comments

@zhengxiaochuan-3
Copy link

go version:
[root@node-65-76 nvme]# go version
go version go1.8.1 linux/amd64

goroutine 62 [running, locked to thread]:
github.com/armon/gomdb.(*Txn).Put.func1(0x7fc0d8001df0, 0xc400000002, 0xc420164490, 0xc4201644a0, 0x0, 0x0)
	/home/go-project/src/github.com/armon/gomdb/txn.go:152 +0x8b
github.com/armon/gomdb.(*Txn).Put(0xc42062a050, 0x2, 0xc420164430, 0x8, 0x8, 0xc420ea6000, 0x4d, 0x81, 0x0, 0x0, ...)
	/home/go-project/src/github.com/armon/gomdb/txn.go:152 +0xec
github.com/hashicorp/raft-mdb.(*MDBStore).StoreLogs(0xc42000c8c0, 0xc42062a038, 0x1, 0x1, 0x1, 0x1)
	/home/go-project/src/github.com/hashicorp/raft-mdb/mdb_store.go:223 +0x229
github.com/hashicorp/raft.(*Raft).dispatchLogs(0xc420190600, 0xc42006dea8, 0x1, 0x1)
	/home/go-project/src/github.com/hashicorp/raft/raft.go:1149 +0x3a3
github.com/hashicorp/raft.(*Raft).runLeader(0xc420190600)
	/home/go-project/src/github.com/hashicorp/raft/raft.go:861 +0x68a
github.com/hashicorp/raft.(*Raft).run(0xc420190600)
	/home/go-project/src/github.com/hashicorp/raft/raft.go:635 +0x84
github.com/hashicorp/raft.(*Raft).(github.com/hashicorp/raft.run)-fm()
	/home/go-project/src/github.com/hashicorp/raft/raft.go:259 +0x2a
github.com/hashicorp/raft.(*raftState).goFunc.func1(0xc420190600, 0xc42061e450)
	/home/go-project/src/github.com/hashicorp/raft/state.go:146 +0x53
created by github.com/hashicorp/raft.(*raftState).goFunc
	/home/go-project/src/github.com/hashicorp/raft/state.go:147 +0x66
2017/08/14 11:58:30 [DEBUG] raft-net: 127.0.0.1:12001 accepted connection from: 127.0.0.1:58652
panic: runtime error: cgo argument has Go pointer to Go pointer
@tylertreat
Copy link

I just ran across the same issue. I think this library might need to be updated to work with newer versions of Go?

@freeekanayaka
Copy link

@tylertreat right, it violates cgo pointer rules rules, which have always been there but now have runtime checks in Go 1.8.

Can upstream make a comment on this? It seems this bug pretty much makes the lmdb backend for the raft package unusable with Go 1.8 (and the lmdb backend is the recommended one).

@tylertreat
Copy link

FWIW, it looks like Consul uses https://github.com/hashicorp/raft-boltdb for its Raft backend, so I wonder if that is the "recommended" one now.

@freeekanayaka
Copy link

freeekanayaka commented Sep 12, 2017

@tylertreat if it's not anymore, I'd say the raft README should be updated:

"To prevent complications with cgo, the primary backend MDBStore is in a separate repository, called raft-mdb. That is the recommended implementation for the LogStore and StableStore."

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

3 participants