From 1bf157bada36b659575875690f39a86256b5f722 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")`. --- GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)