X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C85C384A87C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1613920711; bh=Zl7BrJ4LpstNccLyotNbilufd6LajepWVYm0u6edx70=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=jhIY5GxbN4rnj8s0ZYS2GL6Lzxc1DRfSG2DyhDkHPKpm1bzH+G+wfzjFa4f5JuX4/ K+1ePqxy4FTlyHTpkOjcdWCaj9aGomjC2Rlan41tj7CthwTsMfS7M1mVLq1dKVN+H5 pqV9Be2nwy17Y91gwmjlthkAGwGBZ60yviEGPpm8= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C4A99385781C X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :thread-index:content-language; bh=jfjvbkQ+J00wSRTCvAJXMzqH4zuTTSEFNerstwRoM+Q=; b=TsJOPKsQmfBPYS+WQdM2rtRF7NU8FXfdvlG36CLjYZhbTaKJkTr13pIKV3Fdv15xrE h4I/ICRq8u4+olNMBmUoRxDLt7c7PlFftQsemcxRhoxamRMn7BIyTKsmnJlLRQR0G0q2 7yJtBWsqFrgfaPtuD1rQzCRINhktGXjSWhd2HwozsCIVZbG0b20Q1htzmTmzL42AuR7D lAVKxAfWFbvP/otd/yo5Img/nNwdBm0o1+q61AxaX7HJ3/7sWZmpa/jkesSTA/bsdtXC saz9lCMvcu/ilwtZM78XXEBM8jeJFLLt6uD0K3czNs4cTML5PhTERz5JaD2F+8WgzpYH Infw== X-Gm-Message-State: AOAM531hm49g7QJq5YpE9dHM8uVMI8vfUR3ATExu81fIBRl0ilJSTemb 2q0xmA7Z/yIvN7UT4QjaNDO9VRueSmgHiw== X-Google-Smtp-Source: ABdhPJzVDdZLbXZgxEbh+FDw45QZT8KV5cx/qM7AF1jZxowDJIkyPPdL0Xphn1UoxJS4XpJ7LXnkGA== X-Received: by 2002:a37:9a41:: with SMTP id c62mr18223656qke.19.1613920707031; Sun, 21 Feb 2021 07:18:27 -0800 (PST) To: Subject: CRITICAL ls MEMORY LEAK Date: Sun, 21 Feb 2021 10:18:25 -0500 Message-ID: <003401d70864$cd3b3400$67b19c00$@gmail.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdcIZAuyC4/0RFd+SKWcW7oM7hlMSA== Content-Language: en-us X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_20, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Satalink via Cygwin Reply-To: neal DOT garrett AT gmail DOT com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" I deal with a lot of very large files on a regular basis. I've noticed that when I delve into these directories using in mintty and issue the command ls -l (or ls -color=auto), a very large junk of memory is consumed. The memory leak seems to be proportionate to the number and size of files within the containing folder. To reproduce: generate or use a folder containing 50 (or more) 2G+ files. // In this demonstration, I a ran the command on a directory containing 143 files ranging in size from 2GB to 5GB. $> free total used free shared buff/cache available Mem: 50276004 16465148 33810856 0 0 33810856 Swap: 12058624 186468 11872156 $> ls -l -color=auto . (contents displayed after some delay) $> free total used free shared buff/cache available Mem: 50276004 19844660 30431344 0 0 30431344 Swap: 12058624 186460 11872164 // After 10 consecutive executions of the 'ls -al --color=auto' command in this directory, ls has consumed 86% of my system's real memory. $> free total used free shared buff/cache available Mem: 50276004 43587560 6688444 0 0 6688444 Swap: 12058624 301068 11757556 // If I continue (usually unknowingly) my system will completely be depleted of resources to the point my mouse will barely respond to movement. -- -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple