GNU bug report logs - #7061
loop on touch (fdutimens)

Previous Next

Package: coreutils;

Reported by: C de-Avillez <hggdh2 <at> ubuntu.com>

Date: Sat, 18 Sep 2010 00:48:02 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7061 in the body.
You can then email your comments to 7061 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#7061; Package coreutils. (Sat, 18 Sep 2010 00:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to C de-Avillez <hggdh2 <at> ubuntu.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 18 Sep 2010 00:48:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: C de-Avillez <hggdh2 <at> ubuntu.com>
To: Bug Coreutils <bug-coreutils <at> gnu.org>
Subject: loop on touch (fdutimens)
Date: Fri, 17 Sep 2010 19:49:45 -0500
[Message part 1 (text/plain, inline)]
Hello,

I just built & ran a quick test on coreutils GIT. I received a SEGV on
touch, and ran it under GDB.

Looks like a loop.

Cheers,

cerdea <at> xango2:/build/buildd/coreutils$ gdb --args src/touch test
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /src/buildd/coreutils/src/touch...done.
(gdb) set pagination off
(gdb) r
Starting program: /src/buildd/coreutils/src/touch test
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00000000004073dc in fdutimens (fd=0, file=0x0, timespec=0x0) at utimens.c:193
193           if (dup2 (fd, fd) != fd)
(gdb) bt 3 full
#0  0x00000000004073dc in fdutimens (fd=0, file=0x0, timespec=0x0) at utimens.c:193
        adjusted_timespec = {{tv_sec = 0, tv_nsec = 0}, {tv_sec = 0, tv_nsec = 0}}
        ts = 0x0
        adjustment_needed = 0
        st = <error reading variable st (Cannot access memory at address 0x7fffff5fef70)>
#1  0x00000000004072aa in fdutimens (fd=0, file=0x0, timespec=0x0) at utimens.c:269
        result = <value optimized out>
        adjusted_timespec = {{tv_sec = 0, tv_nsec = 0}, {tv_sec = 0, tv_nsec = 0}}
        ts = 0x0
        adjustment_needed = <value optimized out>
        st = {st_dev = 0, st_ino = 0, st_nlink = 0, st_mode = 0, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 0, st_blksize = 0, st_blocks = 0, st_atim = {tv_sec = 0, tv_nsec = 0}, st_mtim = {tv_sec = 0, tv_nsec = 0}, st_ctim = {tv_sec = 0, tv_nsec = 0}, __unused = {0, 0, 0}}
#2  0x00000000004072aa in fdutimens (fd=0, file=0x0, timespec=0x0) at utimens.c:269
        result = <value optimized out>
        adjusted_timespec = {{tv_sec = 0, tv_nsec = 0}, {tv_sec = 0, tv_nsec = 0}}
        ts = 0x0
        adjustment_needed = <value optimized out>
        st = {st_dev = 0, st_ino = 0, st_nlink = 0, st_mode = 0, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 0, st_blksize = 0, st_blocks = 0, st_atim = {tv_sec = 0, tv_nsec = 0}, st_mtim = {tv_sec = 0, tv_nsec = 0}, st_ctim = {tv_sec = 0, tv_nsec = 0}, __unused = {0, 0, 0}}
(More stack frames follow...)
(gdb) bt -5 full
#38527 0x00000000004072aa in fdutimens (fd=0, file=0x0, timespec=0x0) at utimens.c:269
        result = <value optimized out>
        adjusted_timespec = {{tv_sec = 8589924528, tv_nsec = 0}, {tv_sec = 0, tv_nsec = 4197073}}
        ts = 0x0
        adjustment_needed = <value optimized out>
        st = {st_dev = 4197129, st_ino = 140737354130624, st_nlink = 140737488345056, st_mode = 4160562656, st_uid = 32767, st_gid = 4294957064, __pad0 = 32767, st_rdev = 140737354129768, st_size = 255564379, st_blksize = 140737351936210, st_blocks = 0, st_atim = {tv_sec = 140737353950688, tv_nsec = 140733193388033}, st_mtim = {tv_sec = 0, tv_nsec = 1}, st_ctim = {tv_sec = 140737354129768, tv_nsec = 0}, __unused = {140737353950688, 1, 0}}
#38528 0x00000000004072aa in fdutimens (fd=0, file=0x0, timespec=0x0) at utimens.c:269
        result = <value optimized out>
        adjusted_timespec = {{tv_sec = 5, tv_nsec = 0}, {tv_sec = 0, tv_nsec = 140737351981093}}
        ts = 0x0
        adjustment_needed = <value optimized out>
        st = {st_dev = 29848917, st_ino = 2, st_nlink = 140737349750208, st_mode = 0, st_uid = 0, st_gid = 4152746968, __pad0 = 32767, st_rdev = 140737354115432, st_size = 0, st_blksize = 4294967295, st_blocks = 24, st_atim = {tv_sec = 1, tv_nsec = 6336552}, st_mtim = {tv_sec = 0, tv_nsec = 1}, st_ctim = {tv_sec = 0, tv_nsec = 0}, __unused = {140737351953297, 1, 0}}
#38529 0x00000000004024e2 in fdutimensat (fd=0, dir=-100, file=0x7fffffffde74 "test", ts=0x0, atflag=0) at fdutimensat.c:48
        result = 1
#38530 0x0000000000401f21 in touch (argc=2, argv=0x7fffffffdad8) at touch.c:166
        ok = <value optimized out>
        fd = 0
        open_errno = 0
        t = 0x7ffff7929f97
#38531 main (argc=2, argv=0x7fffffffdad8) at touch.c:432
        c = <value optimized out>
        date_set = <value optimized out>
        ok = true
        flex_date = <value optimized out>
(gdb) list
188           if (fd < 0)
189             {
190               errno = EBADF;
191               return -1;
192             }
193           if (dup2 (fd, fd) != fd)
194             return -1;
195         }
196
197       /* Some Linux-based NFS clients are buggy, and mishandle time stamps
(gdb) 


cerdea <at> xango2:/build/buildd/coreutils$ src/touch --version
touch (GNU coreutils) 8.5.154-2dd21
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, Arnold Robbins, Jim Kingdon,
David MacKenzie, and Randy Smith.
cerdea <at> xango2:/build/buildd/coreutils$ 


-- 
C de-Avillez
IRC: hggdh

This email (and any attachments) is digitally signed using GNUpg
(http://gnupg.org). The public key is available at http://pgp.mit.edu.
The key Id is 0xD3133E56.
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#7061; Package coreutils. (Sat, 18 Sep 2010 02:02:01 GMT) Full text and rfc822 format available.

Message #8 received at 7061 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: C de-Avillez <hggdh2 <at> ubuntu.com>
Cc: 7061 <at> debbugs.gnu.org
Subject: Re: bug#7061: loop on touch (fdutimens)
Date: Fri, 17 Sep 2010 19:03:30 -0700
On 09/17/2010 05:49 PM, C de-Avillez wrote:

> I just built & ran a quick test on coreutils GIT. I received a SEGV on
> touch, and ran it under GDB.

I don't observe the problem.  I just now grabbed a fresh copy of coreutils.
I ran your test on Ubuntu 10.04 x86 and on RHEL 5 x86-64.

My guess is that you are running coreutils with a slightly out-of-date
gnulib, or vice versa.  You need to have either both of the following patches, or
neither of them.

http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=2dd21704d63c4e7567695a9e43dc1631b930efe2

http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=89b0db35db10a8beccaf83909c7f62f127fb5821




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#7061; Package coreutils. (Sat, 18 Sep 2010 02:51:01 GMT) Full text and rfc822 format available.

Message #11 received at 7061 <at> debbugs.gnu.org (full text, mbox):

From: C de-Avillez <hggdh2 <at> ubuntu.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 7061 <at> debbugs.gnu.org
Subject: Re: bug#7061: loop on touch (fdutimens)
Date: Fri, 17 Sep 2010 21:53:01 -0500
[Message part 1 (text/plain, inline)]
On Fri, 17 Sep 2010 19:03:30 -0700
Paul Eggert <eggert <at> cs.ucla.edu> wrote:

> On 09/17/2010 05:49 PM, C de-Avillez wrote:
> 
> > I just built & ran a quick test on coreutils GIT. I received a
> > SEGV on touch, and ran it under GDB.
> 
> I don't observe the problem.  I just now grabbed a fresh copy of
> coreutils. I ran your test on Ubuntu 10.04 x86 and on RHEL 5 x86-64.

I am running it on Ubuntu Maverick (soon to-be 10.10). I do not have
another Linux distro to test right now, but I will build a 10.04 on
KVM.

> My guess is that you are running coreutils with a slightly
> out-of-date gnulib, or vice versa.  You need to have either both of
> the following patches, or neither of them.
> 
> http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=2dd21704d63c4e7567695a9e43dc1631b930efe2
> 
> http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=89b0db35db10a8beccaf83909c7f62f127fb5821

Both are applied on my git copy. Hum. I will go and redo it from a
fresh git copy.

Thanks, Paul. I will post what I find.

-- 
C de-Avillez
IRC: hggdh

This email (and any attachments) is digitally signed using GNUpg
(http://gnupg.org). The public key is available at http://pgp.mit.edu.
The key Id is 0xD3133E56.
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#7061; Package coreutils. (Sat, 18 Sep 2010 03:09:01 GMT) Full text and rfc822 format available.

Message #14 received at 7061 <at> debbugs.gnu.org (full text, mbox):

From: C de-Avillez <hggdh2 <at> ubuntu.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 7061 <at> debbugs.gnu.org
Subject: Re: bug#7061: loop on touch (fdutimens)
Date: Fri, 17 Sep 2010 22:11:12 -0500
[Message part 1 (text/plain, inline)]
On Fri, 17 Sep 2010 21:53:01 -0500
C de-Avillez <hggdh2 <at> ubuntu.com> wrote:

> On Fri, 17 Sep 2010 19:03:30 -0700
> Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> 
> > On 09/17/2010 05:49 PM, C de-Avillez wrote:
> > 
> > > I just built & ran a quick test on coreutils GIT. I received a
> > > SEGV on touch, and ran it under GDB.
> > 
> > I don't observe the problem.  I just now grabbed a fresh copy of
> > coreutils. I ran your test on Ubuntu 10.04 x86 and on RHEL 5
> > x86-64.
> 
> I am running it on Ubuntu Maverick (soon to-be 10.10). I do not have
> another Linux distro to test right now, but I will build a 10.04 on
> KVM.
> 
> > My guess is that you are running coreutils with a slightly
> > out-of-date gnulib, or vice versa.  You need to have either both of
> > the following patches, or neither of them.
> > 
> > http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=2dd21704d63c4e7567695a9e43dc1631b930efe2
> > 
> > http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=89b0db35db10a8beccaf83909c7f62f127fb5821
> 
> Both are applied on my git copy. Hum. I will go and redo it from a
> fresh git copy.
> 
> Thanks, Paul. I will post what I find.

Indeed, building from a fresh GIT did the trick. I am guessing I
something got left over from previous builds...

This bug can be closed.

Thank you, Paul.

Cheers, 



-- 
C de-Avillez
IRC: hggdh

This email (and any attachments) is digitally signed using GNUpg
(http://gnupg.org). The public key is available at http://pgp.mit.edu.
The key Id is 0xD3133E56.
[signature.asc (application/pgp-signature, attachment)]

Reply sent to Jim Meyering <jim <at> meyering.net>:
You have taken responsibility. (Fri, 22 Jul 2011 22:14:02 GMT) Full text and rfc822 format available.

Notification sent to C de-Avillez <hggdh2 <at> ubuntu.com>:
bug acknowledged by developer. (Fri, 22 Jul 2011 22:14:02 GMT) Full text and rfc822 format available.

Message #19 received at 7061-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: 7061-done <at> debbugs.gnu.org
Subject: Re: bug#7061: loop on touch (fdutimens)
Date: Sat, 23 Jul 2011 00:13:04 +0200
tags 7061 + notabug
close 7061
thanks

C de-Avillez wrote:
...
> Indeed, building from a fresh GIT did the trick. I am guessing I
> something got left over from previous builds...
>
> This bug can be closed.

Done.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 20 Aug 2011 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 359 days ago.

Previous Next


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