Comment 3 for bug 1896281

Revision history for this message
In , Balint Reczey (rbalint) wrote :

When sched_rr_get_interval_time64 is not implemented glibc falls back to sched_rr_get_interval syscall but does not clear errno.

This breaks 'unhide quick' and a few other unhide commands giving false positives as a result.

The problem is observed only on armhf in Ubuntu CI.

https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1896281

test.c:
#include <stdio.h>
#include <errno.h>
#include <sched.h>
int main() {
  struct timespec tp;
  errno = 0;
  sched_rr_get_interval(1, &tp);
  perror("error");
  return 0;
}

strace ./a.out
...
sched_rr_get_interval_time64(1, 0xfff88678) = -1 ENOSYS (Function not implemented)
sched_rr_get_interval(1, {tv_sec=0, tv_nsec=0}) = 0
dup(2) = 3
fcntl64(3, F_GETFL) = 0x402 (flags O_RDWR|O_APPEND)
brk(NULL) = 0x1942000
brk(0x1963000) = 0x1963000
fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}) = 0
write(3, "error: Function not implemented\n", 32error: Function not implemented
) = 32
...

...