URGENT: v1.0.0 deadlocks on first log line in any non-TTY environment, and the fix is unreachable because tag 1.0.1 lacks the leading v #18
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reported by the cattbox manager, verified against this repo's tags by the dispatcher. Filed here because it affects every repo in the org:
CODE_STYLEGUIDE_GO.mdmandates this library for all Go repos.The deadlock
JSONHandler— selected whenever stdout is not a TTY, i.e. every container and every CI run — writes via the stdliblogpackage.slog.SetDefaultredirects stdliblogback into the same handler. The first log line recurses and deadlocks on the stdlib logger's mutex.cattbox's
make testhung to its 30s timeout with exactly that cycle in the trace.This is not a degradation, it is a hang. A binary using
v1.0.0stops on its first log statement in production, while passing a developer's local run — because an interactive terminal selectsConsoleHandlerinstead. Local green, container hang.Why the fix is unreachable
Tags on this repo, read from the API just now:
Go requires the leading
vfor a semver tag, so1.0.1is invisible to the module proxy.v1.0.0is the only versiongo get sneak.berlin/go/simplelogcan resolve, which means the obvious command hands every consumer the deadlocking release.Fix
One command, and it unblocks every consuming repo at once:
Nothing else changes — same commit, additional tag. Note the dispatcher can create this tag via the Gitea API on request, but has not done so unilaterally, since publishing a version tag changes what every downstream repo resolves and that is the owner's call.
Interim workaround for consuming repos
Pin the pseudo-version naming the fix commit, rather than
go get:Same module, hash recorded in
go.sum, no vendoring and no hand-rolled substitute. cattbox is using exactly this today (its #25 tracks bumping to a real tag once one exists).Definition of done
v1.0.1exists andgo get sneak.berlin/go/simplelog@v1.0.1resolves the fix commit.