Subject: bug#7317: closed (Re: bug#7317: Bug in SLEEP command)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 12 Nov 2010 14:30:03 +0000

Your bug report

#7317: Bug in SLEEP command

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
7317: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7317
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#7317: Bug in SLEEP command
From: Pádraig Brady <[email-masked]>
Cc: [email-masked], ий <[email-masked]>,Андрей Передр
Date: Fri, 12 Nov 2010 14:34:01 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

On 02/11/10 17:30, 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?

Fixed with:
http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commit;h=2f2b6680

cheers,
Pádraig.

Subject: Bug in SLEEP command
From: Андрей Передрий <[email-masked]>
To: [email-masked]
Date: Tue, 02 Nov 2010 17:46:37 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello guys!

I found a bug in 'sleep' command.
Please see below:

# date
Tue Oct  5 14:12:11 EEST 2010
[root@gate ~]# sleep 36500d ; date
Sat Oct 30 10:38:44 EEST 2010
[root@gate ~]#

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  

--
A.P.