Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 752015

Summary: dmesg memory leaks
Product: Red Hat Enterprise Linux 6 Reporter: Juraj Marko <jmarko>
Component: util-linux-ngAssignee: Karel Zak <kzak>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.1CC: nlevinki
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-08 12:47:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juraj Marko 2011-11-08 10:46:03 UTC
Description of problem:
dmesg makes some memory leaks

Version-Release number of selected component (if applicable):
util-linux-ng-2.17.2-12.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. valgrind --leak-check=full --show-reachable=yes --trace-children=yes dmesg
  
Actual results:
==7662== Memcheck, a memory error detector
==7662== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==7662== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info
==7662== Command: dmesg
==7662== Parent PID: 7211
==7662== 
==7662== 
==7662== HEAP SUMMARY:
==7662==     in use at exit: 524,296 bytes in 1 blocks
==7662==   total heap usage: 31 allocs, 30 frees, 527,985 bytes allocated
==7662== 
==7662== 524,296 bytes in 1 blocks are definitely lost in loss record 1 of 1
==7662==    at 0x4C26FDE: malloc (vg_replace_malloc.c:236)
==7662==    by 0x400AD6: ??? (in /bin/dmesg)
==7662==    by 0x4E4BC9C: (below main) (in /lib64/libc-2.12.so)
==7662== 
==7662== LEAK SUMMARY:
==7662==    definitely lost: 524,296 bytes in 1 blocks
==7662==    indirectly lost: 0 bytes in 0 blocks
==7662==      possibly lost: 0 bytes in 0 blocks
==7662==    still reachable: 0 bytes in 0 blocks
==7662==         suppressed: 0 bytes in 0 blocks
==7662== 
==7662== For counts of detected and suppressed errors, rerun with: -v
==7662== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 6 from 6)

Expected results:
==7305== HEAP SUMMARY:
==7305==     in use at exit: 0 bytes in 0 blocks
==7305==   total heap usage: xxx allocs, xxx frees, xxxxx bytes allocated
==7305== 
==7305== All heap blocks were freed -- no leaks are possible
==7305== 
==7305== For counts of detected and suppressed errors, rerun with: -v
==7305== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 6 from 6)

Additional info:

Comment 1 Karel Zak 2011-11-08 12:47:50 UTC
The memory will be freed by kernel after exit. dmesg(1) is not long time running program.