Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server-dump panics and in general doesn't work #3243

Open
islamaliev opened this issue Nov 15, 2024 · 0 comments
Open

Server-dump panics and in general doesn't work #3243

islamaliev opened this issue Nov 15, 2024 · 0 comments
Labels
area/cli Related to the CLI binary bug Something isn't working

Comments

@islamaliev
Copy link
Contributor

islamaliev commented Nov 15, 2024

The command defradb server-dump panics:

Nov 15 11:47:08.854 INF cli Dumping DB state...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x30 pc=0x106c68008]

goroutine 1 [running]:
github.com/sourcenetwork/defradb/internal/db.(*db).initialize(0x14001d3c900, {0x1094a6110, 0x14001d8c3c0})
	github.com/sourcenetwork/defradb/internal/db/db.go:381 +0x1b8
github.com/sourcenetwork/defradb/internal/db.newDB({0x1094a60d8, 0x14001d2ce10}, {0x1094cc7d0, 0x14001d88cc0}, {0xe0?, {0x0?, 0x0?}}, {0x0, 0x0}, {0x0, ...})
	github.com/sourcenetwork/defradb/internal/db/db.go:154 +0x36c
github.com/sourcenetwork/defradb/internal/db.NewDB({0x1094a60d8?, 0x14001d2ce10?}, {0x1094cc7d0?, 0x14001d88cc0?}, {0x0?, {0x0?, 0x0?}}, {0x0?, 0x0?}, {0x0?, ...})
	github.com/sourcenetwork/defradb/internal/db/db.go:108 +0x40
github.com/sourcenetwork/defradb/cli.NewDefraCommand.MakeServerDumpCmd.func18(0x14001d22908, {0x107c9cbff?, 0x4?, 0x107c9cc03?})
	github.com/sourcenetwork/defradb/cli/server_dump.go:40 +0x168
github.com/spf13/cobra.(*Command).execute(0x14001d22908, {0x10bc72100, 0x0, 0x0})
	github.com/spf13/[email protected]/command.go:985 +0x840
github.com/spf13/cobra.(*Command).ExecuteC(0x14001d22308)
	github.com/spf13/[email protected]/command.go:1117 +0x344
github.com/spf13/cobra.(*Command).Execute(0x10ba8b2d8?)
	github.com/spf13/[email protected]/command.go:1041 +0x1c
main.main()
	github.com/sourcenetwork/defradb/cmd/defradb/main.go:23 +0x20

It's because db.lensRegistry is nil.
But even after commenting out this line, it doesn't panic anymore and outputs some data, but no matter what you do with db (add schema, docs, delete docs...), it dumps the same data.

@islamaliev islamaliev added area/cli Related to the CLI binary bug Something isn't working labels Nov 15, 2024
@islamaliev islamaliev changed the title Server-dump panic and in general doesn't work Server-dump panics and in general doesn't work Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to the CLI binary bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant