chaisql / chai

Modern embedded SQL database
MIT License
1.56k stars 95 forks source link

Genji crash with docker compose shared volume #498

Closed irdkwmnsb closed 11 months ago

irdkwmnsb commented 1 year ago

What version of Genji are you using?

$ genji version
Genji v0.15.1
Genji CLI v0.15.1

What did you do?

Tried opening a genji shell from a running docker container with shared volume data

What did you expect to see?

An opened shell or a message stating that one shouldn't open a shell on a database that is already opened by someone.

What did you see instead?

# /root/go/bin/genji _data
panic: close of closed channel [recovered]
    panic: close of closed channel

goroutine 1 [running]:
github.com/cockroachdb/pebble.Open.func1()
    /root/go/pkg/mod/github.com/cockroachdb/pebble@v0.0.0-20220708173837-d3484a60444e/open.go:111 +0x175
panic({0x9f69e0, 0xb61520})
    /usr/lib/go-1.19/src/runtime/panic.go:890 +0x262
github.com/cockroachdb/pebble/vfs.(*diskHealthCheckingFile).stopTicker(...)
    /root/go/pkg/mod/github.com/cockroachdb/pebble@v0.0.0-20220708173837-d3484a60444e/vfs/disk_health.go:95
github.com/cockroachdb/pebble/vfs.(*diskHealthCheckingFile).Close(0xc000280200)
    /root/go/pkg/mod/github.com/cockroachdb/pebble@v0.0.0-20220708173837-d3484a60444e/vfs/disk_health.go:108 +0x25
github.com/cockroachdb/pebble.Open.func2()
    /root/go/pkg/mod/github.com/cockroachdb/pebble@v0.0.0-20220708173837-d3484a60444e/open.go:171 +0x4b
github.com/cockroachdb/pebble.Open({0x7ffffcbee738, 0x5}, 0xc0002ae000)
    /root/go/pkg/mod/github.com/cockroachdb/pebble@v0.0.0-20220708173837-d3484a60444e/open.go:213 +0xea7
github.com/genjidb/genji/internal/database/pebble.Open({0x7ffffcbee738?, 0xc000173b90?}, 0x419cc8?)
    /root/go/pkg/mod/github.com/genjidb/genji@v0.15.1/internal/database/pebble/open.go:17 +0x6c
github.com/genjidb/genji.Open({0x7ffffcbee738, 0x5})
    /root/go/pkg/mod/github.com/genjidb/genji@v0.15.1/db.go:46 +0x165
github.com/genjidb/genji/cmd/genji/dbutil.OpenDB({0xb66528?, 0xc0000be000}, {0x7ffffcbee738?, 0x5?})
    /root/go/pkg/mod/github.com/genjidb/genji/cmd/genji@v0.15.1/dbutil/db.go:14 +0x4e
github.com/genjidb/genji/cmd/genji/shell.Run({0xb66528?, 0xc0000be000}, 0xc0002921a0?)
    /root/go/pkg/mod/github.com/genjidb/genji/cmd/genji@v0.15.1/shell/shell.go:81 +0xc9
github.com/genjidb/genji/cmd/genji/commands.NewApp.func3(0xc000280180)
    /root/go/pkg/mod/github.com/genjidb/genji/cmd/genji@v0.15.1/commands/app.go:62 +0x1cc
github.com/urfave/cli/v2.(*App).RunContext(0xc000093ba0, {0xb66528?, 0xc0000be000}, {0xc0000bc000, 0x2, 0x2})
    /root/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:322 +0x97c
github.com/urfave/cli/v2.(*App).Run(...)
    /root/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:224
main.main()
    /root/go/pkg/mod/github.com/genjidb/genji/cmd/genji@v0.15.1/main.go:13 +0x45
asdine commented 11 months ago

Closing this as we released v0.16.0, which should fix the issue. Please reopen if the problem happens again