GNU bug report logs - #7317
Bug in SLEEP command

Previous Next

Package: coreutils;

Reported by: Андрей Передрий <andi <at> ukr.net>

Date: Tue, 2 Nov 2010 15:46:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 7317 <at> debbugs.gnu.org, ндрей Передрий <andi <at> ukr.net>, А, Eric Blake <eblake <at> redhat.com>
Subject: bug#7317: Bug in SLEEP command
Date: Wed, 03 Nov 2010 13:41:48 +0100
Pádraig Brady wrote:
> On 02/11/10 16:41, Eric Blake wrote:
>> On 11/02/2010 09:46 AM, Андрей Передрий wrote:
>>>
>>> Hello guys!
>>>
>>> I found a bug in 'sleep' command.
>>
>>> As you can see - 'sleep' was terminated by himself after 24 days, 20 hours, 26 minutes and 33 seconds.
>>> 24*24*3600 + 20*3600 + 26*60 + 33 = 2073600 + 72000 + 1560 + 33 = 2147193 seconds
>>> It seems like overflow.
>>> coreutils 6.10-6
>>> Debian 5.0.6
>>
>> Is your system 32-bit or 64-bit?  It makes a difference in determining
>> whether there is a bug in the OS sleep primitives (for example, we know
>> that 64-bit Linux has a bug where nanosleep with an extremely large
>> value will cause the kernel to overflow and sleep for the wrong amount
>> of time, but coreutils has workarounds in place for that).
>
> I had a quick look at the gnulib replacement which
> seems to assume 49 days is the worst case,
> whereas we now need to use 24 days?

Sounds reasonable.  It'd be good to document which kernel(s) are affected.
Have you reproduced it? (i.e., in a VM, changing the date, if that is sufficient)




This bug report was last modified 14 years and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.