Bug 752015 - dmesg memory leaks
Summary: dmesg memory leaks
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: util-linux-ng
Version: 6.1
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Karel Zak
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-08 10:46 UTC by Juraj Marko
Modified: 2015-09-01 03:38 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-08 12:47:50 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.