pool size must be > 0 error

Open
#4,262 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
go
Domain
cli, devops

Research direction

Reproduce the failure with the shown fly deploy command and start at internal/command/deploy/plan.go:388, where acquireLeases panics with a zero pool size. Trace the callers in machines_deploymachinesapp.go and deploy.go to determine why deployment reaches that state. Done means the deployment no longer panics with this error and reports or handles the condition appropriately.

Written by the indexing model from the issue text.

Description

bug

[1/2] Waiting for job
[2/2] Waiting for job

Oops, something went wrong! Could you try that again?

pool size must be > 0
goroutine 1 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:26 +0x64
github.com/superfly/flyctl/internal/sentry.printError({0x10678e180, 0x106c46750})
github.com/superfly/flyctl/internal/sentry/sentry.go:190 +0x168
github.com/superfly/flyctl/internal/sentry.Recover({0x10678e180, 0x106c46750})
github.com/superfly/flyctl/internal/sentry/sentry.go:180 +0xb8
main.run.func1()
github.com/superfly/flyctl/main.go:40 +0x34
panic({0x10678e180?, 0x106c46750?})
runtime/panic.go:792 +0x124
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End.deferwrap1()
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:467 +0x2c
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End(0x1400042c3c0, {0x0, 0x0, 0x14000c33818?})
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:506 +0xa04
panic({0x10678e180?, 0x106c46750?})
runtime/panic.go:792 +0x124
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End.deferwrap1()
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:467 +0x2c
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End(0x140009aa1e0, {0x0, 0x0, 0x14000c33300?})
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:506 +0xa04
panic({0x10678e180?, 0x106c46750?})
runtime/panic.go:792 +0x124
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End.deferwrap1()
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:467 +0x2c
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End(0x1400042c5a0, {0x0, 0x0, 0x140000021c0?})
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:506 +0xa04
panic({0x10678e180?, 0x106c46750?})
runtime/panic.go:792 +0x124
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End.deferwrap1()
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:467 +0x2c
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End(0x140009aa000, {0x0, 0x0, 0x14000c32680?})
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:506 +0xa04
panic({0x10678e180?, 0x106c46750?})
runtime/panic.go:792 +0x124
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End.deferwrap1()
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:467 +0x2c
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End(0x140007fc5a0, {0x0, 0x0, 0x14000c32378?})
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:506 +0xa04
panic({0x10678e180?, 0x106c46750?})
runtime/panic.go:792 +0x124
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).acquireLeases(0x140009d1040, {0x106c74838, 0x14000e39680}, {0x140009fd340, 0x2, 0x14000ce9aa9?}, 0x0, 0x14000e396e0)
github.com/superfly/flyctl/internal/command/deploy/plan.go:388 +0x254
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).updateMachinesWRecovery(0x140009d1040, {0x106c73e98, 0x14000a9ec00}, 0x14000e39620, 0x14000c32608, {0x0, 0x0}, {0xa0?, 0xef?, 0x65?, ...})
github.com/superfly/flyctl/internal/command/deploy/plan.go:190 +0x1020
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).updateExistingMachinesWRecovery(0x140009d1040, {0x106c73e98, 0x14000a9ebd0}, {0x14000be5210, 0x2, 0x2})
github.com/superfly/flyctl/internal/command/deploy/machines_deploymachinesapp.go:684 +0x7c4
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).updateExistingMachines(0x140009d1040, {0x106c73e98, 0x14000be3290}, {0x14000be5210, 0x2, 0x2})
github.com/superfly/flyctl/internal/command/deploy/machines_deploymachinesapp.go:557 +0x678
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).deployMachinesApp(0x140009d1040, {0x106c73e98, 0x14000a035f0})
github.com/superfly/flyctl/internal/command/deploy/machines_deploymachinesapp.go:467 +0x520
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).DeployMachinesApp(0x140009d1040, {0x106c73e98, 0x14000783e30})
github.com/superfly/flyctl/internal/command/deploy/machines_deploymachinesapp.go:87 +0x340
github.com/superfly/flyctl/internal/command/deploy.deployToMachines({0x106c73e98, 0x14000893950}, 0x140006ae680, 0x140007c03f8, 0x14000a325a0)
github.com/superfly/flyctl/internal/command/deploy/deploy.go:626 +0xf08
github.com/superfly/flyctl/internal/command/deploy.DeployWithConfig({0x106c73e98, 0x1400074d650}, 0x140006ae680, 0x0, 0x80?)
github.com/superfly/flyctl/internal/command/deploy/deploy.go:376 +0x588
github.com/superfly/flyctl/internal/command/deploy.(*Command).run(0x1080c4ce0?, {0x106c73e98, 0x140007482a0})
github.com/superfly/flyctl/internal/command/deploy/deploy.go:317 +0xc50
github.com/superfly/flyctl/internal/command/deploy.New.New.newRunE.func2(0x140006a9b08, {0x14000646640?, 0x4?, 0x1060d650e?})
github.com/superfly/flyctl/internal/command/command.go:142 +0x180
github.com/spf13/cobra.(*Command).execute(0x140006a9b08, {0x14000646620, 0x2, 0x2})
github.com/spf13/cobra@v1.8.1/command.go:985 +0x830
github.com/spf13/cobra.(*Command).ExecuteC(0x140005a8008)
github.com/spf13/cobra@v1.8.1/command.go:1117 +0x344
github.com/spf13/cobra.(*Command).ExecuteContextC(...)
github.com/spf13/cobra@v1.8.1/command.go:1050
github.com/superfly/flyctl/internal/cli.Run({0x106c74020?, 0x140004ec540?}, 0x14000596000, {0x1400014e090, 0x3, 0x3})
github.com/superfly/flyctl/internal/cli/cli.go:94 +0x5a8
main.run()
github.com/superfly/flyctl/main.go:47 +0x170
main.main()
github.com/superfly/flyctl/main.go:26 +0x20

➜ fly-log-shipper git:(main) ✗ fly deploy -c fly.axiom.prod.toml
==> Verifying app config
Validating fly.axiom.prod.toml
✓ Configuration is valid
--> Verified app config
==> Building image
Searching for image 'flyio/log-shipper:latest' remotely...
image found: img_0lq747158wxd46x3

Watch your deployment at https://fly.io/apps/fly-log-shipper-axiom-prod-quoowa3u/monitoring


Updating existing machines in 'fly-log-shipper-axiom-prod-quoowa3u' with rolling strategy

Oops, something went wrong! Could you try that again?

pool size must be > 0
goroutine 1 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:26 +0x64
github.com/superfly/flyctl/internal/sentry.printError({0x104bf2180, 0x1050aa750})
github.com/superfly/flyctl/internal/sentry/sentry.go:190 +0x168
github.com/superfly/flyctl/internal/sentry.Recover({0x104bf2180, 0x1050aa750})
github.com/superfly/flyctl/internal/sentry/sentry.go:180 +0xb8
main.run.func1()
github.com/superfly/flyctl/main.go:40 +0x34
panic({0x104bf2180?, 0x1050aa750?})
runtime/panic.go:792 +0x124
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End.deferwrap1()
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:467 +0x2c
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End(0x140003ce3c0, {0x0, 0x0, 0x14000be5818?})
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:506 +0xa04
panic({0x104bf2180?, 0x1050aa750?})
runtime/panic.go:792 +0x124
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End.deferwrap1()
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:467 +0x2c
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End(0x140003cf0e0, {0x0, 0x0, 0x14000be5300?})
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:506 +0xa04
panic({0x104bf2180?, 0x1050aa750?})
runtime/panic.go:792 +0x124
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End.deferwrap1()
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:467 +0x2c
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End(0x140009b0780, {0x0, 0x0, 0x140000021c0?})
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:506 +0xa04
panic({0x104bf2180?, 0x1050aa750?})
runtime/panic.go:792 +0x124
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End.deferwrap1()
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:467 +0x2c
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End(0x140003ce5a0, {0x0, 0x0, 0x14000be4680?})
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:506 +0xa04
panic({0x104bf2180?, 0x1050aa750?})
runtime/panic.go:792 +0x124
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End.deferwrap1()
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:467 +0x2c
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End(0x140009b0f00, {0x0, 0x0, 0x14000be4378?})
go.opentelemetry.io/otel/sdk@v1.34.0/trace/span.go:506 +0xa04
panic({0x104bf2180?, 0x1050aa750?})
runtime/panic.go:792 +0x124
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).acquireLeases(0x14000a8a9c0, {0x1050d8838, 0x14000976270}, {0x14000968d20, 0x1, 0x1400096c8a6?}, 0x0, 0x140009762d0)
github.com/superfly/flyctl/internal/command/deploy/plan.go:388 +0x254
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).updateMachinesWRecovery(0x14000a8a9c0, {0x1050d7e98, 0x140007a4a20}, 0x14000976210, 0x14000be4608, {0x0, 0x0}, {0xa0?, 0x2f?, 0xac?, ...})
github.com/superfly/flyctl/internal/command/deploy/plan.go:190 +0x1020
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).updateExistingMachinesWRecovery(0x14000a8a9c0, {0x1050d7e98, 0x140007a49f0}, {0x140006ce158, 0x1, 0x1})
github.com/superfly/flyctl/internal/command/deploy/machines_deploymachinesapp.go:684 +0x7c4
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).updateExistingMachines(0x14000a8a9c0, {0x1050d7e98, 0x140005f13e0}, {0x140006ce158, 0x1, 0x1})
github.com/superfly/flyctl/internal/command/deploy/machines_deploymachinesapp.go:557 +0x678
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).deployMachinesApp(0x14000a8a9c0, {0x1050d7e98, 0x140008942d0})
github.com/superfly/flyctl/internal/command/deploy/machines_deploymachinesapp.go:467 +0x520
github.com/superfly/flyctl/internal/command/deploy.(*machineDeployment).DeployMachinesApp(0x14000a8a9c0, {0x1050d7e98, 0x14000a981b0})
github.com/superfly/flyctl/internal/command/deploy/machines_deploymachinesapp.go:87 +0x340
github.com/superfly/flyctl/internal/command/deploy.deployToMachines({0x1050d7e98, 0x140008cf4a0}, 0x140004584e0, 0x140005f23f8, 0x1400079b4a0)
github.com/superfly/flyctl/internal/command/deploy/deploy.go:626 +0xf08
github.com/superfly/flyctl/internal/command/deploy.DeployWithConfig({0x1050d7e98, 0x14000733440}, 0x140004584e0, 0x0, 0x80?)
github.com/superfly/flyctl/internal/command/deploy/deploy.go:376 +0x588
github.com/superfly/flyctl/internal/command/deploy.(*Command).run(0x106528ce0?, {0x1050d7e98, 0x1400072e090})
github.com/superfly/flyctl/internal/command/deploy/deploy.go:317 +0xc50
github.com/superfly/flyctl/internal/command/deploy.New.New.newRunE.func2(0x140005bfb08, {0x140004b20a0?, 0x4?, 0x10453a50e?})
github.com/superfly/flyctl/internal/command/command.go:142 +0x180
github.com/spf13/cobra.(*Command).execute(0x140005bfb08, {0x140004b2040, 0x2, 0x2})
github.com/spf13/cobra@v1.8.1/command.go:985 +0x830
github.com/spf13/cobra.(*Command).ExecuteC(0x140006dc008)
github.com/spf13/cobra@v1.8.1/command.go:1117 +0x344
github.com/spf13/cobra.(*Command).ExecuteContextC(...)
github.com/spf13/cobra@v1.8.1/command.go:1050
github.com/superfly/flyctl/internal/cli.Run({0x1050d8020?, 0x140003fab40?}, 0x140006c0000, {0x1400004c0d0, 0x3, 0x3})
github.com/superfly/flyctl/internal/cli/cli.go:94 +0x5a8
main.run()
github.com/superfly/flyctl/main.go:47 +0x170
main.main()
github.com/superfly/flyctl/main.go:26 +0x20

Dominant language
Go
Stars
1.7k
Forks
311
Avg merge
12h 50m
Merged PRs (30d)
78

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from superfly/flyctl

All issues in superfly/flyctl

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.