Public bug reported:

Summary
-------
After upgrading from 7.0.0-38 to 7.0.0-42 (resolute-updates, published
2026-10-28), gosu 1.19 (built with Go 1.24.6) never returns. The official
mariadb, postgres and mongo Docker images use gosu to drop privileges in
their entrypoints, so all of those containers hang at "Switching to
dedicated user" indefinitely. 7.0.0-43 from -proposed shows the same
behavior. Booting back to 7.0.0-38 fixes it immediately.

Reproducer
----------
  timeout 60 docker run --rm --entrypoint gosu mariadb:10.11 nobody id

  7.0.0-38: prints "uid=65534(nobody) gid=65534(nogroup) ..." instantly
  7.0.0-42: hangs until the timeout
  7.0.0-43: hangs until the timeout

On -42 and -43 this was tested at 10+ minutes of uptime, after the boot-time
load had settled. Stuck gosu processes were still alive after 270+ seconds.
On -42 the host stayed in this state for ~10 hours (database containers
restarted ~180 times each, never starting).

Observations
------------
- strace -f of a stuck gosu process (6 threads):
    main thread:  sched_yield() = 0, repeated forever
    other 5:      futex(..., FUTEX_WAIT_PRIVATE, 0, NULL)  (never woken)
  This looks like Go's all-threads setuid/setgid path
  (runtime.doAllThreadsSyscall) waiting forever for threads that are
  never woken or signaled.
- gosu 1.13 built with Go 1.16.5 (image mariadb:10.6.4-focal) WORKS on
  7.0.0-43. Only the newer Go runtime (1.24.6) is affected.
- Same host, same images; only the kernel changed. The same images work
  on other hosts running 7.0.0-38.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: kernel-daily-bug

** Attachment added: "version.log"
   
https://bugs.launchpad.net/bugs/2172422/+attachment/6013232/+files/version.log

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2172422

Title:
  Regression 7.0.0-42/-43: Go 1.24 programs livelock in setuid (gosu);
  official DB Docker images hang on start

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2172422/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to