-
Notifications
You must be signed in to change notification settings - Fork 32
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
Stopping embedded etcd server panics #30
Comments
https://github.com/coreos/etcd/blob/master/mvcc/kvstore.go#L325-L328 calls func (s *store) Hash() (uint32, int64, error) {
s.mu.Lock()
defer s.mu.Unlock()
s.b.ForceCommit()
func (tx *Tx) Size() int64 {
// tx.meta == nil, tx.db == nil
return int64(tx.meta.pgid) * int64(tx.db.pageSize)
} |
https://github.com/boltdb/bolt/blob/master/tx.go#L228 calls func (tx *Tx) Commit() error {
// Finalize the transaction.
tx.close() And func (tx *Tx) close() {
// Clear all references.
tx.db = nil
tx.meta = nil
tx.root = Bucket{tx: tx}
tx.pages = nil So the concurrent func (tx *Tx) Size() int64 {
// tx.meta == nil, tx.db == nil
return int64(tx.meta.pgid) * int64(tx.db.pageSize)
}
|
Reported boltdb/bolt#606 |
gyuho
added a commit
to gyuho/etcd
that referenced
this issue
Oct 18, 2016
Newly created *batchTx from 'newBatchTx' returns after *batchTx.Commit() where boltdb internally initializes *bolt.Tx.meta and *bolt.Tx.db as nil. So subsequent *bolt.Tx.Size call would panic with nil pointer reference. Fix etcd-io/etcdlabs#30.
gyuho
added a commit
to gyuho/etcd
that referenced
this issue
Oct 18, 2016
Newly created *batchTx from 'newBatchTx' returns after *batchTx.Commit() where boltdb internally initializes *bolt.Tx.meta and *bolt.Tx.db as nil. So subsequent *bolt.Tx.Size call would panic with nil pointer reference. Fix etcd-io/etcdlabs#30.
|
gyuho
added a commit
to gyuho/etcd
that referenced
this issue
Oct 20, 2016
gyuho
added a commit
to gyuho/etcd
that referenced
this issue
Oct 20, 2016
gyuho
added a commit
to gyuho/etcd
that referenced
this issue
Oct 20, 2016
mvcc/backend: add panic test case for racey Size() Fix etcd-io/etcdlabs#30.
gyuho
added a commit
to gyuho/etcd
that referenced
this issue
Oct 20, 2016
mvcc/backend: add panic test case for racey Size() Fix etcd-io/etcdlabs#30.
gyuho
added a commit
to gyuho/etcd
that referenced
this issue
Oct 21, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: