From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 02 11:46:01 2010 Received: (at submit) by debbugs.gnu.org; 2 Nov 2010 15:46:01 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDJ3g-0000EQ-SP for submit@debbugs.gnu.org; Tue, 02 Nov 2010 11:46:01 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDJ0G-0000Cb-F9 for submit@debbugs.gnu.org; Tue, 02 Nov 2010 11:42:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PDJ4U-0000dR-4d for submit@debbugs.gnu.org; Tue, 02 Nov 2010 11:46:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DNS_FROM_RFC_DSN, FREEMAIL_FROM, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:54843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PDJ4U-0000dN-11 for submit@debbugs.gnu.org; Tue, 02 Nov 2010 11:46:50 -0400 Received: from [140.186.70.92] (port=59048 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDJ4N-0005Ip-CW for bug-coreutils@gnu.org; Tue, 02 Nov 2010 11:46:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PDJ4L-0000cd-Of for bug-coreutils@gnu.org; Tue, 02 Nov 2010 11:46:43 -0400 Received: from ffe10.ukr.net ([195.214.192.60]:62924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PDJ4L-0000bz-IC for bug-coreutils@gnu.org; Tue, 02 Nov 2010 11:46:41 -0400 Received: from mail by ffe10.ukr.net with local ID 1PDJ4H-0007rR-8k for bug-coreutils@gnu.org; Tue, 02 Nov 2010 17:46:37 +0200 Date: Tue, 02 Nov 2010 17:46:37 +0200 Message-Id: MIME-Version: 1.0 Content-Disposition: inline Content-Length: 455 Content-Transfer-Encoding: binary Content-Type: text/plain; charset="windows-1251" Subject: Bug in SLEEP command To: bug-coreutils@gnu.org From: =?WINDOWS-1251?B?wO3k8OXpIM/l8OXk8Ojp?= X-Mailer: Freemail 0 X-Originating-Ip: 192.168.65.89, 91.216.161.114 via proxy [91.216.161.114] X-Browser: Opera/9.80 (X11; Linux i686; U; en) Presto/2.2.15 Version/10.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Listed-In-DSN: by eggs.gnu.org: ukr.net is listed in dsn.rfc-ignorant.org (Not supporting null originator (DSN)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.1 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 02 Nov 2010 11:45:59 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.1 (-----) 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 02 12:37:22 2010 Received: (at 7317) by debbugs.gnu.org; 2 Nov 2010 16:37:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDJrN-0000ad-SB for submit@debbugs.gnu.org; Tue, 02 Nov 2010 12:37:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDJrL-0000aY-Bc for 7317@debbugs.gnu.org; Tue, 02 Nov 2010 12:37:20 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oA2GffuG031501 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 2 Nov 2010 12:41:41 -0400 Received: from [10.3.113.115] (ovpn-113-115.phx2.redhat.com [10.3.113.115]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oA2GfetL014236; Tue, 2 Nov 2010 12:41:40 -0400 Message-ID: <4CD03F44.5020804@redhat.com> Date: Tue, 02 Nov 2010 10:41:40 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100827 Red Hat/3.1.3-1.el6 Mnenhy/0.8.3 Thunderbird/3.1.3 MIME-Version: 1.0 To: =?windows-1251?Q?=C0=ED=E4=F0=E5=E9_=CF=E5=F0=E5=E4=F0=E8=E9?= Subject: Re: bug#7317: Bug in SLEEP command References: In-Reply-To: X-Enigmail-Version: 1.1.2 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig3193D7A2B62FD84FA8588F3C" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-Spam-Score: -10.1 (----------) X-Debbugs-Envelope-To: 7317 Cc: 7317@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.1 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3193D7A2B62FD84FA8588F3C Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable On 11/02/2010 09:46 AM, =C0=ED=E4=F0=E5=E9 =CF=E5=F0=E5=E4=F0=E8=E9 wrote= : >=20 > Hello guys! >=20 > I found a bug in 'sleep' command. > As you can see - 'sleep' was terminated by himself after 24 days, 20 ho= urs, 26 minutes and 33 seconds. > 24*24*3600 + 20*3600 + 26*60 + 33 =3D 2073600 + 72000 + 1560 + 33 =3D 2= 147193 seconds > It seems like overflow. > coreutils 6.10-6 > Debian 5.0.6 =20 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). Also, consider upgrading; the latest stable coreutils release is 8.6, and there have been some gnulib fixes in the meantime to improve the robustness of the sleep workarounds in use by coreutils. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig3193D7A2B62FD84FA8588F3C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJM0D9EAAoJEKeha0olJ0Nq0B0H/3U3x3eAVtkEvSB3NeLz2Utw nMzjo0F9V0YMo88Ynde/tIKrWK47A0c5nh83eSYoL+7UaAbfYD1atT84qI9JAw51 blzpgVg68a59Zm7BeBVHiK30jEs/WDEcxy+eF6Lk1WvUM4fs20xHmp83N0AkQugt BXIbYtfcfGB71KLIsV9C2OlqvaRWHZUnhv3I7lxQAucoy67W4dkXWaoEbNsCnsUB xyNFRh3mUCijSBfhF5D3OcA98O94ALL5NGhBQxqO396dUkeLDUtK8zeCj8qKHWW+ BHAT/JUv0NVUgA5PTTO6PPaub2XhYjRs1D6omuwEttfBezECzMcaMgItK8wbvgw= =xDX8 -----END PGP SIGNATURE----- --------------enig3193D7A2B62FD84FA8588F3C-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 02 12:55:04 2010 Received: (at 7317) by debbugs.gnu.org; 2 Nov 2010 16:55:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDK8W-0000he-3W for submit@debbugs.gnu.org; Tue, 02 Nov 2010 12:55:04 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1PDK8T-0000hI-Q4 for 7317@debbugs.gnu.org; Tue, 02 Nov 2010 12:55:02 -0400 Received: (qmail 74877 invoked from network); 2 Nov 2010 16:59:23 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 2 Nov 2010 16:59:23 -0000 Message-ID: <4CD0436B.6000608@draigBrady.com> Date: Tue, 02 Nov 2010 16:59:23 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: =?UTF-8?B?0JDQvdC00YDQtdC5INCf0LXRgNC10LTRgNC40Lk=?= Subject: Re: bug#7317: Bug in SLEEP command References: In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 7317 Cc: 7317@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) On 02/11/10 15:46, Андрей Передрий wrote: > > 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 eek! That's lenny right, with kernel 2.6.32 or so. POSIX says that we should support 2147483647 seconds at least. We could make multiple calls to xnanosleep if the param is greater than that, but do we really need to support > 68 years. Currently we silently truncate to this limit. Anyway could you send the output of: strace sleep 36500d On 64 bit lenny here I get: nanosleep({3153600000, 0}, On 32 bit Fedora 11 I get: nanosleep({2147483647, 999999999} If you get a large value being passed down, then it suggests an issue with glibc/kernel? cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 02 13:26:33 2010 Received: (at 7317) by debbugs.gnu.org; 2 Nov 2010 17:26:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDKcy-0000v0-Q8 for submit@debbugs.gnu.org; Tue, 02 Nov 2010 13:26:33 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1PDKcw-0000ur-RD for 7317@debbugs.gnu.org; Tue, 02 Nov 2010 13:26:31 -0400 Received: (qmail 81105 invoked from network); 2 Nov 2010 17:30:52 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 2 Nov 2010 17:30:52 -0000 Message-ID: <4CD04ACB.9020902@draigBrady.com> Date: Tue, 02 Nov 2010 17:30:51 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Eric Blake Subject: Re: bug#7317: Bug in SLEEP command References: <4CD03F44.5020804@redhat.com> In-Reply-To: <4CD03F44.5020804@redhat.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 7317 Cc: 7317@debbugs.gnu.org, =?UTF-8?B?0JDQvdC00YDQtdC5INCf0LXRgNC10LTRgNC40Lk=?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) 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? cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 02 13:35:51 2010 Received: (at 7317) by debbugs.gnu.org; 2 Nov 2010 17:35:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDKlz-0000z6-Ac for submit@debbugs.gnu.org; Tue, 02 Nov 2010 13:35:51 -0400 Received: from ffe6.ukr.net ([195.214.192.56]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDKl6-0000yK-6z for 7317@debbugs.gnu.org; Tue, 02 Nov 2010 13:34:57 -0400 Received: from mail by ffe6.ukr.net with local ID 1PDKpI-0008Qo-Lm ; Tue, 02 Nov 2010 19:39:16 +0200 Date: Tue, 02 Nov 2010 19:39:16 +0200 Message-Id: MIME-Version: 1.0 Content-Disposition: inline Content-Length: 4855 Content-Transfer-Encoding: binary Content-Type: text/plain; charset="windows-1251" Subject: Re: bug#7317: Bug in SLEEP command In-Reply-To: <4CD03F44.5020804@redhat.com> References: <4CD03F44.5020804@redhat.com> To: "Eric Blake" From: =?WINDOWS-1251?B?wO3k8OXpIM/l8OXk8Ojp?= X-Mailer: Freemail 0 X-Originating-Ip: 192.168.65.89, 91.216.161.114 via proxy [91.216.161.114] X-Browser: Opera/9.80 (X11; Linux i686; U; en) Presto/2.2.15 Version/10.11 X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: 7317 X-Mailman-Approved-At: Tue, 02 Nov 2010 13:35:50 -0400 Cc: 7317@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) > > > > 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). > > Also, consider upgrading; the latest stable coreutils release is 8.6, > and there have been some gnulib fixes in the meantime to improve the > robustness of the sleep workarounds in use by coreutils. > I am sorry! Correct platform is: RHEL & Centos 4.6 & 4.8 2.6.9-89.0.23.ELsmp strace sleep 36500d execve("/bin/sleep", ["sleep", "36500d"], [/* 20 vars */]) = 0 uname({sys="Linux", node="gate.shipregistr.kiev.ua", ...}) = 0 brk(0) = 0x9541000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=20328, ...}) = 0 old_mmap(NULL, 20328, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f56000 close(3) = 0 open("/lib/tls/libm.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0003\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=212236, ...}) = 0 old_mmap(NULL, 139424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x54d000 old_mmap(0x56e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x20000) = 0x56e000 close(3) = 0 open("/lib/tls/librt.so.1", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320 \0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=48788, ...}) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f55000 old_mmap(NULL, 81656, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x28b000 old_mmap(0x293000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x293000 old_mmap(0x295000, 40696, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x295000 close(3) = 0 open("/lib/tls/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200O\1\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1544948, ...}) = 0 old_mmap(NULL, 1244380, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x111000 old_mmap(0x23b000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x129000) = 0x23b000 old_mmap(0x23f000, 7388, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x23f000 close(3) = 0 open("/lib/tls/libpthread.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0PH\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=105912, ...}) = 0 old_mmap(NULL, 70108, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x650000 old_mmap(0x65e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd000) = 0x65e000 old_mmap(0x660000, 4572, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x660000 close(3) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f54000 mprotect(0x65e000, 4096, PROT_READ) = 0 mprotect(0x23b000, 8192, PROT_READ) = 0 mprotect(0x293000, 4096, PROT_READ) = 0 mprotect(0x56e000, 4096, PROT_READ) = 0 mprotect(0xfbe000, 4096, PROT_READ) = 0 set_thread_area({entry_number:-1 -> 6, base_addr:0xb7f546c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 munmap(0xb7f56000, 20328) = 0 set_tid_address(0xb7f54708) = 19936 rt_sigaction(SIGRTMIN, {0x654380, [], SA_RESTORER|SA_SIGINFO, 0x65bc90}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {0x6543f0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x65bc90}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0 _sysctl({{CTL_KERN, KERN_VERSION}, 2, 0xbfe5e27c, 35, (nil), 0}) = 0 brk(0) = 0x9541000 brk(0x9562000) = 0x9562000 clock_gettime(CLOCK_REALTIME, {1288719488, 927427000}) = 0 nanosleep({2147483647, 999999999}, -- A.P. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 02 13:37:33 2010 Received: (at 7317) by debbugs.gnu.org; 2 Nov 2010 17:37:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDKnc-000100-Qb for submit@debbugs.gnu.org; Tue, 02 Nov 2010 13:37:32 -0400 Received: from ffe2.ukr.net ([195.214.192.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDKnb-0000zt-Cg for 7317@debbugs.gnu.org; Tue, 02 Nov 2010 13:37:32 -0400 Received: from mail by ffe2.ukr.net with local ID 1PDKro-0000e5-V1 ; Tue, 02 Nov 2010 19:41:52 +0200 Date: Tue, 02 Nov 2010 19:41:52 +0200 Message-Id: MIME-Version: 1.0 Content-Disposition: inline Content-Length: 1372 Content-Transfer-Encoding: binary Content-Type: text/plain; charset="windows-1251" Subject: Re: bug#7317: Bug in SLEEP command In-Reply-To: <4CD0436B.6000608@draigBrady.com> References: <4CD0436B.6000608@draigBrady.com> To: =?WINDOWS-1251?B?UMOhZHJhaWcgQnJhZHk=?= From: =?WINDOWS-1251?B?wO3k8OXpIM/l8OXk8Ojp?= X-Mailer: Freemail 0 X-Originating-Ip: 192.168.65.89, 91.216.161.114 via proxy [91.216.161.114] X-Browser: Opera/9.80 (X11; Linux i686; U; en) Presto/2.2.15 Version/10.11 X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 7317 Cc: 7317@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > On 02/11/10 15:46, wrote: > > > > 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 > > eek! > That's lenny right, with kernel 2.6.32 or so. > > POSIX says that we should support 2147483647 seconds at least. > We could make multiple calls to xnanosleep if the param is > greater than that, but do we really need to support > 68 years. > Currently we silently truncate to this limit. > > Anyway could you send the output of: strace sleep 36500d > > On 64 bit lenny here I get: nanosleep({3153600000, 0}, > On 32 bit Fedora 11 I get: nanosleep({2147483647, 999999999} > > If you get a large value being passed down, > then it suggests an issue with glibc/kernel? > > cheers, > P?draig. uname -a Linux ************* 2.6.9-89.0.23.ELsmp #1 SMP Wed Mar 17 06:55:21 EDT 2010 i686 athlon i386 GNU/Linux cat /etc/redhat-release CentOS release 4.8 (Final) -- A.P. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 03 08:37:28 2010 Received: (at 7317) by debbugs.gnu.org; 3 Nov 2010 12:37:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDcam-0000k4-GS for submit@debbugs.gnu.org; Wed, 03 Nov 2010 08:37:28 -0400 Received: from mx.meyering.net ([82.230.74.64]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDcaj-0000jz-Iw for 7317@debbugs.gnu.org; Wed, 03 Nov 2010 08:37:26 -0400 Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id 83C9F602D6; Wed, 3 Nov 2010 13:41:48 +0100 (CET) From: Jim Meyering To: =?utf-8?Q?P=C3=A1draig?= Brady Subject: Re: bug#7317: Bug in SLEEP command In-Reply-To: <4CD04ACB.9020902@draigBrady.com> (=?utf-8?Q?=22P=C3=A1draig?= Brady"'s message of "Tue, 02 Nov 2010 17:30:51 +0000") References: <4CD03F44.5020804@redhat.com> <4CD04ACB.9020902@draigBrady.com> Date: Wed, 03 Nov 2010 13:41:48 +0100 Message-ID: <87r5f2d1f7.fsf@meyering.net> Lines: 26 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: 7317 Cc: 7317@debbugs.gnu.org, =?utf-8?B?0L3QtNGA0LXQuSDQn9C10YDQtdC00YDQuNC5?= , =?utf-8?B?0JA=?=, Eric Blake X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) P=C3=A1draig Brady wrote: > On 02/11/10 16:41, Eric Blake wrote: >> On 11/02/2010 09:46 AM, =D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9 =D0=9F=D0= =B5=D1=80=D0=B5=D0=B4=D1=80=D0=B8=D0=B9 wrote: >>> >>> Hello guys! >>> >>> I found a bug in 'sleep' command. >> >>> As you can see - 'sleep' was terminated by himself after 24 days, 20 ho= urs, 26 minutes and 33 seconds. >>> 24*24*3600 + 20*3600 + 26*60 + 33 =3D 2073600 + 72000 + 1560 + 33 =3D 2= 147193 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 suffi= cient) From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 03 10:17:37 2010 Received: (at 7317) by debbugs.gnu.org; 3 Nov 2010 14:17:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDe9g-0001JQ-Oo for submit@debbugs.gnu.org; Wed, 03 Nov 2010 10:17:37 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1PDe9e-0001JL-Ra for 7317@debbugs.gnu.org; Wed, 03 Nov 2010 10:17:36 -0400 Received: (qmail 79623 invoked from network); 3 Nov 2010 14:21:58 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 3 Nov 2010 14:21:58 -0000 Message-ID: <4CD17001.5070602@draigBrady.com> Date: Wed, 03 Nov 2010 14:21:53 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Jim Meyering Subject: Re: bug#7317: Bug in SLEEP command References: <4CD03F44.5020804@redhat.com> <4CD04ACB.9020902@draigBrady.com> <87r5f2d1f7.fsf@meyering.net> In-Reply-To: <87r5f2d1f7.fsf@meyering.net> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 7317 Cc: 7317@debbugs.gnu.org, =?UTF-8?B?0JDQvQ==?=, Eric Blake , =?UTF-8?B?0LTRgNC10Lkg0J/QtdGA0LXQtNGA0LjQuQ==?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) On 03/11/10 12:41, Jim Meyering wrote: > 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) > The only mention in the gnulib nanosleep docs about linux is: "This function mishandles large arguments when interrupted by a signal on some platforms: Linux 64-bit, Solaris 64-bit." This may or may not be related to: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1711ef38 So the OPs case seems different I think in that he's using 32 bit on RHEL & Centos 4.6 & 4.8 with 2.6.9-89.0.23.ELsmp I'm not sure if setting the date is enough. I tried on my 2.6.30 32bit laptop with no issue. Андрей did you set the date, or did you really wait 24 days :) This reminds me of a more general idea I noticed recently: http://rwmj.wordpress.com/2010/10/14/half-baked-ideas-accelerated-testing-for-vms/ cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 03 11:00:29 2010 Received: (at 7317) by debbugs.gnu.org; 3 Nov 2010 15:00:29 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDepA-0001ax-Q9 for submit@debbugs.gnu.org; Wed, 03 Nov 2010 11:00:29 -0400 Received: from ffe15.ukr.net ([195.214.192.50]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDep8-0001as-Cj for 7317@debbugs.gnu.org; Wed, 03 Nov 2010 11:00:27 -0400 Received: from mail by ffe15.ukr.net with local ID 1PDetN-000FYj-E4 ; Wed, 03 Nov 2010 17:04:49 +0200 Date: Wed, 03 Nov 2010 17:04:49 +0200 Message-Id: MIME-Version: 1.0 Content-Disposition: inline Content-Length: 2152 Content-Transfer-Encoding: binary Content-Type: text/plain; charset="windows-1251" Subject: Re: bug#7317: Bug in SLEEP command In-Reply-To: <4CD17001.5070602@draigBrady.com> References: <4CD17001.5070602@draigBrady.com> <4CD03F44.5020804@redhat.com> <4CD04ACB.9020902@draigBrady.com> <87r5f2d1f7.fsf@meyering.net> To: =?WINDOWS-1251?B?UMOhZHJhaWcgQnJhZHk=?= From: =?WINDOWS-1251?B?wO3k8OXpIM/l8OXk8Ojp?= X-Mailer: Freemail 0 X-Originating-Ip: 192.168.65.89, 91.216.161.114 via proxy [91.216.161.114] X-Browser: Opera/9.80 (X11; Linux i686; U; en) Presto/2.2.15 Version/10.11 X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 7317 Cc: 7317@debbugs.gnu.org, Eric Blake , Jim Meyering X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.7 (-) > On 03/11/10 12:41, Jim Meyering wrote: > > 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) > > > > The only mention in the gnulib nanosleep docs about linux is: > > "This function mishandles large arguments when interrupted by > a signal on some platforms: Linux 64-bit, Solaris 64-bit." > > This may or may not be related to: > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1711ef38 > > So the OPs case seems different I think in that he's using 32 bit > on RHEL & Centos 4.6 & 4.8 with 2.6.9-89.0.23.ELsmp > > I'm not sure if setting the date is enough. > I tried on my 2.6.30 32bit laptop with no issue. > did you set the date, or did you really wait 24 days :) I really wait 24 days :) I used command "sleep 36500d" in my script for infinite loop organization. I tested this 2 times in RHEL4.6 in real (non virtualized) environment. And 1 time in Centos48 (in real env) So I found this bug firstly 49 days ago :) -- A.P. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 03 14:00:59 2010 Received: (at 7317) by debbugs.gnu.org; 3 Nov 2010 18:00:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDhdq-0002iX-Se for submit@debbugs.gnu.org; Wed, 03 Nov 2010 14:00:59 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PDhdo-0002iS-5O for 7317@debbugs.gnu.org; Wed, 03 Nov 2010 14:00:57 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 0994A39E80DC; Wed, 3 Nov 2010 11:05:21 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ThYDiF5f+H-t; Wed, 3 Nov 2010 11:05:20 -0700 (PDT) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id A739239E80DB; Wed, 3 Nov 2010 11:05:20 -0700 (PDT) Message-ID: <4CD1A459.4070400@cs.ucla.edu> Date: Wed, 03 Nov 2010 11:05:13 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10 MIME-Version: 1.0 To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= Subject: Re: bug#7317: Bug in SLEEP command References: <4CD03F44.5020804@redhat.com> <4CD04ACB.9020902@draigBrady.com> <87r5f2d1f7.fsf@meyering.net> <4CD17001.5070602@draigBrady.com> In-Reply-To: <4CD17001.5070602@draigBrady.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 7317 Cc: =?UTF-8?Q?=D0=90=D0=BD@debbugs.gnu.org, Jim Meyering , 7317@debbugs.gnu.org, =?UTF-8?B?0LXQuSDQn9C10YDQtdC00YDQuNC5?= , =?UTF-8?B?0LTRgA==?=, ?= Eric Blake X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) On 11/03/10 07:21, P=C3=A1draig Brady wrote: >>> 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? It's worse than that, no? We need a test in m4/nanosleep.m4 that detects the bug. If 'configure' can't reliably detect the bug, it'll have to assume that it's present, and always replace nanosleep. Perhaps we can limit this assumption to all 32-bit Linux platforms, but still, it'd be nicer if we could reliably detect this bug (and we don't want "configure" to run for 24.4 days to find out!). From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 12 09:29:30 2010 Received: (at 7317-done) by debbugs.gnu.org; 12 Nov 2010 14:29:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PGud8-0005mB-FW for submit@debbugs.gnu.org; Fri, 12 Nov 2010 09:29:30 -0500 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1PGud5-0005m6-WA for 7317-done@debbugs.gnu.org; Fri, 12 Nov 2010 09:29:28 -0500 Received: (qmail 34460 invoked from network); 12 Nov 2010 14:34:15 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 12 Nov 2010 14:34:15 -0000 Message-ID: <4CDD5059.1030607@draigBrady.com> Date: Fri, 12 Nov 2010 14:34:01 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 Subject: Re: bug#7317: Bug in SLEEP command References: <4CD03F44.5020804@redhat.com> <4CD04ACB.9020902@draigBrady.com> In-Reply-To: <4CD04ACB.9020902@draigBrady.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 7317-done Cc: 7317-done@debbugs.gnu.org, =?UTF-8?B?0LjQuQ==?= , =?UTF-8?B?0JDQvdC00YDQtdC5INCf0LXRgNC10LTRgA==?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) 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. From unknown Fri Aug 15 15:38:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 11 Dec 2010 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator