bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

race condition in test-pthread_sigmask1?


From: Bruno Haible
Subject: race condition in test-pthread_sigmask1?
Date: Sun, 18 Sep 2022 01:00:55 +0200

On a machine with openSUSE 15.2 (Linux 5.3.18, glibc 2.26) I see a test
failure (once only, not repeatable):

../../gltests/test-pthread_sigmask1.c:78: assertion 'sigint_occurred == 1' 
failed
FAIL test-pthread_sigmask1 (exit status: 134)

It looks like the only way this can happen is when
1) the process has more than one thread,
2) the signal has arrived in the process, and the signal handler is being
   executed but before the 'sigint_occurred++;' statement.

But I don't understand it: This test program is not multithreaded.

Any idea how we can make the test more reliable?

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]