Hello

I am trying to debug a leaking TCP server written in Python running on Linux
x86_64

I am a novice in using Valgrind. I recompiled python with all debug options,
and I am using all suppression, that come with Python.
I suspect the problem has nothing to do with Python though.

When I start the server, the RSS memory size of the process is about 25MB
(or about 75MB when I start in valgrind)
Then I cause the memory leak, and the RSS size rises to >350MB.
When I exit the process, I get

==17483== ERROR SUMMARY: 28 errors from 3 contexts (suppressed: 134 from 1)
==17483== malloc/free: in use at exit: 4,396,013 bytes in 25,917 blocks.
==17483== malloc/free: 291,998 allocs, 266,081 frees, 479,044,608 bytes
allocated.
==17483== For counts of detected errors, rerun with: -v
==17483== searching for pointers to 25,917 not-freed blocks.
==17483== checked 5,025,576 bytes.
==17483== 
==17483== LEAK SUMMARY:
==17483==    definitely lost: 0 bytes in 0 blocks.
==17483==      possibly lost: 75,288 bytes in 156 blocks.
==17483==    still reachable: 4,320,725 bytes in 25,761 blocks.
==17483==         suppressed: 0 bytes in 0 blocks.
==17483== Rerun with --leak-check=full to see details of leaked memory.

>From this output, it seems that Valgrind says that the memory held at the
exit was only 4,396,013 bytes, not 350MB, that I can see with ps -orss -p
pid (or using "top" command)

I guess I do not understand something basic here, about the two order of
magnitude mismatch between the memory size numbers that the OS sees and that
valgrind reports at exit. 

Thank you for your advice.





------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to