clock_nanosleep failure

Dmitry V. Levin ldv at altlinux.org
Mon Jun 5 16:26:27 UTC 2017


On Mon, Jun 05, 2017 at 05:34:16PM +0200, Andreas Schwab wrote:
> A lot of tests fail because clock_nanosleep fails:
> 
> $ ../strace -e clock_nanosleep ./clock_nanosleep >/dev/null
> clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=789985}, NULL) = 0
> clock_nanosleep(CLOCK_REALTIME, 0, NULL, 0xefca3994) = -1 EFAULT (Bad address)
> clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=789985}, 0xefca3994) = 0
> clock_nanosleep(CLOCK_MONOTONIC, 0, {tv_sec=0, tv_nsec=1000000000}, 0xefca3994) = -1 EINVAL (Invalid argument)
> clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=-559038737, tv_nsec=4207869677}, 0xefca3994) = -1 EINVAL (Invalid argument)
> clock_nanosleep(CLOCK_MONOTONIC, 0, {tv_sec=-559038737, tv_nsec=4207869677}, 0xefca3994) = -1 EINVAL (Invalid argument)
> clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=999999999}, {tv_sec=0, tv_nsec=920211999}) = ? ERESTART_RESTARTBLOCK (Interrupted by signal)
> --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---
> clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, {tv_sec=1496676522, tv_nsec=80487000}, 0xefca3994) = ? ERESTARTNOHAND (To be restarted if no handler)
> --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---
> clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, {tv_sec=1496676522, tv_nsec=80487000}, 0xefca3994) = ? ERESTARTNOHAND (To be restarted if no handler)
> --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---
> clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, {tv_sec=1496676522, tv_nsec=80487000}, 0xefca3994) = ? ERESTARTNOHAND (To be restarted if no handler)
> --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---
> clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, {tv_sec=1496676522, tv_nsec=80487000}, 0xefca3994) = ? ERESTARTNOHAND (To be restarted if no handler)
> --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---
> clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, {tv_sec=1496676522, tv_nsec=80487000}, 0xefca3994) = 0

Why clock_nanosleep is restarted after being interrupted by a signal handler?
What kind of kernel is behaving this way?


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170605/a4c36a4c/attachment.bin>


More information about the Strace-devel mailing list