Bug 1443976 - glibc: Remove the PID cache
Summary: glibc: Remove the PID cache
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Arjun Shankar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1443973
TreeView+ depends on / blocked
 
Reported: 2017-04-20 11:19 UTC by Florian Weimer
Modified: 2017-07-11 20:19 UTC (History)
9 users (show)

Fixed In Version: glibc-2.25-1.fc26 glibc-2.24-6.fc25
Clone Of: 1443973
Environment:
Last Closed: 2017-07-11 19:14:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1469670 0 unspecified CLOSED glibc: Implement vDSO-based getpid 2021-02-22 00:41:40 UTC
Sourceware 15392 0 P2 RESOLVED Linux, setns, PID namespaces, fork: assert() about pid inequality hit sporadically 2020-02-06 12:56:19 UTC

Internal Links: 1469670

Description Florian Weimer 2017-04-20 11:19:46 UTC
+++ This bug was initially created as a clone of Bug #1443973 +++

The glibc PID cache negatively interacts with setting up containers and namespaces.

Upstream commit:

commit c579f48edba88380635ab98cb612030e3ed8691e
Author: Adhemerval Zanella <adhemerval.zanella>
Date:   Mon Oct 10 15:08:39 2016 -0300

    Remove cached PID/TID in clone

Comment 1 Florian Weimer 2017-04-20 11:21:50 UTC
Already fixed in Fedora 26.

Comment 2 Fedora Update System 2017-06-07 17:00:31 UTC
glibc-2.24-6.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-32940dd50d

Comment 3 Fedora Update System 2017-06-08 16:11:05 UTC
glibc-2.24-6.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-32940dd50d

Comment 4 Fedora Update System 2017-06-11 23:32:48 UTC
glibc-2.24-6.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Lennart Poettering 2017-07-11 15:18:55 UTC
Umm, this change causes major slowdowns in various bits of systemd code, which assumes that getpid() is fast. libsystemd uses getpid() to detect when processes fork, to then politely return an error from all calls that operate on objects that cannot be reused after fork(). This used to be dead cheap on all glibc versions, but suddenly becomes excessively expensive, see this thread:

https://lists.freedesktop.org/archives/systemd-devel/2017-July/039195.html

I find the explanation "The glibc PID cache negatively interacts with setting up containers and namespaces." quite weak... What is "negatively interacts" supposed to mean?

Is this regression going to stay? I am kinda surprised by this change I must say, as it causes real problems, and there's no clear benefit of the change...

Comment 6 Lennart Poettering 2017-07-11 15:24:46 UTC
I opened a new bug 1469670 for tracking the regression introduced here.


Note You need to log in before you can comment on or make changes to this bug.