public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/27304] New: pthread_cond_destroy does not pass private flag to futex system calls
@ 2021-02-01 8:22 fweimer at redhat dot com
2021-02-01 8:22 ` [Bug nptl/27304] " fweimer at redhat dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: fweimer at redhat dot com @ 2021-02-01 8:22 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27304
Bug ID: 27304
Summary: pthread_cond_destroy does not pass private flag to
futex system calls
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: nptl
Assignee: unassigned at sourceware dot org
Reporter: fweimer at redhat dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Commit dc6cfdc934db9997c33728082d63552b9eee4563 ("nptl: Move
pthread_cond_destroy implementation into libc") dropped use of the
process-shared flag because of this optimization in
sysdeps/nptl/lowlevellock-futex.h:
# if IS_IN (libc) || IS_IN (rtld)
/* In libc.so or ld.so all futexes are private. */
# define __lll_private_flag(fl, private) \
({ \
/* Prevent warnings in callers of this macro. */ \
int __lll_private_flag_priv __attribute__ ((unused)); \
__lll_private_flag_priv = (private); \
((fl) | FUTEX_PRIVATE_FLAG); \
})
# else
# define __lll_private_flag(fl, private) \
(((fl) | FUTEX_PRIVATE_FLAG) ^ (private))
# endif
I think the fix is to remove the optimization because it is unused. The
internal locks are always private, so the optimization does not matter to them.
On x86-64, pthread_cond_destroy is the only place where the alternative macro
definition results in changed machine code, but we do not actually want this
change there (because it probably breaks process-shared condition variables).
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug nptl/27304] pthread_cond_destroy does not pass private flag to futex system calls
2021-02-01 8:22 [Bug nptl/27304] New: pthread_cond_destroy does not pass private flag to futex system calls fweimer at redhat dot com
@ 2021-02-01 8:22 ` fweimer at redhat dot com
2021-02-01 8:47 ` fweimer at redhat dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: fweimer at redhat dot com @ 2021-02-01 8:22 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27304
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |fweimer at redhat dot com
CC| |fweimer at redhat dot com
Status|NEW |ASSIGNED
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug nptl/27304] pthread_cond_destroy does not pass private flag to futex system calls
2021-02-01 8:22 [Bug nptl/27304] New: pthread_cond_destroy does not pass private flag to futex system calls fweimer at redhat dot com
2021-02-01 8:22 ` [Bug nptl/27304] " fweimer at redhat dot com
@ 2021-02-01 8:47 ` fweimer at redhat dot com
2021-02-01 8:48 ` fweimer at redhat dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: fweimer at redhat dot com @ 2021-02-01 8:47 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27304
--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
Patch posted:
https://sourceware.org/pipermail/libc-alpha/2021-February/122181.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug nptl/27304] pthread_cond_destroy does not pass private flag to futex system calls
2021-02-01 8:22 [Bug nptl/27304] New: pthread_cond_destroy does not pass private flag to futex system calls fweimer at redhat dot com
2021-02-01 8:22 ` [Bug nptl/27304] " fweimer at redhat dot com
2021-02-01 8:47 ` fweimer at redhat dot com
@ 2021-02-01 8:48 ` fweimer at redhat dot com
2021-02-04 14:33 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: fweimer at redhat dot com @ 2021-02-01 8:48 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27304
--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
Note that this is sadly unrelated to the libdb/RPM database corruption we see
on s390x; we have not backported this into the glibc 2.28 branch where we see
this.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug nptl/27304] pthread_cond_destroy does not pass private flag to futex system calls
2021-02-01 8:22 [Bug nptl/27304] New: pthread_cond_destroy does not pass private flag to futex system calls fweimer at redhat dot com
` (2 preceding siblings ...)
2021-02-01 8:48 ` fweimer at redhat dot com
@ 2021-02-04 14:33 ` cvs-commit at gcc dot gnu.org
2021-02-04 14:35 ` fweimer at redhat dot com
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-04 14:33 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27304
--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Florian Weimer <fw@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c4ad832276f4dadfa40904109b26a521468f66bc
commit c4ad832276f4dadfa40904109b26a521468f66bc
Author: Florian Weimer <fweimer@redhat.com>
Date: Thu Feb 4 15:00:20 2021 +0100
nptl: Remove private futex optimization [BZ #27304]
It is effectively used, unexcept for pthread_cond_destroy, where we do
not want it; see bug 27304. The internal locks do not support a
process-shared mode.
This fixes commit dc6cfdc934db9997c33728082d63552b9eee4563 ("nptl:
Move pthread_cond_destroy implementation into libc").
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug nptl/27304] pthread_cond_destroy does not pass private flag to futex system calls
2021-02-01 8:22 [Bug nptl/27304] New: pthread_cond_destroy does not pass private flag to futex system calls fweimer at redhat dot com
` (3 preceding siblings ...)
2021-02-04 14:33 ` cvs-commit at gcc dot gnu.org
@ 2021-02-04 14:35 ` fweimer at redhat dot com
2021-02-07 15:24 ` fweimer at redhat dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: fweimer at redhat dot com @ 2021-02-04 14:35 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27304
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Florian Weimer <fweimer at redhat dot com> ---
Fixed for glibc 2.34.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug nptl/27304] pthread_cond_destroy does not pass private flag to futex system calls
2021-02-01 8:22 [Bug nptl/27304] New: pthread_cond_destroy does not pass private flag to futex system calls fweimer at redhat dot com
` (4 preceding siblings ...)
2021-02-04 14:35 ` fweimer at redhat dot com
@ 2021-02-07 15:24 ` fweimer at redhat dot com
2021-03-16 9:22 ` fweimer at redhat dot com
2021-03-16 9:55 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: fweimer at redhat dot com @ 2021-02-07 15:24 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27304
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |2.34
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug nptl/27304] pthread_cond_destroy does not pass private flag to futex system calls
2021-02-01 8:22 [Bug nptl/27304] New: pthread_cond_destroy does not pass private flag to futex system calls fweimer at redhat dot com
` (5 preceding siblings ...)
2021-02-07 15:24 ` fweimer at redhat dot com
@ 2021-03-16 9:22 ` fweimer at redhat dot com
2021-03-16 9:55 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: fweimer at redhat dot com @ 2021-03-16 9:22 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27304
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://github.com/linux-te
| |st-project/ltp/issues/746
--- Comment #5 from Florian Weimer <fweimer at redhat dot com> ---
It turns out that LTP actually tests for this bug.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug nptl/27304] pthread_cond_destroy does not pass private flag to futex system calls
2021-02-01 8:22 [Bug nptl/27304] New: pthread_cond_destroy does not pass private flag to futex system calls fweimer at redhat dot com
` (6 preceding siblings ...)
2021-03-16 9:22 ` fweimer at redhat dot com
@ 2021-03-16 9:55 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-16 9:55 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27304
--- Comment #6 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.33/master branch has been updated by Florian Weimer
<fw@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=79c6be6a0ad59e28cfb73ad6cae6b073e22836e3
commit 79c6be6a0ad59e28cfb73ad6cae6b073e22836e3
Author: Florian Weimer <fweimer@redhat.com>
Date: Thu Feb 4 15:00:20 2021 +0100
nptl: Remove private futex optimization [BZ #27304]
It is effectively used, unexcept for pthread_cond_destroy, where we do
not want it; see bug 27304. The internal locks do not support a
process-shared mode.
This fixes commit dc6cfdc934db9997c33728082d63552b9eee4563 ("nptl:
Move pthread_cond_destroy implementation into libc").
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
(cherry picked from commit c4ad832276f4dadfa40904109b26a521468f66bc)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-03-16 9:55 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-01 8:22 [Bug nptl/27304] New: pthread_cond_destroy does not pass private flag to futex system calls fweimer at redhat dot com
2021-02-01 8:22 ` [Bug nptl/27304] " fweimer at redhat dot com
2021-02-01 8:47 ` fweimer at redhat dot com
2021-02-01 8:48 ` fweimer at redhat dot com
2021-02-04 14:33 ` cvs-commit at gcc dot gnu.org
2021-02-04 14:35 ` fweimer at redhat dot com
2021-02-07 15:24 ` fweimer at redhat dot com
2021-03-16 9:22 ` fweimer at redhat dot com
2021-03-16 9:55 ` cvs-commit at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).