From c4ec30aacf07847732ad4cccad79a2070dfd6a0f Mon Sep 17 00:00:00 2001 From: Seth Hoenig Date: Tue, 23 Aug 2022 15:33:02 -0500 Subject: [PATCH] build: set osusergo build tag by default This PR activates the osuergo build tag in GNUMakefile. This forces the os/user package to be compiled without CGO. Doing so seems to resolve a race condition in getpwnam_r that causes alloc creation to hang or panic on `user.Lookup("nobody")`. --- .changelog/14248.txt | 3 +++ GNUmakefile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .changelog/14248.txt diff --git a/.changelog/14248.txt b/.changelog/14248.txt new file mode 100644 index 00000000000..32b4e40e9e0 --- /dev/null +++ b/.changelog/14248.txt @@ -0,0 +1,3 @@ +```release-note:bug +client: Fixed a bug where user lookups would hang or panic +``` diff --git a/GNUmakefile b/GNUmakefile index c506dfec90f..5f1d99c6ee2 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -21,7 +21,7 @@ ifndef BIN BIN := $(GOPATH)/bin endif -GO_TAGS ?= +GO_TAGS ?= osusergo ifeq ($(CI),true) GO_TAGS := codegen_generated $(GO_TAGS)