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

x/build/internal/relui/sign: race in SigningServer.send #56297

Closed
dmitshur opened this issue Oct 18, 2022 · 1 comment
Closed

x/build/internal/relui/sign: race in SigningServer.send #56297

dmitshur opened this issue Oct 18, 2022 · 1 comment
Assignees
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@dmitshur
Copy link
Contributor

SigningServer.send has a possibility of panicking when executing this line:

https://cs.opensource.google/go/x/build/+/master:internal/relui/sign/server.go;l=110;drc=656fd833c86463e51c5e722b28134318ab25bf6a

Stack trace
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x20 pc=0x10357eeac]

goroutine 1582 [running]:
golang.org/x/build/internal/relui/sign.(*SigningServer).send(0x1400095dbc0, {0x103b881d8, 0x14000f9a0f0}, 0x14000f9a190)
	$HOME/go/src/golang.org/x/build/internal/relui/sign/server.go:110 +0x1dc
golang.org/x/build/internal/relui/sign.(*SigningServer).SignArtifact(0x14000d9e8a8?, {0x103b881d8, 0x14000f9a0f0}, 0x1, {0x14001a7e6f0, 0x1, 0x1})
	$HOME/go/src/golang.org/x/build/internal/relui/sign/server.go:115 +0x168
golang.org/x/build/internal/relui.(*BuildReleaseTasks).signArtifacts(0x140009490e0, 0x14000f9a0f0, 0x10395a040?, {0x14001a7e6f0?, 0x140008bb138?, 0x14000a060a0?})
	$HOME/go/src/golang.org/x/build/internal/relui/workflows.go:829 +0x6c
golang.org/x/build/internal/relui.(*BuildReleaseTasks).signDarwinPKG(_, _, {0x14000576680, {0x14000a060a0, 0x47}, {0x0, 0x0}, {0x0, 0x0}, {0x0, ...}, ...})
	$HOME/go/src/golang.org/x/build/internal/relui/workflows.go:706 +0xbc
reflect.Value.call({0x103972160?, 0x1400018d520?, 0x14000a22c18?}, {0x1035afedb, 0x4}, {0x14001088930, 0x2, 0x1033b3314?})
	/usr/local/go/src/reflect/value.go:584 +0x688
reflect.Value.Call({0x103972160?, 0x1400018d520?, 0x1400018dad0?}, {0x14001088930?, 0x20?, 0x102a43144?})
	/usr/local/go/src/reflect/value.go:368 +0x90
golang.org/x/build/internal/workflow.runTask({0x103b87d08?, 0x140008fe9c0?}, {0xab, 0xf9, 0xd, 0x86, 0xda, 0xf8, 0x4d, 0x53, ...}, ...)
	$HOME/go/src/golang.org/x/build/internal/workflow/workflow.go:834 +0x3f4
golang.org/x/build/internal/workflow.(*Workflow).Run.func2()
	$HOME/go/src/golang.org/x/build/internal/workflow/workflow.go:753 +0xc8
created by golang.org/x/build/internal/workflow.(*Workflow).Run
	$HOME/go/src/golang.org/x/build/internal/workflow/workflow.go:753 +0xa78
exit status 2

If the parent context expires, that can cause <-respCtx.Done() to unblock before the callback sets resp to a non-nil value.

CL incoming.

@dmitshur dmitshur added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 18, 2022
@dmitshur dmitshur added this to the Unreleased milestone Oct 18, 2022
@dmitshur dmitshur self-assigned this Oct 18, 2022
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Oct 18, 2022
@gopherbot
Copy link

Change https://go.dev/cl/443676 mentions this issue: internal/relui/sign: simplify and fix race in message passing

@golang golang locked and limited conversation to collaborators Oct 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
Archived in project
Development

No branches or pull requests

2 participants