Public bug reported: libunwind 1.8.3-0ubuntu2 leaks two file descriptors for every thread that unwinds and then exits. The leak was introduced by the fix for LP: #2175640 (d/p/lp2175640-address-validator-pipe-race.patch, backport of upstream commit 346fefe1 - https://github.com/libunwind/libunwind/commit/346fefe1845c528541fc0b6e3b5dada259b11598), which made _mem_validate_pipe in src/mi/Gaddress_validator.c thread-local. Each thread opens its own pipe on first use, but nothing closes it when the thread exits.
Long-running processes that keep creating threads that unwind and exit (e.g. .NET services handling exceptions on worker threads) slowly accumulate descriptors until they reach RLIMIT_NOFILE. At that point unw_step() fails, the CLR aborts during unwinding, and unrelated file and socket operations in the application fail too. Affected: libunwind 1.8.3-0ubuntu2 in Tenacious (27.04). Stonking (26.10) and Resolute (26.04) still ship 1.8.3-0ubuntu1, which predates the LP: #2175640 fix and does not have this leak. Upstream bug: https://github.com/libunwind/libunwind/issues/1119 Upstream fix: https://github.com/libunwind/libunwind/pull/1120 (commit https://github.com/libunwind/libunwind/commit/1399fde3fad7ce74e232c985fd178e291b0b5923, not yet in a release) This fix has been merged upstream but is not in any official libunwind release yet, so we need to backport the upstream commit. Plan: backport the upstream fix to Tenacious first. When LP: #2175640 is SRU'd to Stonking and Resolute, this fix must be included in the same upload, otherwise those releases would get the leak too. ** Affects: libunwind (Ubuntu) Importance: Undecided Status: New ** Affects: libunwind (Ubuntu Resolute) Importance: Undecided Status: New ** Affects: libunwind (Ubuntu Stonking) Importance: Undecided Status: New ** Affects: libunwind (Ubuntu Tenacious) Importance: Undecided Status: New ** Also affects: libunwind (Ubuntu Resolute) Importance: Undecided Status: New ** Also affects: libunwind (Ubuntu Stonking) Importance: Undecided Status: New ** Also affects: libunwind (Ubuntu Tenacious) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2190857 Title: libunwind: per-thread _mem_validate_pipe leaks 2 FDs per exiting thread To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libunwind/+bug/2190857/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
