Skip to content

Panic due to failed assertion #1011

@VihasMakwana

Description

@VihasMakwana

We use bbolt in the filestorage extension of the OpenTelemetry Collector.

Recently, a few users have reported a panic occurring while running the Collector. It occurs during the bbolt.Open(..) call. Here's a stack trace:

panic: assertion failed: Page expected to be: 242, but self identifies as 8316213599780548146
goroutine 1 [running]:
go.etcd.io/bbolt._assert(...)
        go.etcd.io/bbolt@v1.3.10/db.go:1387
go.etcd.io/bbolt.(*page).fastCheck(0x7f795bd4c000, 0xf2)
        go.etcd.io/bbolt@v1.3.10/page.go:57 +0x1d9
go.etcd.io/bbolt.(*Tx).page(0xfd3f188?, 0x7412180?)
        go.etcd.io/bbolt@v1.3.10/tx.go:534 +0x7b
go.etcd.io/bbolt.(*Tx).forEachPageInternal(0xc002450540, {0xc00225b3b0, 0x2, 0xa}, 0xc00353e020)
        go.etcd.io/bbolt@v1.3.10/tx.go:546 +0x5d
go.etcd.io/bbolt.(*Tx).forEachPageInternal(0xc002450540, {0xc00225b3b0, 0x1, 0xa}, 0xc00353e020)
        go.etcd.io/bbolt@v1.3.10/tx.go:555 +0xc8
go.etcd.io/bbolt.(*Tx).forEachPage(...)
        go.etcd.io/bbolt@v1.3.10/tx.go:542
go.etcd.io/bbolt.(*Tx).checkBucket(0xc002450540, 0xc00187db80, 0xc00353e428, 0xc00353e368, {0x9f50fa8, 0x10095f80}, 0xc002259b00)
        go.etcd.io/bbolt@v1.3.10/tx_check.go:83 +0x114
go.etcd.io/bbolt.(*Tx).checkBucket.func2({0x7f795bca6020?, 0xc00225b360?, 0xc00347fa78?})
        go.etcd.io/bbolt@v1.3.10/tx_check.go:110 +0x90
go.etcd.io/bbolt.(*Bucket).ForEachBucket(0x0?, 0xc00353e220)
        go.etcd.io/bbolt@v1.3.10/bucket.go:411 +0x96
go.etcd.io/bbolt.(*Tx).checkBucket(0xc002450540, 0xc002450558, 0xc00353e428, 0xc00353e368, {0x9f50fa8, 0x10095f80}, 0xc002259b00)
        go.etcd.io/bbolt@v1.3.10/tx_check.go:108 +0x255
go.etcd.io/bbolt.(*DB).freepages(0xc002253448)
        go.etcd.io/bbolt@v1.3.10/db.go:1205 +0x225
go.etcd.io/bbolt.(*DB).loadFreelist.func1()
        go.etcd.io/bbolt@v1.3.10/db.go:417 +0xc5
sync.(*Once).doSlow(0x3fc8bc0?, 0xc002253610?)
        sync/once.go:74 +0xc2
sync.(*Once).Do(...)
        sync/once.go:65
go.etcd.io/bbolt.(*DB).loadFreelist(0xc002253448?)
        go.etcd.io/bbolt@v1.3.10/db.go:413 +0x45
go.etcd.io/bbolt.Open({0xc00225b2c0, 0x45}, 0x180, 0xc00353e650)

Related issues in opentelemetry-collector-contrib: open-telemetry/opentelemetry-collector-contrib#35899, open-telemetry/opentelemetry-collector-contrib#36840

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions