GNU logs - #9800, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9800: Incomplete truncated file buffers from the /proc filesystem
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 19 Oct 2011 23:03:01 +0000
Resent-Message-ID: <handler.9800.B.131906537526062 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 9800
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 9800 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.131906537526062
          (code B ref -1); Wed, 19 Oct 2011 23:03:01 +0000
Received: (at submit) by debbugs.gnu.org; 19 Oct 2011 23:02:55 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RGf9z-0006mJ-2Z
	for submit <at> debbugs.gnu.org; Wed, 19 Oct 2011 19:02:55 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <juri@HIDDEN>) id 1RGf9w-0006m7-JD
	for submit <at> debbugs.gnu.org; Wed, 19 Oct 2011 19:02:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <juri@HIDDEN>) id 1RGf8n-0007m3-8e
	for submit <at> debbugs.gnu.org; Wed, 19 Oct 2011 19:01:42 -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,RCVD_IN_DNSWL_NONE
	autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:51120)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <juri@HIDDEN>) id 1RGf8n-0007lz-7G
	for submit <at> debbugs.gnu.org; Wed, 19 Oct 2011 19:01:41 -0400
Received: from eggs.gnu.org ([140.186.70.92]:54804)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <juri@HIDDEN>) id 1RGf8m-0000u7-1r
	for bug-gnu-emacs@HIDDEN; Wed, 19 Oct 2011 19:01:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <juri@HIDDEN>) id 1RGf8i-0007l0-LC
	for bug-gnu-emacs@HIDDEN; Wed, 19 Oct 2011 19:01:39 -0400
Received: from smarty.dreamhost.com ([208.113.175.8]:59312)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <juri@HIDDEN>) id 1RGf8i-0007kv-Du
	for bug-gnu-emacs@HIDDEN; Wed, 19 Oct 2011 19:01:36 -0400
Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105])
	by smarty.dreamhost.com (Postfix) with ESMTP id 8DFA56E808C
	for <bug-gnu-emacs@HIDDEN>; Wed, 19 Oct 2011 16:01:35 -0700 (PDT)
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id D8E73AC9400A
	for <bug-gnu-emacs@HIDDEN>; Wed, 19 Oct 2011 16:01:34 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
Organization: JURTA
Date: Thu, 20 Oct 2011 01:59:42 +0300
Message-ID: <877h40vb8h.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -4.6 (----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.7 (----)

Large files from the /proc filesystem are visited incompletely,
their file buffers are truncated at the position 65536.
One possible test case to reproduce this is to load enough libraries
with e.g. (imagemagick-register-types) and visit Emacs's maps file
in /proc/$PID/maps.

Andreas said in http://lists.gnu.org/archive/html/emacs-devel/2011-10/msg00782.html
that it's due to this code in `insert-file-contents':

	  /* The file size returned from stat may be zero, but data
	     may be readable nonetheless, for example when this is a
	     file in the /proc filesystem.  */
	  if (end_offset == 0)
	    end_offset = READ_BUF_SIZE;

How this could be fixed?  Should it keep reading while more data can be
read from the file?




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Juri Linkov <juri@HIDDEN>
Subject: bug#9800: Acknowledgement (Incomplete truncated file buffers from
 the /proc filesystem)
Message-ID: <handler.9800.B.131906537526062.ack <at> debbugs.gnu.org>
References: <877h40vb8h.fsf@HIDDEN>
X-Gnu-PR-Message: ack 9800
X-Gnu-PR-Package: emacs
Reply-To: 9800 <at> debbugs.gnu.org
Date: Wed, 19 Oct 2011 23:03:01 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 9800 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
9800: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D9800
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9800: Incomplete truncated file buffers from the /proc filesystem
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 20 Oct 2011 08:25:02 +0000
Resent-Message-ID: <handler.9800.B9800.131909904413030 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 9800
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: 9800 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 9800-submit <at> debbugs.gnu.org id=B9800.131909904413030
          (code B ref 9800); Thu, 20 Oct 2011 08:25:02 +0000
Received: (at 9800) by debbugs.gnu.org; 20 Oct 2011 08:24:04 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RGnv1-0003O7-Ji
	for submit <at> debbugs.gnu.org; Thu, 20 Oct 2011 04:24:03 -0400
Received: from mtaout20.012.net.il ([80.179.55.166])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eliz@HIDDEN>) id 1RGnuz-0003Na-4u
	for 9800 <at> debbugs.gnu.org; Thu, 20 Oct 2011 04:24:02 -0400
Received: from conversion-daemon.a-mtaout20.012.net.il by
	a-mtaout20.012.net.il (HyperSendmail v2007.08) id
	<0LTC00J00V6NUD00@HIDDEN> for
	9800 <at> debbugs.gnu.org; Thu, 20 Oct 2011 10:22:41 +0200 (IST)
Received: from HOME-C4E4A596F7 ([77.124.212.197]) by a-mtaout20.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0LTC00JKOV9SJZ90@HIDDEN>;
	Thu, 20 Oct 2011 10:22:41 +0200 (IST)
Date: Thu, 20 Oct 2011 10:22:43 +0200
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <877h40vb8h.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
Message-id: <83ehy8t6lo.fsf@HIDDEN>
References: <877h40vb8h.fsf@HIDDEN>
X-Spam-Score: -2.1 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.1 (--)

> From: Juri Linkov <juri@HIDDEN>
> Date: Thu, 20 Oct 2011 01:59:42 +0300
> 
> Large files from the /proc filesystem are visited incompletely,
> their file buffers are truncated at the position 65536.
> One possible test case to reproduce this is to load enough libraries
> with e.g. (imagemagick-register-types) and visit Emacs's maps file
> in /proc/$PID/maps.
> 
> Andreas said in http://lists.gnu.org/archive/html/emacs-devel/2011-10/msg00782.html
> that it's due to this code in `insert-file-contents':
> 
> 	  /* The file size returned from stat may be zero, but data
> 	     may be readable nonetheless, for example when this is a
> 	     file in the /proc filesystem.  */
> 	  if (end_offset == 0)
> 	    end_offset = READ_BUF_SIZE;
> 
> How this could be fixed?  Should it keep reading while more data can be
> read from the file?

Does lseek work on these files?  If so, we could use something like

   lseek (fd, 0L, SEEK_END)

to find its size.  Or we could treat those files as non-regular, where
we set end_offset to TYPE_MAXIMUM (off_t) -- would that work with
these files?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9800: Incomplete truncated file buffers from the /proc filesystem
Resent-From: Andreas Schwab <schwab@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 20 Oct 2011 08:47:01 +0000
Resent-Message-ID: <handler.9800.B9800.131910037615030 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 9800
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: Juri Linkov <juri@HIDDEN>, 9800 <at> debbugs.gnu.org
Received: via spool by 9800-submit <at> debbugs.gnu.org id=B9800.131910037615030
          (code B ref 9800); Thu, 20 Oct 2011 08:47:01 +0000
Received: (at 9800) by debbugs.gnu.org; 20 Oct 2011 08:46:16 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RGoGU-0003uL-Nx
	for submit <at> debbugs.gnu.org; Thu, 20 Oct 2011 04:46:16 -0400
Received: from mail-out.m-online.net ([212.18.0.9])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <whitebox@HIDDEN>) id 1RGoGN-0003ts-3P
	for 9800 <at> debbugs.gnu.org; Thu, 20 Oct 2011 04:46:08 -0400
Received: from frontend1.mail.m-online.net (unknown [192.168.8.180])
	by mail-out.m-online.net (Postfix) with ESMTP id 1BC481C02B74;
	Thu, 20 Oct 2011 10:44:53 +0200 (CEST)
Received: from localhost (dynscan1.mnet-online.de [192.168.8.164])
	by mail.m-online.net (Postfix) with ESMTP id C6AE11C0037F;
	Thu, 20 Oct 2011 10:44:53 +0200 (CEST)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.180])
	by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new,
	port 10024)
	with ESMTP id 6OE3iqTNZW77; Thu, 20 Oct 2011 10:44:52 +0200 (CEST)
Received: from hase.home (ppp-88-217-119-26.dynamic.mnet-online.de
	[88.217.119.26]) by mail.mnet-online.de (Postfix) with ESMTP;
	Thu, 20 Oct 2011 10:44:52 +0200 (CEST)
From: Andreas Schwab <schwab@HIDDEN>
References: <877h40vb8h.fsf@HIDDEN> <83ehy8t6lo.fsf@HIDDEN>
X-Yow: It's OKAY --- I'm an INTELLECTUAL, too.
Date: Thu, 20 Oct 2011 10:44:57 +0200
In-Reply-To: <83ehy8t6lo.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 20 Oct
	2011 10:22:43 +0200")
Message-ID: <m3pqhsdpbq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -2.6 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

Eli Zaretskii <eliz@HIDDEN> writes:

> Does lseek work on these files?

No.  The contents are completely dynamic, generated on-the-fly when
reading.

> Or we could treat those files as non-regular,

That is the only option.

Andreas.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9800: Incomplete truncated file buffers from the /proc filesystem
References: <877h40vb8h.fsf@HIDDEN>
In-Reply-To: <877h40vb8h.fsf@HIDDEN>
Resent-From: Paul Eggert <eggert@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 24 Oct 2011 02:55:01 +0000
Resent-Message-ID: <handler.9800.B9800.13194248901218 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 9800
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 9800 <at> debbugs.gnu.org
Received: via spool by 9800-submit <at> debbugs.gnu.org id=B9800.13194248901218
          (code B ref 9800); Mon, 24 Oct 2011 02:55:01 +0000
Received: (at 9800) by debbugs.gnu.org; 24 Oct 2011 02:54:50 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RIAgb-0000Ja-3D
	for submit <at> debbugs.gnu.org; Sun, 23 Oct 2011 22:54:49 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eggert@HIDDEN>) id 1RIAgZ-0000JP-8J
	for 9800 <at> debbugs.gnu.org; Sun, 23 Oct 2011 22:54:47 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id E563CA60002
	for <9800 <at> debbugs.gnu.org>; Sun, 23 Oct 2011 19:53:12 -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 G00S8lMwydDo for <9800 <at> debbugs.gnu.org>;
	Sun, 23 Oct 2011 19:53:12 -0700 (PDT)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 9D97239E8006
	for <9800 <at> debbugs.gnu.org>; Sun, 23 Oct 2011 19:53:12 -0700 (PDT)
Message-ID: <4EA4D31B.4050604@HIDDEN>
Date: Sun, 23 Oct 2011 19:53:15 -0700
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.9 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.9 (--)

It strikes me that regular files can go as you read them, too,
and that Emacs is not doing this properly.  That is, Emacs should
be fixed so that it continues to read from a growing regular file
until a proper EOF is reached (i.e., until read returns 0).

If Emacs is fixed in this way, it will read these /proc files
correctly too.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9800: Incomplete truncated file buffers from the /proc filesystem
Resent-From: Richard Stallman <rms@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 24 Oct 2011 21:52:01 +0000
Resent-Message-ID: <handler.9800.B9800.131949311122218 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 9800
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Paul Eggert <eggert@HIDDEN>
Cc: 9800 <at> debbugs.gnu.org
Reply-To: rms@HIDDEN
Received: via spool by 9800-submit <at> debbugs.gnu.org id=B9800.131949311122218
          (code B ref 9800); Mon, 24 Oct 2011 21:52:01 +0000
Received: (at 9800) by debbugs.gnu.org; 24 Oct 2011 21:51:51 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RISQw-0005mJ-He
	for submit <at> debbugs.gnu.org; Mon, 24 Oct 2011 17:51:51 -0400
Received: from fencepost.gnu.org ([140.186.70.10] ident=Debian-exim)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <rms@HIDDEN>) id 1RISQu-0005mC-SY
	for 9800 <at> debbugs.gnu.org; Mon, 24 Oct 2011 17:51:49 -0400
Received: from rms by fencepost.gnu.org with local (Exim 4.71)
	(envelope-from <rms@HIDDEN>)
	id 1RISPO-0007Eu-TE; Mon, 24 Oct 2011 17:50:14 -0400
Date: Mon, 24 Oct 2011 17:50:14 -0400
Message-Id: <E1RISPO-0007Eu-TE@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15
From: Richard Stallman <rms@HIDDEN>
In-reply-to: <4EA4D31B.4050604@HIDDEN> (message from Paul Eggert on Sun, 
	23 Oct 2011 19:53:15 -0700)
References: <877h40vb8h.fsf@HIDDEN> <4EA4D31B.4050604@HIDDEN>
X-Spam-Score: -6.6 (------)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.6 (------)

    It strikes me that regular files can go as you read them, too,
    and that Emacs is not doing this properly.  That is, Emacs should
    be fixed so that it continues to read from a growing regular file
    until a proper EOF is reached (i.e., until read returns 0).

I think there was a reason for doing it this way.  Perhaps so as to
allocate the space before reading the file.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use free telephony http://directory.fsf.org/category/tel/




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9800: Incomplete truncated file buffers from the /proc filesystem
Resent-From: Paul Eggert <eggert@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 24 Oct 2011 22:05:02 +0000
Resent-Message-ID: <handler.9800.B9800.131949387726177 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 9800
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: rms@HIDDEN
Cc: 9800 <at> debbugs.gnu.org
Received: via spool by 9800-submit <at> debbugs.gnu.org id=B9800.131949387726177
          (code B ref 9800); Mon, 24 Oct 2011 22:05:02 +0000
Received: (at 9800) by debbugs.gnu.org; 24 Oct 2011 22:04:37 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RISdI-0006o8-CX
	for submit <at> debbugs.gnu.org; Mon, 24 Oct 2011 18:04:37 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eggert@HIDDEN>) id 1RISdF-0006nu-9k
	for 9800 <at> debbugs.gnu.org; Mon, 24 Oct 2011 18:04:34 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 6B2E339E8007;
	Mon, 24 Oct 2011 15:02:54 -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 X8Jn+A0aHDKB; Mon, 24 Oct 2011 15:02:54 -0700 (PDT)
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 2637439E8006;
	Mon, 24 Oct 2011 15:02:54 -0700 (PDT)
Message-ID: <4EA5E08D.8070903@HIDDEN>
Date: Mon, 24 Oct 2011 15:02:53 -0700
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:7.0) Gecko/20110927 Thunderbird/7.0
MIME-Version: 1.0
References: <877h40vb8h.fsf@HIDDEN> <4EA4D31B.4050604@HIDDEN>
	<E1RISPO-0007Eu-TE@HIDDEN>
In-Reply-To: <E1RISPO-0007Eu-TE@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit
X-Spam-Score: -3.1 (---)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.1 (---)

On 10/24/11 14:50, Richard Stallman wrote:
> I think there was a reason for doing it this way.  Perhaps so as to
> allocate the space before reading the file.

Yes, that sounds right.  And in the typical case where the file is not
growing, that allocates space efficiently.  If the file is growing, though,
it's OK to allocate more space after discovering that the initial
allocation was too small.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9800: Incomplete truncated file buffers from the /proc filesystem
Resent-From: Lars Magne Ingebrigtsen <larsi@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 03 Nov 2011 20:35:02 +0000
Resent-Message-ID: <handler.9800.B9800.132035249810224 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 9800
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Paul Eggert <eggert@HIDDEN>
Cc: 9800 <at> debbugs.gnu.org
Received: via spool by 9800-submit <at> debbugs.gnu.org id=B9800.132035249810224
          (code B ref 9800); Thu, 03 Nov 2011 20:35:02 +0000
Received: (at 9800) by debbugs.gnu.org; 3 Nov 2011 20:34:58 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RM3zz-0002eo-Oj
	for submit <at> debbugs.gnu.org; Thu, 03 Nov 2011 16:34:57 -0400
Received: from hermes.netfonds.no ([80.91.224.195])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <larsi@HIDDEN>) id 1RM3zu-0002eU-Qu
	for 9800 <at> debbugs.gnu.org; Thu, 03 Nov 2011 16:34:53 -0400
Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58]
	helo=stories.gnus.org)
	by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.72) (envelope-from <larsi@HIDDEN>)
	id 1RM3xO-0003gU-E3; Thu, 03 Nov 2011 21:32:14 +0100
From: Lars Magne Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <4EA4D31B.4050604@HIDDEN> (Paul Eggert's message of "Sun, 23
	Oct 2011 19:53:15 -0700")
Date: Thu, 03 Nov 2011 21:32:07 +0100
Message-ID: <m3y5vxj6bc.fsf@HIDDEN>
References: <877h40vb8h.fsf@HIDDEN> <4EA4D31B.4050604@HIDDEN>
User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux)
X-Now-Playing: Kissing the Pink's _Naked_: "Broken Body"
MIME-Version: 1.0
Content-Type: text/plain
X-MailScanner-ID: 1RM3xO-0003gU-E3
X-Netfonds-MailScanner: Found to be clean
X-Netfonds-MailScanner-From: larsi@HIDDEN
MailScanner-NULL-Check: 1320957134.48966@6wI8bV8ANOkyPtjKhdqK1g
X-Spam-Status: No
X-Spam-Score: -2.6 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

Paul Eggert <eggert@HIDDEN> writes:

> It strikes me that regular files can go as you read them, too,
> and that Emacs is not doing this properly.  That is, Emacs should
> be fixed so that it continues to read from a growing regular file
> until a proper EOF is reached (i.e., until read returns 0).

Sounds like a good idea, but remember to bail out some time before
reading the infinitely big files to the very end.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9800: Incomplete truncated file buffers from the /proc filesystem
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 04 Nov 2011 10:02:02 +0000
Resent-Message-ID: <handler.9800.B9800.132040092119012 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 9800
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Lars Magne Ingebrigtsen <larsi@HIDDEN>
Cc: Paul Eggert <eggert@HIDDEN>, 9800 <at> debbugs.gnu.org
Received: via spool by 9800-submit <at> debbugs.gnu.org id=B9800.132040092119012
          (code B ref 9800); Fri, 04 Nov 2011 10:02:02 +0000
Received: (at 9800) by debbugs.gnu.org; 4 Nov 2011 10:02:01 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RMGb2-0004wW-De
	for submit <at> debbugs.gnu.org; Fri, 04 Nov 2011 06:02:01 -0400
Received: from smarty.dreamhost.com ([208.113.175.8])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <juri@HIDDEN>) id 1RMGaz-0004wK-Sg
	for 9800 <at> debbugs.gnu.org; Fri, 04 Nov 2011 06:01:58 -0400
Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105])
	by smarty.dreamhost.com (Postfix) with ESMTP id C29D26E808B;
	Fri,  4 Nov 2011 02:59:23 -0700 (PDT)
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id A83AC451C59E;
	Fri,  4 Nov 2011 02:59:22 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
Organization: JURTA
References: <877h40vb8h.fsf@HIDDEN> <4EA4D31B.4050604@HIDDEN>
	<m3y5vxj6bc.fsf@HIDDEN>
Date: Fri, 04 Nov 2011 11:36:01 +0200
In-Reply-To: <m3y5vxj6bc.fsf@HIDDEN> (Lars Magne Ingebrigtsen's
	message of "Thu, 03 Nov 2011 21:32:07 +0100")
Message-ID: <87zkgcqm16.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.7 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

>> It strikes me that regular files can go as you read them, too,
>> and that Emacs is not doing this properly.  That is, Emacs should
>> be fixed so that it continues to read from a growing regular file
>> until a proper EOF is reached (i.e., until read returns 0).
>
> Sounds like a good idea, but remember to bail out some time before
> reading the infinitely big files to the very end.  :-)

Maybe limit the reading by the value of `large-file-warning-threshold'.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9800: Incomplete truncated file buffers from the /proc filesystem
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 04 Nov 2011 10:57:02 +0000
Resent-Message-ID: <handler.9800.B9800.132040421724080 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 9800
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: larsi@HIDDEN, eggert@HIDDEN, 9800 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 9800-submit <at> debbugs.gnu.org id=B9800.132040421724080
          (code B ref 9800); Fri, 04 Nov 2011 10:57:02 +0000
Received: (at 9800) by debbugs.gnu.org; 4 Nov 2011 10:56:57 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RMHSD-0006GK-Ft
	for submit <at> debbugs.gnu.org; Fri, 04 Nov 2011 06:56:57 -0400
Received: from mtaout23.012.net.il ([80.179.55.175])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eliz@HIDDEN>) id 1RMHSA-0006G8-0M
	for 9800 <at> debbugs.gnu.org; Fri, 04 Nov 2011 06:56:55 -0400
Received: from conversion-daemon.a-mtaout23.012.net.il by
	a-mtaout23.012.net.il (HyperSendmail v2007.08) id
	<0LU400800U600100@HIDDEN> for
	9800 <at> debbugs.gnu.org; Fri, 04 Nov 2011 12:54:18 +0200 (IST)
Received: from HOME-C4E4A596F7 ([84.228.70.69]) by a-mtaout23.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0LU4007I3UAHQ5C0@HIDDEN>;
	Fri, 04 Nov 2011 12:54:18 +0200 (IST)
Date: Fri, 04 Nov 2011 12:54:22 +0200
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <87zkgcqm16.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
Message-id: <83lirwkvj5.fsf@HIDDEN>
References: <877h40vb8h.fsf@HIDDEN> <4EA4D31B.4050604@HIDDEN>
	<m3y5vxj6bc.fsf@HIDDEN> <87zkgcqm16.fsf@HIDDEN>
X-Spam-Score: -1.7 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.7 (-)

> From: Juri Linkov <juri@HIDDEN>
> Date: Fri, 04 Nov 2011 11:36:01 +0200
> Cc: Paul Eggert <eggert@HIDDEN>, 9800 <at> debbugs.gnu.org
> 
> >> It strikes me that regular files can go as you read them, too,
> >> and that Emacs is not doing this properly.  That is, Emacs should
> >> be fixed so that it continues to read from a growing regular file
> >> until a proper EOF is reached (i.e., until read returns 0).
> >
> > Sounds like a good idea, but remember to bail out some time before
> > reading the infinitely big files to the very end.  :-)
> 
> Maybe limit the reading by the value of `large-file-warning-threshold'.

IMO, that value is ridiculously low for such use.  Maybe multiply it
by some large factor.





Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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