public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/9] Patch to fix glibc condition variable bug (BZ 25847)
@ 2023-01-28  2:18 malteskarupke
  2023-01-28  2:18 ` [PATCH 1/9] pthreads NPTL: lost wakeup fix 2 malteskarupke
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: malteskarupke @ 2023-01-28  2:18 UTC (permalink / raw)
  To: libc-alpha; +Cc: Malte Skarupke

From: Malte Skarupke <malteskarupke@fastmail.fm>

The following emails are patches to fix the glibc condition variable bug,
BZ 25847.

The first patch is Frank Barrus' patch, as he submitted it on bugzilla.
Patch 2 fixes up comments and indentation, finishing the patch.
Further patches in the series do follow-up clean-up, like removing
unnecessary checks and unnecessary variables.

All of these patches are verified in TLA+ so that I am at least sure
that they don't introduce some similar issue. The condition variable
implementation also got a lot simpler as a result, so it is now much
easier to reason about, further increasing confidence.

The code for the TLA+ checking is here:
https://github.com/skarupke/glibc_tla_plus



Please note that this will probably be my last attempt to submit a
patch. I have submitted two series of patches before and was mostly
greeted with silence. If the same thing happens again, I'm going to give
up on glibc.


Frank Barrus (1):
  pthreads NPTL: lost wakeup fix 2

Malte Skarupke (8):
  nptl: Update comments and indentation for new condvar implementation
  nptl: Remove unnecessary catch-all-wake in condvar group switch
  nptl: Remove unnecessary quadruple check in pthread_cond_wait
  nptl: Remove g_refs from condition variables
  nptl: Use a single loop in pthread_cond_wait instaed of a nested loop
  nptl: Fix indentation
  nptl: rename __condvar_quiesce_and_switch_g1
  nptl: Use all of g1_start and g_signals

 nptl/pthread_cond_broadcast.c           |   8 +-
 nptl/pthread_cond_common.c              | 109 ++--------
 nptl/pthread_cond_signal.c              |  19 +-
 nptl/pthread_cond_wait.c                | 278 +++++-------------------
 nptl/tst-cond22.c                       |  12 +-
 sysdeps/nptl/bits/thread-shared-types.h |   4 +-
 sysdeps/nptl/pthread.h                  |   2 +-
 7 files changed, 100 insertions(+), 332 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-03-18 12:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-28  2:18 [PATCH 0/9] Patch to fix glibc condition variable bug (BZ 25847) malteskarupke
2023-01-28  2:18 ` [PATCH 1/9] pthreads NPTL: lost wakeup fix 2 malteskarupke
2023-01-28  2:18 ` [PATCH 2/9] nptl: Update comments and indentation for new condvar implementation malteskarupke
2023-01-28  2:18 ` [PATCH 3/9] nptl: Remove unnecessary catch-all-wake in condvar group switch malteskarupke
2023-01-28  2:18 ` [PATCH 4/9] nptl: Remove unnecessary quadruple check in pthread_cond_wait malteskarupke
2023-01-28  2:18 ` [PATCH 5/9] nptl: Remove g_refs from condition variables malteskarupke
2023-01-28  2:18 ` [PATCH 6/9] nptl: Use a single loop in pthread_cond_wait instaed of a nested loop malteskarupke
2023-01-28  2:18 ` [PATCH 7/9] nptl: Fix indentation malteskarupke
2023-01-28  2:18 ` [PATCH 8/9] nptl: rename __condvar_quiesce_and_switch_g1 malteskarupke
2023-01-28  2:18 ` [PATCH 9/9] nptl: Use all of g1_start and g_signals malteskarupke
2023-02-08  2:48 ` [PATCH 0/9] Patch to fix glibc condition variable bug (BZ 25847) Malte Skarupke
2023-02-08  2:51   ` Sam James
2023-03-18 12:08     ` Malte Skarupke

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).