DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=39471>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39471 Summary: Memory leak in rotatelogs.c file (tested by valgrind) Product: Apache httpd-2 Version: 2.3-HEAD Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Build AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] The following was shown when valgrind was used on rotatelogs.c file [EMAIL PROTECTED]:~/src/httpd- 2.0.58/support> /home/deep/valgrind/runvalgrind/bin/valgrind --tool=memcheck -- leak-check=yes ./rotatelogs ==26239== Memcheck, a memory error detector. ==26239== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==26239== Using LibVEX rev 1575, a library for dynamic binary translation. ==26239== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. ==26239== Using valgrind-3.1.1, a dynamic binary instrumentation framework. ==26239== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==26239== For more details, rerun with: -v ==26239== ==26240== ==26240== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 4) ==26240== malloc/free: in use at exit: 18,956 bytes in 531 blocks. ==26240== malloc/free: 1,086 allocs, 555 frees, 58,905 bytes allocated. ==26240== For counts of detected errors, rerun with: -v ==26240== searching for pointers to 531 not-freed blocks. ==26240== checked 982,680 bytes. ==26240== ==26240== 33 bytes in 1 blocks are definitely lost in loss record 1 of 3 ==26240== at 0x4A18CF6: malloc (vg_replace_malloc.c:149) ==26240== by 0x454375: xmalloc (in /bin/bash) ==26240== by 0x440394: execute_command_internal (in /bin/bash) ==26240== by 0x43F83E: execute_command (in /bin/bash) ==26240== by 0x440FEA: execute_command_internal (in /bin/bash) ==26240== by 0x43F83E: execute_command (in /bin/bash) ==26240== by 0x43781A: reader_loop (in /bin/bash) ==26240== by 0x4368F5: main (in /bin/bash) ==26240== ==26240== LEAK SUMMARY: ==26240== definitely lost: 33 bytes in 1 blocks. ==26240== possibly lost: 0 bytes in 0 blocks. ==26240== still reachable: 18,923 bytes in 530 blocks. ==26240== suppressed: 0 bytes in 0 blocks. ==26240== Reachable blocks (those to which a pointer was found) are not shown. ==26240== To see them, rerun with: --show-reachable=yes ==26242== ==26242== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 4) ==26242== malloc/free: in use at exit: 43,569 bytes in 1,259 blocks. ==26242== malloc/free: 4,137 allocs, 2,878 frees, 226,494 bytes allocated. ==26242== For counts of detected errors, rerun with: -v ==26242== searching for pointers to 1,259 not-freed blocks. ==26242== checked 1,005,000 bytes. ==26242== ==26242== 27 bytes in 1 blocks are definitely lost in loss record 1 of 4 ==26242== at 0x4A18CF6: malloc (vg_replace_malloc.c:149) ==26242== by 0x454375: xmalloc (in /bin/bash) ==26242== by 0x440394: execute_command_internal (in /bin/bash) ==26242== by 0x454E2F: parse_and_execute (in /bin/bash) ==26242== by 0x44BCF1: command_substitute (in /bin/bash) ==26242== by 0x44CCD3: (within /bin/bash) ==26242== by 0x44C9CE: (within /bin/bash) ==26242== by 0x44F818: (within /bin/bash) ==26242== by 0x441732: (within /bin/bash) ==26242== by 0x43FB69: execute_command_internal (in /bin/bash) ==26242== by 0x43F83E: execute_command (in /bin/bash) ==26242== by 0x43FD9C: execute_command_internal (in /bin/bash) ==26242== ==26242== LEAK SUMMARY: ==26242== definitely lost: 27 bytes in 1 blocks. ==26242== possibly lost: 0 bytes in 0 blocks. ==26242== still reachable: 43,542 bytes in 1,258 blocks. ==26242== suppressed: 0 bytes in 0 blocks. ==26242== Reachable blocks (those to which a pointer was found) are not shown. ==26242== To see them, rerun with: --show-reachable=yes ==26241== ==26241== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 4) ==26241== malloc/free: in use at exit: 42,739 bytes in 1,234 blocks. ==26241== malloc/free: 4,097 allocs, 2,863 frees, 224,510 bytes allocated. ==26241== For counts of detected errors, rerun with: -v ==26241== searching for pointers to 1,234 not-freed blocks. ==26241== checked 1,004,200 bytes. ==26241== ==26241== LEAK SUMMARY: ==26241== definitely lost: 0 bytes in 0 blocks. ==26241== possibly lost: 0 bytes in 0 blocks. ==26241== still reachable: 42,739 bytes in 1,234 blocks. ==26241== suppressed: 0 bytes in 0 blocks. ==26241== Reachable blocks (those to which a pointer was found) are not shown. ==26241== To see them, rerun with: --show-reachable=yes ==26244== ==26244== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 4) ==26244== malloc/free: in use at exit: 43,495 bytes in 1,255 blocks. ==26244== malloc/free: 4,173 allocs, 2,918 frees, 226,612 bytes allocated. ==26244== For counts of detected errors, rerun with: -v ==26244== searching for pointers to 1,255 not-freed blocks. ==26244== checked 1,005,256 bytes. ==26244== ==26244== LEAK SUMMARY: ==26244== definitely lost: 0 bytes in 0 blocks. ==26244== possibly lost: 0 bytes in 0 blocks. ==26244== still reachable: 43,495 bytes in 1,255 blocks. ==26244== suppressed: 0 bytes in 0 blocks. ==26244== Reachable blocks (those to which a pointer was found) are not shown. ==26244== To see them, rerun with: --show-reachable=yes ==26243== ==26243== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 4) ==26243== malloc/free: in use at exit: 42,360 bytes in 1,219 blocks. ==26243== malloc/free: 4,160 allocs, 2,941 frees, 226,216 bytes allocated. ==26243== For counts of detected errors, rerun with: -v ==26243== searching for pointers to 1,219 not-freed blocks. ==26243== checked 1,003,704 bytes. ==26243== ==26243== LEAK SUMMARY: ==26243== definitely lost: 0 bytes in 0 blocks. ==26243== possibly lost: 0 bytes in 0 blocks. ==26243== still reachable: 42,360 bytes in 1,219 blocks. ==26243== suppressed: 0 bytes in 0 blocks. ==26243== Reachable blocks (those to which a pointer was found) are not shown. ==26243== To see them, rerun with: --show-reachable=yes ==26246== ==26246== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 4) ==26246== malloc/free: in use at exit: 42,274 bytes in 1,217 blocks. ==26246== malloc/free: 4,230 allocs, 3,013 frees, 228,079 bytes allocated. ==26246== For counts of detected errors, rerun with: -v ==26246== searching for pointers to 1,217 not-freed blocks. ==26246== checked 1,003,456 bytes. ==26246== ==26246== LEAK SUMMARY: ==26246== definitely lost: 0 bytes in 0 blocks. ==26246== possibly lost: 0 bytes in 0 blocks. ==26246== still reachable: 42,274 bytes in 1,217 blocks. ==26246== suppressed: 0 bytes in 0 blocks. ==26246== Reachable blocks (those to which a pointer was found) are not shown. ==26246== To see them, rerun with: --show-reachable=yes ==26249== ==26249== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 4) ==26249== malloc/free: in use at exit: 41,845 bytes in 1,204 blocks. ==26249== malloc/free: 4,295 allocs, 3,091 frees, 229,537 bytes allocated. ==26249== For counts of detected errors, rerun with: -v ==26249== searching for pointers to 1,204 not-freed blocks. ==26249== checked 1,002,848 bytes. ==26249== ==26249== LEAK SUMMARY: ==26249== definitely lost: 0 bytes in 0 blocks. ==26249== possibly lost: 0 bytes in 0 blocks. ==26249== still reachable: 41,845 bytes in 1,204 blocks. ==26249== suppressed: 0 bytes in 0 blocks. ==26249== Reachable blocks (those to which a pointer was found) are not shown. ==26249== To see them, rerun with: --show-reachable=yes ==26252== ==26252== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 4) ==26252== malloc/free: in use at exit: 327,087 bytes in 2,094 blocks. ==26252== malloc/free: 7,274 allocs, 5,180 frees, 586,780 bytes allocated. ==26252== For counts of detected errors, rerun with: -v ==26252== searching for pointers to 2,094 not-freed blocks. ==26252== checked 1,021,688 bytes. ==26252== ==26252== 1,718 bytes in 1 blocks are definitely lost in loss record 1 of 4 ==26252== at 0x4A18CF6: malloc (vg_replace_malloc.c:149) ==26252== by 0x454375: xmalloc (in /bin/bash) ==26252== by 0x440394: execute_command_internal (in /bin/bash) ==26252== by 0x454E2F: parse_and_execute (in /bin/bash) ==26252== by 0x43F5F1: (within /bin/bash) ==26252== by 0x4418ED: (within /bin/bash) ==26252== by 0x43FB69: execute_command_internal (in /bin/bash) ==26252== by 0x454E2F: parse_and_execute (in /bin/bash) ==26252== by 0x44BCF1: command_substitute (in /bin/bash) ==26252== by 0x44CCD3: (within /bin/bash) ==26252== by 0x44D5C8: (within /bin/bash) ==26252== by 0x44D95A: (within /bin/bash) ==26252== ==26252== LEAK SUMMARY: ==26252== definitely lost: 1,718 bytes in 1 blocks. ==26252== possibly lost: 0 bytes in 0 blocks. ==26252== still reachable: 325,369 bytes in 2,093 blocks. ==26252== suppressed: 0 bytes in 0 blocks. ==26252== Reachable blocks (those to which a pointer was found) are not shown. ==26252== To see them, rerun with: --show-reachable=yes ==26251== ==26251== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 4) ==26251== malloc/free: in use at exit: 308,442 bytes in 1,329 blocks. ==26251== malloc/free: 5,583 allocs, 4,254 frees, 560,353 bytes allocated. ==26251== For counts of detected errors, rerun with: -v ==26251== searching for pointers to 1,329 not-freed blocks. ==26251== checked 1,008,248 bytes. ==26251== ==26251== LEAK SUMMARY: ==26251== definitely lost: 0 bytes in 0 blocks. ==26251== possibly lost: 0 bytes in 0 blocks. ==26251== still reachable: 308,442 bytes in 1,329 blocks. ==26251== suppressed: 0 bytes in 0 blocks. ==26251== Reachable blocks (those to which a pointer was found) are not shown. ==26251== To see them, rerun with: --show-reachable=yes Usage: /home/deep/src/httpd-2.0.58/support/.libs/lt-rotatelogs [-l] <logfile> <rotation time in seconds> [offset minutes from UTC] or <rotation size in megabytes> Add this: TransferLog "|/home/deep/src/httpd-2.0.58/support/.libs/lt- rotatelogs /some/where 86400" or TransferLog "|/home/deep/src/httpd-2.0.58/support/.libs/lt- rotatelogs /some/where 5M" to httpd.conf. The generated name will be /some/where.nnnn where nnnn is the system time at which the log nominally starts (N.B. if using a rotation time, the time will always be a multiple of the rotation time, so you can synchronize cron scripts with it). At the end of each rotation time or when the file size is reached a new log is started. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
