Skip to content

Conversation

@kokes
Copy link

@kokes kokes commented Dec 22, 2025

What was changed

Stats for task-queues are only fetched from a pointer to a struct only if a given pointer is not nil.

Why?

I ran into panics otherwise.

$ temporal task-queue describe -t foo
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x102d578a0]

goroutine 1 [running]:
github.com/temporalio/cli/temporalcli.buildIDToStatsRows({0x0, 0x0, 0x0}, {0x102dd7920, 0xb}, 0x114180b18?)
	github.com/temporalio/cli/temporalcli/commands.taskqueue.go:158 +0xf0
github.com/temporalio/cli/temporalcli.descriptionToStatsRows({0x14000def320?, 0x0?})
	github.com/temporalio/cli/temporalcli/commands.taskqueue.go:173 +0x74
github.com/temporalio/cli/temporalcli.taskQueueDescriptionToRows({0x14000def320?, 0x0?}, 0xd8?, 0x17?)
	github.com/temporalio/cli/temporalcli/commands.taskqueue.go:202 +0x9c
github.com/temporalio/cli/temporalcli.printTaskQueueDescription(0x14000024a00, {0x14000def320?, 0x0?}, 0x0, 0x0)
	github.com/temporalio/cli/temporalcli/commands.taskqueue.go:220 +0x48
github.com/temporalio/cli/temporalcli.(*TemporalTaskQueueDescribeCommand).run(0x14000c42708, 0x14000024a00, {0x140000dafa0?, 0x0?, 0x0?})
	github.com/temporalio/cli/temporalcli/commands.taskqueue.go:298 +0x330
github.com/temporalio/cli/temporalcli.NewTemporalTaskQueueDescribeCommand.func1(0x14000c42710?, {0x140000dafa0?, 0x4?, 0x102dcaba7?})
	github.com/temporalio/cli/temporalcli/commands.gen.go:2316 +0x38
github.com/spf13/cobra.(*Command).execute(0x14000c42710, {0x140000daf80, 0x2, 0x2})
	github.com/spf13/cobra@v1.9.1/command.go:1019 +0x7bc
github.com/spf13/cobra.(*Command).ExecuteC(0x14000911688)
	github.com/spf13/cobra@v1.9.1/command.go:1148 +0x350
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.9.1/command.go:1071
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	github.com/spf13/cobra@v1.9.1/command.go:1064
github.com/temporalio/cli/temporalcli.Execute({0x10b1192d0?, 0x14000220dc0?}, {{0x0, 0x0, 0x0}, {{0x0, 0x0}, {0x0, 0x0}, 0x0}, ...})
	github.com/temporalio/cli/temporalcli/commands.go:350 +0xd0
main.main()
	github.com/temporalio/cli/cmd/temporal/main.go:18 +0x64

Checklist

  1. Closes N/A (can create one if needed)

  2. How was this tested:

go run ./cmd/temporal task-queue describe -t foo
  1. Any docs updates needed?

None

@kokes kokes requested review from a team as code owners December 22, 2025 10:44
@CLAassistant
Copy link

CLAassistant commented Dec 22, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants