Skip to content

LiteFS Panic when WAL is large #445

@catgirlinspace

Description

@catgirlinspace

Hi, I recently tried vacuuming my database which produced a large WAL file (~1GB) to be checkpointed. LiteFS has been repeatedly outputting this error after this about a panic and the WAL does not get checkpointed.

level=INFO msg="fuse: panic in handler for Flush [ID=0x57ecca Node=0x4 Uid=0 Gid=0 Pid=3291] 0x3 fl=0x0 owner=bcd568aeef4157ee: runtime error: index out of range [970] with length 968\ngoroutine 2887718 [running]:\nbazil.org/fuse/fs.(*Server).serve.func2()\n\t/go/pkg/mod/bazil.org/[email protected]/fs/serve.go:1004 +0x119\npanic({0xaafd00?, 0xc000400090?})\n\t/usr/local/go/src/runtime/panic.go:914 +0x21f\ngithub.com/superfly/litefs.(*DB).checksum(0xc000188dc0, 0x3c752, 0x3cc61?)\n\t/src/litefs/db.go:3233 +0x42c\ngithub.com/superfly/litefs.(*DB).CommitWAL(0xc000188dc0, {0xbec848, 0xc0001d6c30})\n\t/src/litefs/db.go:1687 +0x1bf7\ngithub.com/superfly/litefs.(*DB).UnlockSHM(0xc000188dc0, {0xbec848, 0xc0001d6c30}, 0xc0000388b0?)\n\t/src/litefs/db.go:1873 +0x87\ngithub.com/superfly/litefs/fuse.(*SHMHandle).Flush(0xc000210000?, {0xbec848?, 0xc0001d6c30?}, 0xc000747d40?)\n\t/src/litefs/fuse/shm_node.go:144 +0x28\nbazil.org/fuse/fs.(*Server).handleRequest(0xc000210000, {0xbec848, 0xc0001d6c30}, {0xbe7660?, 0xc0000388a0}, 0xc0001c22c0, {0xbebc00?, 0xc0001d6be0?}, 0xc0007bff08)\n\t/go/pkg/mod/bazil.org/[email protected]/fs/serve.go:1461 +0x190b\nbazil.org/fuse/fs.(*Server).serve(0xc000210000, {0xbebc00, 0xc0001d6be0})\n\t/go/pkg/mod/bazil.org/[email protected]/fs/serve.go:1025 +0x5b1\nbazil.org/fuse/fs.(*Server).Serve.func1()\n\t/go/pkg/mod/bazil.org/[email protected]/fs/serve.go:522 +0x5a\ncreated by bazil.org/fuse/fs.(*Server).Serve in goroutine 76\n\t/go/pkg/mod/bazil.org/[email protected]/fs/serve.go:520 +0x373"

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