public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/14232] New: tst-cancel7 and tst-cancelx7 race condition
@ 2012-06-13 19:12 jsm28 at gcc dot gnu.org
  2014-06-19 14:30 ` [Bug nptl/14232] " fweimer at redhat dot com
  2021-08-26 20:14 ` adhemerval.zanella at linaro dot org
  0 siblings, 2 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-06-13 19:12 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14232

             Bug #: 14232
           Summary: tst-cancel7 and tst-cancelx7 race condition
           Product: glibc
           Version: 2.15
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jsm28@gcc.gnu.org
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


The test nptl/tst-cancel7 (and so tst-cancelx7) has a race condition that can
cause failures with "could not read pid" in tst-cancel7.out.

Suppose the function sl waits a while between opening the output file and
writing to it.  Then cancellation of that thread takes effect without the
output having been written and flushed.  This can be reproduced reliably on
x86_64 by inserting a delay loop, e.g.:

diff --git a/nptl/tst-cancel7.c b/nptl/tst-cancel7.c
index 0a972e6..efe46ef 100644
--- a/nptl/tst-cancel7.c
+++ b/nptl/tst-cancel7.c
@@ -42,6 +42,7 @@ tf (void *arg)
   return NULL;
 }

+volatile unsigned long long ll = 0;

 static void
 sl (void)
@@ -50,6 +51,9 @@ sl (void)
   if (f == NULL)
     exit (1);

+  for (ll = 0; ll < (1ULL << 34); ll++)
+    ;
+
   fprintf (f, "%lld\n", (long long) getpid ());
   fflush (f);

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug nptl/14232] tst-cancel7 and tst-cancelx7 race condition
  2012-06-13 19:12 [Bug nptl/14232] New: tst-cancel7 and tst-cancelx7 race condition jsm28 at gcc dot gnu.org
@ 2014-06-19 14:30 ` fweimer at redhat dot com
  2021-08-26 20:14 ` adhemerval.zanella at linaro dot org
  1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2014-06-19 14:30 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=14232

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug nptl/14232] tst-cancel7 and tst-cancelx7 race condition
  2012-06-13 19:12 [Bug nptl/14232] New: tst-cancel7 and tst-cancelx7 race condition jsm28 at gcc dot gnu.org
  2014-06-19 14:30 ` [Bug nptl/14232] " fweimer at redhat dot com
@ 2021-08-26 20:14 ` adhemerval.zanella at linaro dot org
  1 sibling, 0 replies; 3+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2021-08-26 20:14 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=14232

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg
           Assignee|unassigned at sourceware dot org   |adhemerval.zanella at linaro dot o
                   |                            |rg
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.35

--- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Fixed on 2.35.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2021-08-26 20:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-13 19:12 [Bug nptl/14232] New: tst-cancel7 and tst-cancelx7 race condition jsm28 at gcc dot gnu.org
2014-06-19 14:30 ` [Bug nptl/14232] " fweimer at redhat dot com
2021-08-26 20:14 ` adhemerval.zanella at linaro dot 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).