[GRASS-dev] DBF driver (severe?) memory leak

Hamish hamish_b at yahoo.com
Sat Apr 4 03:51:16 EDT 2009


Markus wrote:
> I have tried to run r.random with vector output on a large
> (400mega cells) raster map. After 3% of writing out the
> vector stuff I had to cancel due to severe swapping
> (and 4GB RAM). "top" shows that all memory is eaten by the
> DBF driver.

see also (very old):
   http://bambi.otago.ac.nz/hamish/grass/memleak/v.in.ascii/
which Radim fixed.


> Trying the same with the SQLite driver worked well, no
> memory consumption at all.
> 
> I tried this to trace the memory leak:
> CMD="r.random pat_dtm5m vector_output=vectrandom30percent n=30% --o"
> valgrind --tool=memcheck --leak-check=yes --show-reachable=yes  $CMD --o
> 
> but it doesn't reach the DBF driver (leaks also in the vector part
> but not relevant here).
> 
> How to do that properly?

add "--trace-children=yes" to the valgrind options.

see  http://grass.osgeo.org/wiki/Bugs#Kcachegrind
  "We include --trace-children in the above example so we can profile
   the DBF driver process as well as the main v.what.rast process."


Hamish (lurking)



      



More information about the grass-dev mailing list