cockroachdb / cockroachdb/pebble
assignment to entry in nil map in v1.1.5
- Dominant language
- Go
- Stars
- 6k
- Forks
- 584
- Avg merge
- 16h 35m
- Merged PRs (30d)
- 5
Description
pebbledb v1.1.5 is used to replace the goleveldb in cosmos project. it panic @assignment to entry in nil map. which looks like https://github.com/cockroachdb/pebble/issues/3205 and https://github.com/cockroachdb/pebble/issues/1833.
Does pebbbledb v1.1.5 has the patch for 3205?
```sh
panic: assignment to entry in nil map
goroutine 159 [running]:
github.com/cockroachdb/pebble.(*tableCacheShard).addNode(0xc002750840, 0xc0634b0b70, 0xc002754008)
/go/pkg/mod/github.com/cockroachdb/pebble@v1.1.5/table_cache.go:865 +0x77
github.com/cockroachdb/pebble.(*tableCacheShard).findNodeInternal(0xc002750840, 0xc017884180, 0xc002754008)
/go/pkg/mod/github.com/cockroachdb/pebble@v1.1.5/table_cache.go:796 +0x2bb
github.com/cockroachdb/pebble.(*tableCacheShard).findNode(...)
/go/pkg/mod/github.com/cockroachdb/pebble@v1.1.5/table_cache.go:746
github.com/cockroachdb/pebble.(*tableCacheShard).newIters(0xc002750840, {0x5477320, 0x814fca0}, 0xc017884180, 0xc03c1330e8, {0x0, 0x0, 0x0, {0x0, 0x0}}, ...)
/go/pkg/mod/github.com/cockroachdb/pebble@v1.1.5/table_cache.go:435 +0x85
github.com/cockroachdb/pebble.(*tableCacheContainer).newIters(0xc03c133230?, {0x5477320?, 0x814fca0?}, 0x0?, 0x0?, {0x0, 0x0, 0x0, {0x0, 0x0}})
/go/pkg/mod/github.com/cockroachdb/pebble@v1.1.5/table_cache.go:137 +0x6e
github.com/cockroachdb/pebble.(*levelIter).loadFile(0xc03c133080, 0xc017884180, 0x1)
/go/pkg/mod/github.com/cockroachdb/pebble@v1.1.5/level_iter.go:678 +0x2b0
github.com/cockroachdb/pebble.(*levelIter).SeekPrefixGE(0xc03c133080, {0xc078c1a260, 0x19, 0x20}, {0xc078c1a260, 0x19, 0x20}, 0x0)
/go/pkg/mod/github.com/cockroachdb/pebble@v1.1.5/level_iter.go:761 +0xb7
github.com/cockroachdb/pebble.(*getIter).Next(0xc03c133018)
/go/pkg/mod/github.com/cockroachdb/pebble@v1.1.5/get_iter.go:207 +0xc12
github.com/cockroachdb/pebble.(*getIter).First(0xc00b9074f8?)
/go/pkg/mod/github.com/cockroachdb/pebble@v1.1.5/get_iter.go:65 +0x13
github.com/cockroachdb/pebble.(*Iterator).iterFirstWithinBounds(0xc03c132a88)
/go/pkg/mod/github.com/cockroachdb/pebble@v1.1.5/iterator.go:2024 +0xcf
github.com/cockroachdb/pebble.(*Iterator).First(0xc03c132a88)
/go/pkg/mod/github.com/cockroachdb/pebble@v1.1.5/iterator.go:1622 +0xe5
github.com/cockroachdb/pebble.(*DB).getInternal(0xc003468908, {0xc078c1a260, 0x19, 0x20}, 0x0, 0x0)
/go/pkg/mod/github.com/cockroachdb/pebble@v1.1.5/db.go:592 +0x3ad
github.com/cockroachdb/pebble.(*DB).Get(...)
/go/pkg/mod/github.com/cockroachdb/pebble@v1.1.5/db.go:520
github.com/cosmos/cosmos-sdk/server.(*ExtendedPebbleDB).Get(0xc08aba7e60?, {0xc078c1a260?, 0x0?, 0x7462630bc458?})
/go/pkg/mod/github.com/antexprotocol/cosmos-sdk-antex@v0.1.26/server/pebble_wrapper.go:47 +0x5c
github.com/cosmos/cosmos-db.(*PrefixDB).Get(0xc004d2d650, {0xc08aba7e50, 0xd, 0xc00b907c01?})
/go/pkg/mod/github.com/cosmos/cosmos-db@v1.1.1/prefixdb.go:32 +0xf9
github.com/cosmos/iavl.(*nodeDB).GetRoot(0xc0030ec870, 0x24bfc)
/go/pkg/mod/github.com/cosmos/iavl@v1.2.2/nodedb.go:905 +0x282
github.com/cosmos/iavl.(*nodeDB).traverseOrphans(0xc0030ec870, 0x24bfb, 0xd?, 0xc00b907e30)
/go/pkg/mod/github.com/cosmos/iavl@v1.2.2/nodedb.go:1074 +0x29
github.com/cosmos/iavl.(*nodeDB).deleteVersion(0xc0030ec870, 0x24bfb)
/go/pkg/mod/github.com/cosmos/iavl@v1.2.2/nodedb.go:427 +0x8d
github.com/cosmos/iavl.(*nodeDB).deleteVersionsTo(0xc0030ec870, 0x24bff)
/go/pkg/mod/github.com/cosmos/iavl@v1.2.2/nodedb.go:690 +0x435
github.com/cosmos/iavl.(*nodeDB).startPruning(0xc0030ec870)
/go/pkg/mod/github.com/cosmos/iavl@v1.2.2/nodedb.go:617 +0xdc
created by github.com/cosmos/iavl.newNodeDB in goroutine 1
/go/pkg/mod/github.com/cosmos/iavl@v1.2.2/nodedb.go:124 +0x5a5
2025/10/31 11:24:59 [JOB 1] WAL file /app/.antex/data/application.db/000060.log with log number 000060 stopped reading at offset: 51903086; replayed 752452 keys in 78876 batches
2025/10/31 11:24:59 [JOB 1] WAL file /app/.antex/data/blockstore.db/002179.log with log number 002179 stopped reading at offset: 1209727; replayed 3156 keys in 526 batches
2025/10/31 11:24:59 [JOB 1] WAL file /app/.antex/data/state.db/001532.log with log number 001532 stopped reading at offset: 2082218; replayed 1568 keys in 940 batches
2025/10/31 11:24:59 [JOB 1] WAL file /app/.antex/data/tx_index.db/014080.log with log number 014080 stopped reading at offset: 203505; replayed 2754 keys in 51 batches
2025/10/31 11:24:59 [JOB 1] WAL file /app/.antex/data/evidence.db/000002.log with log number 000002 stopped reading at offset: 0; replayed 0 keys in 0 batches
2025/10/31 13:44:45 [JOB 1] WAL file /app/.antex/data/application.db/000096.log with log number 000096 stopped reading at offset: 1741779; replayed 26878 keys in 1801 batches
2025/10/31 13:44:45 [JOB 1] WAL file /app/.antex/data/blockstore.db/003113.log with log number 003113 stopped reading at offset: 443387; replayed 582 keys in 97 batches
2025/10/31 13:44:45 [JOB 1] WAL file /app/.antex/data/state.db/002616.log with log number 002616 stopped reading at offset: 701360; replayed 350 keys in 210 batches
2025/10/31 13:44:45 [JOB 1] WAL file /app/.antex/data/tx_index.db/027195.log with log number 027195 stopped reading at offset: 769496; replayed 6478 keys in 126 batches
2025/10/31 13:44:45 [JOB 1] WAL file /app/.antex/data/evidence.db/000004.log with log number 000004 stopped reading at offset: 0; replayed 0 keys in 0 batches
2025/11/01 02:52:32 [JOB 1] WAL file /app/.antex/data/application.db/000108.log with log number 000108 stopped reading at offset: 43719705; replayed 704279 keys in 39020 batches
2025/11/01 02:52:33 [JOB 1] WAL file /app/.antex/data/blockstore.db/003834.log with log number 003834 stopped reading at offset: 3980216; replayed 138 keys in 23 batches
2025/11/01 02:52:33 [JOB 1] WAL file /app/.antex/data/state.db/002812.log with log number 002812 stopped reading at offset: 644763; replayed 25 keys in 15 batches
2025/11/01 02:52:33 [JOB 1] WAL file /app/.antex/data/tx_index.db/029648.log with log number 029648 stopped reading at offset: 2030622; replayed 7069 keys in 11 batches
2025/11/01 02:52:33 [JOB 1] WAL file /app/.antex/data/evidence.db/000007.log with log number 000007 stopped reading at offset: 0; replayed 0 keys in 0 batches
```
Jira issue: PEBBLE-1245
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with table_cache.go at the addNode and findNodeInternal frames in the v1.1.5 stack trace, then compare that code with the fixes discussed in cockroachdb/pebble issues 3205 and 1833. Reproduce the panic through the DB.Get and iterator path if possible, and determine whether v1.1.5 contains the relevant fix; done means the nil-map assignment is explained and a verified resolution or upgrade path is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100