Bug 1436446
Summary: | getpid() in child process created using clone(CLONE_VM) returns parent's pid | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Andrew Vagin <avagin> |
Component: | glibc | Assignee: | Carlos O'Donell <codonell> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | urgent | Docs Contact: | |
Priority: | unspecified | ||
Version: | 25 | CC: | arjun.is, codonell, dj, fweimer, law, mfabian, pfrankli, siddhesh |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-04-03 14:15:17 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Andrew Vagin
2017-03-27 23:43:09 UTC
Here is the quote from the glibc bugzilla: Adhemerval Zanella 2017-03-28 04:24:22 UTC As you noted it was fixed by c579f48 (Remove cached PID/TID in clone) on master by removing the Linux getpid implementation altogether (and then use the auto-generation syscall). I think for 2.24 the straightforward fix is just remove getpid Linux implementation. (In reply to Andrew Vagin from comment #2) > Here is the quote from the glibc bugzilla: > Adhemerval Zanella 2017-03-28 04:24:22 UTC > As you noted it was fixed by c579f48 (Remove cached PID/TID in clone) on > master by removing the Linux getpid implementation altogether (and then use > the auto-generation syscall). I think for 2.24 the straightforward fix is > just remove getpid Linux implementation. This is fixed in F26 and onward and will not be backported to Fedora 25 unless a specific application is being impacted by the functionality in question. The workaround is to use syscall to call getpid directly and bypass the core library cache. Applications that directly use clone must understand all the coordination aspects involved with the underlying core library that is maintaining the threading model provided by the language constructs e.g. pthread_create etc. Please reopen this bug is the workaround is unsupportable for you for some reason, or if the fix in F26 is insufficient. |