From 2d425bf21d1177afee692a3e4c8a443350856740 Mon Sep 17 00:00:00 2001 From: Seth Hoenig Date: Wed, 24 Aug 2022 08:11:56 -0500 Subject: [PATCH] build: set osusergo build tag by default (#14248) 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 000000000000..32b4e40e9e04 --- /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 c506dfec90fc..5f1d99c6ee2b 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)