Bug 453086
Summary: | dmesg(8) memory leak | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | masanari iida <masanari_iida> |
Component: | util-linux | Assignee: | Karel Zak <kzak> |
Status: | CLOSED WONTFIX | QA Contact: | Ben Levenson <benl> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 5.1 | ||
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2008-07-22 12:50:00 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
masanari iida
2008-06-27 07:21:57 UTC
Track down the leak with self compile version of dmesg(8), valgrind pointed out line 121 in dmesg.c. ==19700== 131,080 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==19700== at 0x40054E5: malloc (vg_replace_malloc.c:149) ==19700== by 0x80487FB: main (dmesg.c:121) ==19700== 119 if (bufsize) { 120 sz = bufsize + 8; 121 buf = (char *) malloc(sz); 122 n = klogctl(cmd, buf, sz); 123 } else { 124 sz = 16392; 125 while (1) { 126 buf = (char *) malloc(sz); 127 n = klogctl(3, buf, sz); /* read only */ 128 if (n != sz || sz > (1<<28)) 129 break; 130 free(buf); 131 sz *= 4; 132 } On Linux all memory is freed after process exit and many utils relies on this feature. I don't think this as a fatal problem which should be fixed in RHEL update. I'll close this report. Please, reopen, if you believe that the problem is important and should be fixed. |