GNU bug report logs - #71529
Crash for large directory due to memory outage

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: diffutils; Reported by: Evan Greenup <evan_greenup@HIDDEN>; Keywords: moreinfo; dated Thu, 13 Jun 2024 05:24:03 UTC; Maintainer for diffutils is bug-diffutils@HIDDEN.
Added tag(s) moreinfo. Request was from Paul Eggert <eggert@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 71529 <at> debbugs.gnu.org:


Received: (at 71529) by debbugs.gnu.org; 14 Jun 2024 00:07:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 13 20:07:41 2024
Received: from localhost ([127.0.0.1]:39426 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sHuTk-0004Az-U5
	for submit <at> debbugs.gnu.org; Thu, 13 Jun 2024 20:07:41 -0400
Received: from mail.cs.ucla.edu ([131.179.128.66]:58110)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1sHuTf-0004Ai-3d
 for 71529 <at> debbugs.gnu.org; Thu, 13 Jun 2024 20:07:39 -0400
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id 70FB23C005151;
 Thu, 13 Jun 2024 17:07:28 -0700 (PDT)
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP
 id ZNX7nN0WMFBu; Thu, 13 Jun 2024 17:07:28 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id 265ED3C00515C;
 Thu, 13 Jun 2024 17:07:28 -0700 (PDT)
DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 265ED3C00515C
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu;
 s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1718323648;
 bh=XG0e6d3L9ZxyYGsiCilxZvXd5FKfK1uLBRp1IZymTts=;
 h=Message-ID:Date:MIME-Version:To:From;
 b=n/CoJFa7QbECRj/HmfUFSRTpKhMs4cfbHYZY2QKvcHx9z01Z7TvpQ24j8ebA7V8US
 nEm2v0ivSHdjO4XMqDnKAPQ/NXVn5GFRw7N7lk1Jej7TtsMUxwbsOYDSOGaNRnk13R
 5QABdKVLQoiMGxaEXwgRUT4xBky0qAD/eJEDkZgyP8kIq9N+lLcPJ/W4w+ie6Q4jzf
 520GZGBZSt7zEDsHzY5dWFoI8zaoinaihLUzoqubRzZU4se3VdATrQMfnQcAU7zIEK
 sln53auDCCxbaFo0NX+q2VQRwyWdKG8m2NMejg34Gj9f0p3JVZS3E9Xh42YrPpJcUF
 NL1E/a/7UKmCQ==
X-Virus-Scanned: amavis at mail.cs.ucla.edu
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP
 id s14xz_pgKLeq; Thu, 13 Jun 2024 17:07:28 -0700 (PDT)
Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200])
 by mail.cs.ucla.edu (Postfix) with ESMTPSA id 0C4133C005151;
 Thu, 13 Jun 2024 17:07:28 -0700 (PDT)
Message-ID: <911834cc-bb37-4e6a-b6bf-0fede634a4f8@HIDDEN>
Date: Thu, 13 Jun 2024 17:07:26 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [bug-diffutils] bug#71529: Crash for large directory due to
 memory outage
To: Evan Greenup <evan_greenup@HIDDEN>
References: <FGcQ0XZ8J96cxw9QV0rMr2vM2emVn1VwXhWy5W40FktIwK4cKqzkDP6L55mcxv43Y5nMPLqbFy_xNiTMDXZl_BCZI3qxzUohGar48ktt33U=@protonmail.com>
Content-Language: en-US
From: Paul Eggert <eggert@HIDD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40FktIwK4cKqzkDP6L55mcxv43Y5nMPLqbFy_xNiTMDXZl_BCZI3qxzUohGar48ktt33U=@protonmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71529
Cc: 71529 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

What do you mean by "crash"? Did you need to reboot the system, or did 
"diff" dump core, or did diff print a diagnostic "memory exhausxted"?

Can you send a recipe for reproducing the problem? I didn't have any 
trouble running diff 3.10 on a Fedora 40 machine with only 8 GiB RAM, in 
directories with 100,000 files. The following shell commands succeeded 
quietly:

   mkdir d e
   (cd d && touch $(seq 100000))
   (cd e && touch $(seq 100000))
   diff -r d e






Information forwarded to bug-diffutils@HIDDEN:
bug#71529; Package diffutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Jun 2024 05:23:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 13 01:23:49 2024
Received: from localhost ([127.0.0.1]:51704 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sHcw8-0007Gp-Ay
	for submit <at> debbugs.gnu.org; Thu, 13 Jun 2024 01:23:49 -0400
Received: from lists.gnu.org ([209.51.188.17]:39988)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <evan_greenup@HIDDEN>) id 1sHWdP-0006sX-Pd
 for submit <at> debbugs.gnu.org; Wed, 12 Jun 2024 18:40:04 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <evan_greenup@HIDDEN>)
 id 1sHWdQ-0001VA-BB
 for bug-diffutils@HIDDEN; Wed, 12 Jun 2024 18:40:04 -0400
Received: from mail-0301.mail-europe.com ([188.165.51.139])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <evan_greenup@HIDDEN>)
 id 1sHWdO-0006d6-50
 for bug-diffutils@HIDDEN; Wed, 12 Jun 2024 18:40:03 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1718231995; x=1718491195;
 bh=HCTCY6+lNhfpKuL6+IOelzEiEV0emQPcG9UrZjX/X/A=;
 h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date:
 Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector;
 b=gKpekcBwnc8zr2a4sSHXV6cls6A6dLeV+pGYJ1INbNWaQsc+TkhK/8OHB9muvO/ce
 wOYFyeIlDCpv8BeyVmCQBoHKEv1tH4+OlRtQVgJ4RufzwESiwIIHmRdW2/2FNYwbae
 thwqiTXcdieZMQ2dqt5yZLA8HmaS/PWVaBy7+7JvmtjtdKmyOlelNKddgdlaDx2xvE
 5FwYdePY+JNxYHd+nhnZLkuqlEGkHqfP0YWgl+8DPugJ/KnpyXarw3slu3Ja/NWfas
 DKwCTp9EcJwzVMe9bBAbv3mB1JKGO4cUJg72HuRz9MoPBRKbe0S5Gt5kwrvi6VqNUU
 Co+d7CRZoF3vQ==
Date: Wed, 12 Jun 2024 22:39:51 +0000
To: "bug-diffutils@HIDDEN" <bug-diffutils@HIDDEN>
From: Evan Greenup <evan_greenup@HIDDEN>
Subject: Crash for large directory due to memory outage
Message-ID: <FGcQ0XZ8J96cxw9QV0rMr2vM2emVn1VwXhWy5W40FktIwK4cKqzkDP6L55mcxv43Y5nMPLqbFy_xNiTMDXZl_BCZI3qxzUohGar48ktt33U=@protonmail.com>
Feedback-ID: 9586382:user:proton
X-Pm-Message-ID: 27a4eb8797d8b1417faa5169d0881751be1ee8bf
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=188.165.51.139;
 envelope-from=evan_greenup@HIDDEN; helo=mail-0301.mail-europe.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -0.6 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 13 Jun 2024 01:23:40 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hi,

The `diff` command in `diffutils` can compare the difference between  two d=
irectories.=20

However, for large directories (the size for each file is small), when trav=
ersal through them, `diff` command will eat up all the system memory. My co=
mputer is 16GB RAM. And I believe this issue still exist for system with 32=
GB or 64GB RAM.

I would suggest that it can use more memory efficient algorithm to compare =
the difference between directories.

Regards!!!

Evan Greenup.




Acknowledgement sent to Evan Greenup <evan_greenup@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-diffutils@HIDDEN. Full text available.
Report forwarded to bug-diffutils@HIDDEN:
bug#71529; Package diffutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 24 Mar 2025 23:45:01 UTC

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