GNU bug report logs - #54194
Memory Leak on Fedora Machine

Previous Next

Package: grep;

Reported by: Mahyar Mirrashed <mirrashm <at> myumanitoba.ca>

Date: Mon, 28 Feb 2022 08:16:07 UTC

Severity: normal

Tags: moreinfo

To reply to this bug, email your comments to 54194 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#54194; Package grep. (Mon, 28 Feb 2022 08:16:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mahyar Mirrashed <mirrashm <at> myumanitoba.ca>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Mon, 28 Feb 2022 08:16:07 GMT) Full text and rfc822 format available.

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

From: Mahyar Mirrashed <mirrashm <at> myumanitoba.ca>
To: bug-grep <at> gnu.org
Subject: Memory Leak on Fedora Machine
Date: Sun, 27 Feb 2022 23:34:07 -0600
[Message part 1 (text/plain, inline)]
Hi there,

I was implementing a simplistic shell script parser for fun in C. When
profiling with valgrind with --trace-children=yes, I accidentally profiled
`grep` and noticed that there was over 110KB of memory leakage.

I am running grep v3.6 which is the most recent according to `dnf` on
Fedora Linux 35 (KDE Plasma) x86_64 with kernel 5.16.9-200

Thinking that it was because of whatever came with Fedora, I tried
compiling from source but the same memory leakage persisted.

The line that I was profiling was
cat /proc/self/status | grep nonvol > nonvoluntaryswitches.txt

Regards,
Mahyar
[Message part 2 (text/html, inline)]

Information forwarded to bug-grep <at> gnu.org:
bug#54194; Package grep. (Mon, 28 Feb 2022 17:39:01 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Mahyar Mirrashed <mirrashm <at> myumanitoba.ca>
Cc: 54194 <at> debbugs.gnu.org
Subject: Re: bug#54194: Memory Leak on Fedora Machine
Date: Mon, 28 Feb 2022 09:38:11 -0800
On 2/27/22 21:34, Mahyar Mirrashed wrote:
> I accidentally profiled
> `grep` and noticed that there was over 110KB of memory leakage.

There's a good possibility that it's not a true memory leakage. grep 
doesn't bother freeing storage just before it exits, merely to pacify 
memory checkers, as it's faster to simply exit. To find out for sure 
you'll need to investigate further.




Added tag(s) moreinfo. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Mon, 28 Feb 2022 17:39:02 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 170 days ago.

Previous Next


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