GNU bug report logs - #7483
Tail claims bad file descriptor when following

Previous Next

Package: coreutils;

Reported by: Johan Pretorius <pretoriusjf <at> gmail.com>

Date: Fri, 26 Nov 2010 08:45: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 7483 in the body.
You can then email your comments to 7483 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#7483; Package coreutils. (Fri, 26 Nov 2010 08:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Johan Pretorius <pretoriusjf <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 26 Nov 2010 08:45:02 GMT) Full text and rfc822 format available.

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

From: Johan Pretorius <pretoriusjf <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Tail claims bad file descriptor when following
Date: Fri, 26 Nov 2010 10:44:28 +0200
[Message part 1 (text/plain, inline)]
Hi there,

I use tail 5.3.0 in Windows 7.  It works fine unless I try to follow a file.

Here is my --version output:

C:\>tail --version
tail (GNU coreutils) 5.3.0
Written by Paul Rubin, David MacKenzie, Ian Lance Taylor, and Jim Meyering.

Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


The following works as expected with no error messages.

tail \\ssb-batman\logs\batman\build.log


However, if I try to follow, it gives output as follows.

C:\>tail -f \\ssb-batman\logs\batman\build.log
[INFO] Unpacking
C:\p4ws\depot_cfg\ssb\trunk\postilion\ssb\postgen\target\postgen-izpack.zip
to

  C:\p4ws\depot_cfg\ssb\trunk\postilion\ssb_installer\target\staging
   with includes null and excludes:null
[INFO] Unpacking
C:\p4ws\depot_cfg\ssb\trunk\postilion\ssb\scheduleinjector\target\scheduleinjector-izpack.zip
to
  C:\p4ws\depot_cfg\ssb\trunk\postilion\ssb_installer\target\staging
   with includes null and excludes:null
[INFO] Unpacking
C:\p4ws\depot_cfg\ssb\trunk\postilion\ssb\services\target\services-izpack.zip
to
  C:\p4ws\depot_cfg\ssb\trunk\postilion\ssb_installer\target\staging
   with includes null and excludes:null
tail: \\ssb-batman\logs\batman\build.log: Bad file descriptor
tail: no files remaining

Why is tail suddenly claiming that the file descriptor is bad, when clearly
it works just fine?

So I tried some different things to see if I could get it to work.

I tried

tail --follow=\\ssb-batman\logs\batman\build.log

but that just gives an even stranger error:

tail: invalid argument `\\\\ssb-batman\\logs\\batman\\build.log' for
`--follow'
Valid arguments are:
  - `descriptor'
  - `name'
Try `tail --help' for more information.


I thought at first that maybe tail does not like the UNC path, but that is
not the case - it does exactly the same when I use a local file.

If I add --retry to the mix, I get the following very interesting reaction:
 It prints out the last few lines, throws out the same error as before, then
prints out the entire file!  This is what it looks like:

C:\>tail -f "\\ssb-batman\logs\batman\build.log" --retry
tail: warning: --retry is useful only when following by name
[INFO] CfgSystemInfoExt ...................................... SUCCESS
[4.328s]
[INFO] SSB Installer ......................................... SUCCESS
[1:28.422s]
[INFO]
------------------------------------------------------------------------
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 22 minutes 54 seconds
[INFO] Finished at: Fri Nov 26 10:11:17 GMT+02:00 2010
[INFO] Final Memory: 66M/1016M
[INFO]
------------------------------------------------------------------------
tail: \\ssb-batman\logs\batman\build.log: Bad file descriptor
tail: `\\ssb-batman\logs\batman\build.log' has become accessible
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   Postilion Parent POM

<snip snip...>


In the interests of brevity I cut out the rest of my 250KB log file :-)

Regards,
Johan

-- 
Johan Pretorius
Cell: 0829268327
pretoriusjf <at> gmail.com
[Message part 2 (text/html, inline)]

Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#7483; Package coreutils. (Fri, 26 Nov 2010 18:44:01 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Johan Pretorius <pretoriusjf <at> gmail.com>
Cc: 7483 <at> debbugs.gnu.org
Subject: Re: bug#7483: Tail claims bad file descriptor when following
Date: Fri, 26 Nov 2010 10:48:48 -0800
On 11/26/2010 12:44 AM, Johan Pretorius wrote:
> I use tail 5.3.0 in Windows 7.

Hmm, that's rather old.  I suggest upgrading to a more-recent
version before investigating further.  The current version is 8.7.

Also, you might try reporting the bug to whoever built it on Windows
rather than to bug-coreutils, as it could well be a property
of the Windows port rather than a bug in coreutils itself.




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

Notification sent to Johan Pretorius <pretoriusjf <at> gmail.com>:
bug acknowledged by developer. (Fri, 22 Jul 2011 22:22:02 GMT) Full text and rfc822 format available.

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

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 7483-done <at> debbugs.gnu.org, Johan Pretorius <pretoriusjf <at> gmail.com>
Subject: Re: bug#7483: Tail claims bad file descriptor when following
Date: Sat, 23 Jul 2011 00:21:35 +0200
tags 7483 + notabug
close 7483
thanks

Paul Eggert wrote:
> On 11/26/2010 12:44 AM, Johan Pretorius wrote:
>> I use tail 5.3.0 in Windows 7.
>
> Hmm, that's rather old.  I suggest upgrading to a more-recent
> version before investigating further.  The current version is 8.7.
>
> Also, you might try reporting the bug to whoever built it on Windows
> rather than to bug-coreutils, as it could well be a property
> of the Windows port rather than a bug in coreutils itself.

Thanks for the report.
I'm closing this as "not a bug".
If you find evidence of a bug using the latest,
you might want to report it to whomever wrote packaged
coreutils for windows 7.




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 309 days ago.

Previous Next


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