valgrind 사용시 질문...

ohdol의 이미지

valgrind를 아래 옵션을 줘서 돌렸는데...
꼭 프로그램이 종료되어야 메모리 릭 결과를 알 수 있나요?

valgrind --leak-resolution=high --trace-malloc=no --leak-check=yes --show-reachable=yes -v

현재는 쓰레드 풀로 작성된 서버프로그램을 돌리고 있는데

마찬가지로 쓰레드 풀로 작성된 테스트 클라이언트 프로그램으로 200회 정도 작업 하고 top으로 모니터링 해보면 VIRT 부분이 2m정도 증가하고 있습니다.

접속 중간에는 valgrind 에서 별로 뿌려주는건 없는데 메모리가 새고 있는건지...

일단 시작하면 이런 메세지 뿌려주고요...

--19859-- Arch and subarch: X86, x86-sse2
--19859-- Valgrind library directory: /usr/local/lib/valgrind
--19859-- Reading syms from /home/dev/bin/server (0x8048000)
--19859-- Reading syms from /lib/ld-2.3.5.so (0x4C3E7000)
--19859-- Reading syms from /usr/local/lib/valgrind/x86-linux/memcheck (0xB0000000)
--19859--    object doesn't have a dynamic symbol table
--19859-- Reading suppressions file: /usr/local/lib/valgrind/default.supp
--19859-- REDIR: 0x4C3FCDF0 (index) redirected to 0xB001B71E (vgPlain_x86_linux_REDIR_FOR_index)
--19859-- Reading syms from /usr/local/lib/valgrind/x86-linux/vgpreload_core.so (0x4001000)
--19859-- Reading syms from /usr/local/lib/valgrind/x86-linux/vgpreload_memcheck.so (0x4003000)
--19859-- Reading syms from /home/dev/lib/libmysql.so.1.0.1 (0x4008000)
--19859-- Reading syms from /home/dev/lib/libmycom.so.1.0.1 (0x400D000)
--19859-- Reading syms from /home/dev/lib/libmyclog.so.1.0.1 (0x4010000)
--19859-- Reading syms from /home/dev/lib/libmycfg.so.1.0.1 (0x4015000)
--19859-- Reading syms from /usr/lib/libstdc++.so.6.0.7 (0x764000)
--19859--    object doesn't have a symbol table
--19859-- Reading syms from /lib/libm-2.3.5.so (0x6EE000)
--19859-- Reading syms from /lib/libgcc_s-4.0.2-20051126.so.1 (0xAF6000)
--19859--    object doesn't have a symbol table
--19859-- Reading syms from /lib/libpthread-2.3.5.so (0xCCD000)
--19859-- Reading syms from /lib/libc-2.3.5.so (0x4C405000)
--19859-- REDIR: 0x4C3E7770 (_dl_sysinfo_int80) redirected to 0xB001B71B (???)
--19859-- REDIR: 0x4C4703F0 (memset) redirected to 0x4006128 (memset)
--19859-- REDIR: 0x4C470850 (memcpy) redirected to 0x40061E0 (memcpy)
--19859-- REDIR: 0x4C46F580 (rindex) redirected to 0x4005CC0 (rindex)
--19859-- REDIR: 0x80F600 (operator new(unsigned)) redirected to 0x400476A (operator new(unsigned))
--19859-- REDIR: 0x80E088 (operator delete(void*)) redirected to 0x4005182 (operator delete(void*))
--19859-- REDIR: 0x4C46A41E (malloc) redirected to 0x40043CF (malloc)
[5]:=====================
--19859-- REDIR: 0x4C4685E8 (free) redirected to 0x4004EEE (free)
--19859-- REDIR: 0x4C46EC70 (strcpy) redirected to 0x4006444 (strcpy)
--19859-- REDIR: 0x4C46EC10 (strcmp) redirected to 0x4005EF8 (strcmp)
[5]:    Server Start
[5]:=====================
--19859-- REDIR: 0x4C46A148 (calloc) redirected to 0x40056AA (calloc)

테스트 클라이언트 접속시 처음에는 아래 메세지 나오고 그 이후부터는 메세지 없구요.
문제가 있는건지...

--19859-- REDIR: 0x4C46F33C (strncmp) redirected to 0x4005E88 (strncmp)
--19859-- REDIR: 0x4C46E8F0 (strcat) redirected to 0x400637C (strcat)
--19859-- REDIR: 0x4C4711A0 (strchrnul) redirected to 0x40061A4 (strchrnul)
--19859-- REDIR: 0x4C4705A0 (stpcpy) redirected to 0x4006508 (stpcpy)
--19859-- Reading syms from /lib/libnss_files-2.3.5.so (0x7D3C000)
--19859-- REDIR: 0x4C4710D0 (rawmemchr) redirected to 0x40061C8 (rawmemchr)

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.