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

Panic when setting --query-queue-size to a large value #20145

Closed
danxmoran opened this issue Nov 23, 2020 · 2 comments
Closed

Panic when setting --query-queue-size to a large value #20145

danxmoran opened this issue Nov 23, 2020 · 2 comments
Assignees
Labels
area/2.x OSS 2.0 related issues and PRs kind/bug

Comments

@danxmoran
Copy link
Contributor

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

  1. Run influxd --query-queue-size 9223372036854775807

Expected behavior:
Either the program runs successfully, or the CLI errors out telling me the number is too big.

Actual behavior:

panic: makechan: size out of range

goroutine 1 [running]:
github.com/influxdata/influxdb/v2/query/control.New(0xa, 0x0, 0x7fffffffffffffff, 0x0, 0x7fffffffffffffff, 0xc001a4c2a0, 0x0, 0x0, 0x0, 0xc000dc2a60, ...)
        /Users/dan/influxdb/query/control/controller.go:180 +0x605
github.com/influxdata/influxdb/v2/cmd/influxd/launcher.(*Launcher).run(0xc00042d880, 0x760eb80, 0xc0009ae0c0, 0x0, 0x0)
        /Users/dan/influxdb/cmd/influxd/launcher/launcher.go:901 +0x3a38
github.com/influxdata/influxdb/v2/cmd/influxd/launcher.cmdRunE.func1(0x0, 0x0)
        /Users/dan/influxdb/cmd/influxd/launcher/launcher.go:149 +0x14c
github.com/influxdata/influxdb/v2/kit/cli.NewCommand.func1(0xc000218b00, 0xc000c923a0, 0x0, 0x2, 0x0, 0x0)
        /Users/dan/influxdb/kit/cli/viper.go:62 +0x29
github.com/spf13/cobra.(*Command).execute(0xc000218b00, 0xc00004e1c0, 0x2, 0x2, 0xc000218b00, 0xc00004e1c0)
        /Users/dan/.gvm/pkgsets/go1.15/global/pkg/mod/github.com/spf13/[email protected]/command.go:842 +0x47c
github.com/spf13/cobra.(*Command).ExecuteC(0xc000218b00, 0xc000d1ff48, 0x1, 0x1)
        /Users/dan/.gvm/pkgsets/go1.15/global/pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/dan/.gvm/pkgsets/go1.15/global/pkg/mod/github.com/spf13/[email protected]/command.go:887
main.main()
        /Users/dan/influxdb/cmd/influxd/main.go:41 +0x31c

Environment info:
InfluxDB OSS 2.0.2

@danxmoran
Copy link
Contributor Author

Experimenting in the Go playground, it seems that 35184372088820 is the max size that avoids a panic. This is 1<<45-12, the same as the max size for a chan of int64s.

While it doesn't panic, it immediately OOMs with no other changes to settings.

@danxmoran
Copy link
Contributor Author

Closed by #20149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/2.x OSS 2.0 related issues and PRs kind/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant