-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Open
Labels
Description
Bug report criteria
- This bug report is not security related, security issues should be disclosed privately via [email protected].
- This is not a support request or question, support requests or questions should be raised in the etcd discussion forums.
- You have read the etcd bug reporting guidelines.
- Existing open issues along with etcd frequently asked questions have been checked and this is not a duplicate.
What happened?
Panic discovered by Antithesis testing
What did you expect to happen?
No panic
How can we reproduce it (as minimally and precisely as possible)?
Contact @marcus-hodgson-antithesis to help reproduce it on Antithesis
Anything else we need to know?
No response
Etcd version (please run commands below)
main branch
Etcd configuration (command line flags or environment variables)
paste your configuration here
Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)
$ etcdctl member list -w table
# paste output here
$ etcdctl --endpoints=<member list> endpoint status -w table
# paste output here
Relevant log output
{"level":"info","ts":"2025-07-02T17:53:12.524581Z","caller":"snap/db.go:65","msg":"saved database snapshot to disk","path":"/var/etcd/data/member/snap/0000000000000051.snap.db","bytes":24576,"size":"25 kB"}
{"level":"info","ts":"2025-07-02T17:53:12.524643Z","caller":"rafthttp/http.go:287","msg":"received and saved database snapshot","local-member-id":"dcb68c82481661be","remote-snapshot-sender-id":"99eab3685d8363a1","incoming-snapshot-index":81,"incoming-snapshot-size-bytes":24576,"incoming-snapshot-size":"25 kB","download-took":"1.602245032s"}
{"level":"info","ts":"2025-07-02T17:53:12.525182Z","logger":"raft","caller":"[email protected]/raft.go:897","msg":"dcb68c82481661be became follower at term 147"}
{"level":"info","ts":"2025-07-02T17:53:12.525209Z","logger":"raft","caller":"[email protected]/log.go:465","msg":"log [committed=79, applied=79, applying=79, unstable.offset=80, unstable.offsetInProgress=80, len(unstable.Entries)=0] starts to restore snapshot [index: 81, term: 147]"}
{"level":"info","ts":"2025-07-02T17:53:12.525245Z","logger":"raft","caller":"[email protected]/raft.go:1981","msg":"dcb68c82481661be switched to configuration voters=(3201069280892892151 11090874293180130209 15904053625288548798)"}
{"level":"info","ts":"2025-07-02T17:53:12.525340Z","logger":"raft","caller":"[email protected]/raft.go:1935","msg":"dcb68c82481661be [commit: 81, lastindex: 81, lastterm: 147] restored snapshot [index: 81, term: 147]"}
{"level":"info","ts":"2025-07-02T17:53:12.525381Z","logger":"raft","caller":"[email protected]/raft.go:1844","msg":"dcb68c82481661be [commit: 81] restored snapshot [index: 81, term: 147]"}
{"level":"info","ts":"2025-07-02T17:53:12.525408Z","logger":"raft","caller":"[email protected]/node.go:370","msg":"raft.node: dcb68c82481661be elected leader 99eab3685d8363a1 at term 147"}
{"level":"info","ts":"2025-07-02T17:53:12.525980Z","caller":"etcdserver/raft.go:276","msg":"applied incoming Raft snapshot","snapshot-index":81}
{"level":"info","ts":"2025-07-02T17:53:12.526036Z","caller":"etcdserver/server.go:1001","msg":"applying snapshot","current-snapshot-index":52,"current-applied-index":79,"incoming-leader-snapshot-index":81,"incoming-leader-snapshot-term":147}
{"level":"info","ts":"2025-07-02T17:53:12.526095Z","logger":"bbolt","caller":"backend/backend.go:203","msg":"Opening db file (/var/etcd/data/member/snap/db) with mode -rw------- and with options: {Timeout: 0s, NoGrowSync: false, NoFreelistSync: true, PreLoadFreelist: false, FreelistType: hashmap, ReadOnly: false, MmapFlags: 8000, InitialMmapSize: 10737418240, PageSize: 0, NoSync: false, OpenFile: 0x0, Mlock: false, Logger: 0xc000020d00}"}
{"level":"info","ts":"2025-07-02T17:53:12.526699Z","logger":"bbolt","caller":"runtime/panic.go:792","msg":"Opening bbolt db (/var/etcd/data/member/snap/db) successfully"}
panic: assertion failed: Page expected to be: 5, but self identifies as 0
goroutine 8052 [running]:
go.etcd.io/bbolt/internal/common.Assert(...)
go.etcd.io/[email protected]/internal/common/verify.go:65
go.etcd.io/bbolt/internal/common.(*Page).FastCheck(0x7f16ce802000, 0x5)
go.etcd.io/[email protected]/internal/common/page.go:83 +0x1d9
go.etcd.io/bbolt.(*Tx).page(0xc0010a31d0?, 0xc0002992e8?)
go.etcd.io/[email protected]/tx.go:598 +0x7b
go.etcd.io/bbolt.(*Tx).forEachPageInternal(0xc000c71340, {0xc0010a31d0, 0x1, 0xa}, 0xc0002993a0)
go.etcd.io/[email protected]/tx.go:610 +0x5a
go.etcd.io/bbolt.(*Tx).forEachPage(...)
go.etcd.io/[email protected]/tx.go:606
go.etcd.io/bbolt.(*Tx).checkInvariantProperties(0xc000c71340, 0x5, 0xc0001ee808?, 0xc00131e780?, {0x1526270, 0x1e93dc0}, 0xc001329570)
go.etcd.io/[email protected]/tx_check.go:143 +0xb2
go.etcd.io/bbolt.(*Tx).recursivelyCheckBucket(0xc000c71340, 0xc000c71358, 0xc000299640, 0xc000299588, {0x1526270, 0x1e93dc0}, 0xc001329570)
go.etcd.io/[email protected]/tx_check.go:130 +0x73
go.etcd.io/bbolt.(*DB).freepages(0xc00048cfc8)
go.etcd.io/[email protected]/db.go:1251 +0x21b
go.etcd.io/bbolt.(*DB).loadFreelist.func1()
go.etcd.io/[email protected]/db.go:422 +0xc9
sync.(*Once).doSlow(0xc000299708?, 0xc00048cfc8?)
sync/once.go:78 +0xab
sync.(*Once).Do(...)
sync/once.go:69
go.etcd.io/bbolt.(*DB).loadFreelist(0xc00048cfc8?)
go.etcd.io/[email protected]/db.go:418 +0x3b
go.etcd.io/bbolt.Open({0xc0011f2600, 0x1d}, 0x180, 0xc00136a070)
go.etcd.io/[email protected]/db.go:299 +0xb48
go.etcd.io/etcd/server/v3/storage/backend.newBackend({{0xc0011f2600, 0x1d}, 0x5f5e100, 0x2710, {0x12d2af4, 0x7}, 0x280000000, 0xc000213780, 0x0, 0x0, ...})
server/storage/backend/backend.go:203 +0x21b
go.etcd.io/etcd/server/v3/storage/backend.New({{0xc0011f2600, 0x1d}, 0x5f5e100, 0x2710, {0x12d2af4, 0x7}, 0x280000000, 0xc000213780, 0x0, 0x0, ...})
server/storage/backend/backend.go:167 +0x45
go.etcd.io/etcd/server/v3/storage.newBackend({{0xc00001203a, 0x5}, {{{0x1e93dc0, 0x0, 0x0}, 0x12a05f200, 0x77359400, 0x77359400, 0x165a0bc00, 0x0, ...}, ...}, ...}, ...)
server/storage/backend.go:55 +0x478
go.etcd.io/etcd/server/v3/storage.OpenBackend.func1()
server/storage/backend.go:76 +0x8b
created by go.etcd.io/etcd/server/v3/storage.OpenBackend in goroutine 171
server/storage/backend.go:75 +0x16f
fuweid