bacalhau-project / bacalhau

Compute over Data framework for public, transparent, and optionally verifiable computation
https://docs.bacalhau.org
Apache License 2.0
700 stars 89 forks source link

Stack trace on starting a compute node on the same server as a requester node #4491

Closed aronchick closed 1 month ago

aronchick commented 1 month ago
❯ ./bin/darwin/arm64/bacalhau serve --node-type=compute
Flag --node-type has been deprecated, Use --orchestrator and/or --compute to set the node type.
17:07:07.017 | INF pkg/config/config.go:211 > Config loaded from: [], and with data-dir /Users/daaronch/.bacalhau
17:07:09.009 | INF cmd/cli/serve/serve.go:219 > Starting bacalhau...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x18 pc=0x1041e8dc0]

goroutine 22 [running]:
github.com/bacalhau-project/bacalhau/pkg/compute/store/boltdb.(*Store).GetEventStore(0x0?)
    github.com/bacalhau-project/bacalhau/pkg/compute/store/boltdb/store.go:444
github.com/bacalhau-project/bacalhau/pkg/node.NewComputeNode({_, _}, {_, _}, _, {{{0x104237c19, 0x7}, 0x4d2, {{0x0, 0x0}, ...}, ...}, ...}, ...)
    github.com/bacalhau-project/bacalhau/pkg/node/compute.go:69 +0x7c
github.com/bacalhau-project/bacalhau/pkg/node.NewNode({_, _}, {{{0x104237c19, 0x7}, 0x4d2, {{0x0, 0x0}, {0x0, 0x0}, {0x0, ...}, ...}, ...}, ...}, ...)
    github.com/bacalhau-project/bacalhau/pkg/node/node.go:219 +0x708
github.com/bacalhau-project/bacalhau/cmd/cli/serve.serve(_, {{{0x104237c19, 0x7}, 0x4d2, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, ...}, ...}, ...}, ...)
    github.com/bacalhau-project/bacalhau/cmd/cli/serve/serve.go:220 +0xa24
github.com/bacalhau-project/bacalhau/cmd/cli/serve.NewCmd.func2(0x14000bbb508, {0x10422b2f6?, 0x4?, 0x10422b1e2?})
    github.com/bacalhau-project/bacalhau/cmd/cli/serve/serve.go:105 +0x180
github.com/spf13/cobra.(*Command).execute(0x14000bbb508, {0x140005b6740, 0x1, 0x1})
    github.com/spf13/cobra@v1.8.0/command.go:983 +0x834
github.com/spf13/cobra.(*Command).ExecuteC(0x14000136908)
    github.com/spf13/cobra@v1.8.0/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
    github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/bacalhau-project/bacalhau/cmd/cli.Execute({0x1051eb268, 0x140005c17c0})
    github.com/bacalhau-project/bacalhau/cmd/cli/root.go:133 +0x6c
main.main.func2()
    github.com/bacalhau-project/bacalhau/main.go:91 +0x34
created by main.main in goroutine 1
    github.com/bacalhau-project/bacalhau/main.go:90 +0x1a8
frrist commented 1 month ago

Looks like we need an error check here: https://github.com/bacalhau-project/bacalhau/blob/main/pkg/compute/store/boltdb/store.go#L112-L122