public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/29271] New: clock_nanosleep(2) fails to report EINTR
@ 2022-06-20 20:40 steffen at sdaoden dot eu
  2022-06-20 20:41 ` [Bug libc/29271] " steffen at sdaoden dot eu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: steffen at sdaoden dot eu @ 2022-06-20 20:40 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 29271
           Summary: clock_nanosleep(2) fails to report EINTR
           Product: glibc
           Version: 2.35
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: steffen at sdaoden dot eu
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Created attachment 14156
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14156&action=edit
T

This is kernel 5.15.48, and it is glibc 2.35 patch 1.
You can adjust two switches at file top, you will see kernel syscall(2) works
correctly, but glibc fails.

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

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

* [Bug libc/29271] clock_nanosleep(2) fails to report EINTR
  2022-06-20 20:40 [Bug libc/29271] New: clock_nanosleep(2) fails to report EINTR steffen at sdaoden dot eu
@ 2022-06-20 20:41 ` steffen at sdaoden dot eu
  2022-06-20 21:41 ` fweimer at redhat dot com
  2022-06-21  2:43 ` adhemerval.zanella at linaro dot org
  2 siblings, 0 replies; 4+ messages in thread
From: steffen at sdaoden dot eu @ 2022-06-20 20:41 UTC (permalink / raw)
  To: glibc-bugs

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

Steffen (Daode) Nurpmeso <steffen at sdaoden dot eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
           Priority|P2                          |P1
                 CC|                            |steffen at sdaoden dot eu

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

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

* [Bug libc/29271] clock_nanosleep(2) fails to report EINTR
  2022-06-20 20:40 [Bug libc/29271] New: clock_nanosleep(2) fails to report EINTR steffen at sdaoden dot eu
  2022-06-20 20:41 ` [Bug libc/29271] " steffen at sdaoden dot eu
@ 2022-06-20 21:41 ` fweimer at redhat dot com
  2022-06-21  2:43 ` adhemerval.zanella at linaro dot org
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2022-06-20 21:41 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
                 CC|                            |fweimer at redhat dot com
              Flags|                            |security-

--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
According to POSIX, clock_nanosleep does not set errno on failure, and the
glibc implementation does not do so, either.

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

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

* [Bug libc/29271] clock_nanosleep(2) fails to report EINTR
  2022-06-20 20:40 [Bug libc/29271] New: clock_nanosleep(2) fails to report EINTR steffen at sdaoden dot eu
  2022-06-20 20:41 ` [Bug libc/29271] " steffen at sdaoden dot eu
  2022-06-20 21:41 ` fweimer at redhat dot com
@ 2022-06-21  2:43 ` adhemerval.zanella at linaro dot org
  2 siblings, 0 replies; 4+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-06-21  2:43 UTC (permalink / raw)
  To: glibc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #2 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
As Florian has pointed out, you need to check for clock_nanosleep return code
instead of errno to check if it has failed.  On you example, if it does return
4 (EINTR).

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

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

end of thread, other threads:[~2022-06-21  2:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-20 20:40 [Bug libc/29271] New: clock_nanosleep(2) fails to report EINTR steffen at sdaoden dot eu
2022-06-20 20:41 ` [Bug libc/29271] " steffen at sdaoden dot eu
2022-06-20 21:41 ` fweimer at redhat dot com
2022-06-21  2:43 ` 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).