Your message dated Tue, 25 Oct 2005 09:59:06 -0600
with message-id <[EMAIL PROTECTED]>
and subject line Bug#335637: coreutils: "tail -f -n 100 /var/log/messages | 
less" "G" hangs
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 25 Oct 2005 05:20:28 +0000
>From [EMAIL PROTECTED] Mon Oct 24 22:20:28 2005
Return-path: <[EMAIL PROTECTED]>
Received: from dsl-47-164.nas.com (debian1.loaner.com) [66.114.47.164] 
        by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
        id 1EUHEX-0004Nh-00; Mon, 24 Oct 2005 22:20:28 -0700
Received: from kingsley by debian1.loaner.com with local (Exim 3.36 #1 (Debian))
        id 1EUHDz-0002c4-00; Mon, 24 Oct 2005 22:19:51 -0700
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: "Kingsley G. Morse Jr." <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: coreutils: "tail -f -n 100 /var/log/messages | less" "G" hangs
X-Mailer: reportbug 3.15
Date: Mon, 24 Oct 2005 22:19:50 -0700
Message-Id: <[EMAIL PROTECTED]>
Sender: "Kingsley G. Morse Jr." <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02

Package: coreutils
Version: 5.2.1-2.1
Severity: normal


Thanks for maintaining debian's coreutils package.

It has really useful code.

I noticed that typing the following as root:

    tail -f -n 100 /var/log/messages | less

and then pressing upper case "G" in less to go to
the end of the file, hangs.

Perhaps this is related to bug #298620.

Thanks,
Kingsley

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-k7
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages coreutils depends on:
ii  libacl1                       2.2.21-1   Access control list shared library
ii  libc6                         2.3.5-6    GNU C Library: Shared libraries an

coreutils recommends no packages.

-- no debconf information

---------------------------------------
Received: (at 335637-done) by bugs.debian.org; 25 Oct 2005 15:59:08 +0000
>From [EMAIL PROTECTED] Tue Oct 25 08:59:08 2005
Return-path: <[EMAIL PROTECTED]>
Received: from joseki.proulx.com [216.17.153.58] 
        by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
        id 1EURCe-0007Bv-00; Tue, 25 Oct 2005 08:59:08 -0700
Received: from dementia.proulx.com (dementia.proulx.com [192.168.1.115])
        by joseki.proulx.com (Postfix) with ESMTP id 349A64B41D;
        Tue, 25 Oct 2005 09:59:07 -0600 (MDT)
Received: by dementia.proulx.com (Postfix, from userid 1000)
        id E88452059D6; Tue, 25 Oct 2005 09:59:06 -0600 (MDT)
Date: Tue, 25 Oct 2005 09:59:06 -0600
To: "Kingsley G. Morse Jr." <[EMAIL PROTECTED]>,
        [EMAIL PROTECTED]
Subject: Re: Bug#335637: coreutils: "tail -f -n 100 /var/log/messages | less" 
"G" hangs
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[EMAIL PROTECTED]>
User-Agent: Mutt/1.5.9i
From: [EMAIL PROTECTED] (Bob Proulx)
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02

Kingsley G. Morse Jr. wrote:
> I noticed that typing the following as root:
> 
>     tail -f -n 100 /var/log/messages | less
> 
> and then pressing upper case "G" in less to go to
> the end of the file, hangs.

Thank you for your bug report.  But that is not a bug in either tail
or less.

The problem is that you have told tail to follow the output of the
file endlessly with the -f option.  With that option in place tail
will loop in a purposefully created infinite loop reading data and
writing it to the output.  The less program reads this output from the
pipe.  Using the 'G' command to go to the end of input hangs because
less never gets an end of input from the tail command because the tail
command never ends because of the -f option.

Don't use the -f option and this will behave as you desire.

Hint: You don't need to tail | less in this case.  Just less the file
directly.

  less /var/log/messages

You can follow the file inside less with the 'F' (follow) command.
This is quite useful.  There is no need for tail in this case.

> Perhaps this is related to bug #298620.

That bug is unrelated.  It has to do with the code that tries to
deduce the seekability of the file.  It was fixed upstream in 5.3.0
and later versions.

Bob


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to