[GRASS-dev] Re: [GRASS-user] r.watershed crashing grass.

Markus Metz markus.metz.giswork at googlemail.com
Fri Jul 31 09:07:09 EDT 2009


Hamish wrote:
> Markus Metz wrote:
>   
>> There were quite a few posts in the list about vista problems,
>> maybe you find some hints there. I'm only using Linux, can't
>> help there.
>>     
>
> IIRC it was more generic memory problems which only showed up on
> MS Windows. In those cases valgrind reported errors, just on
> Linux they end up being benign. 
>   
valgrind reports on nc_spm_08 with elevation as input DEM for r.watershed:

RAM mode:

CMD="r.watershed elevation=elevation at PERMANENT threshold=3000 
accumulation=elevation.acc drainage=elevation.dir basin=elevation.basin 
stream=elevation.stream --overwrite"
GRASS 6.4.0svn (nc_spm_08):~ > valgrind -v --tool=memcheck 
--leak-check=yes --show-reachable=yes $CMD
==26414== Memcheck, a memory error detector.
==26414== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==26414== Using LibVEX rev 1804, a library for dynamic binary translation.
==26414== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==26414== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
==26414== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==26414==
--26414-- Command line
--26414-- r.watershed
--26414-- elevation=elevation at PERMANENT
--26414-- threshold=3000
--26414-- accumulation=elevation.acc
--26414-- drainage=elevation.dir
--26414-- basin=elevation.basin
--26414-- stream=elevation.stream
--26414-- --overwrite
--26414-- Startup, with flags:
--26414-- -v
--26414-- --tool=memcheck
--26414-- --leak-check=yes
--26414-- --show-reachable=yes
--26414-- Contents of /proc/version:
--26414-- Linux version 2.6.27.15-c0.1 (mkkas at monster) (gcc version 
4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #1 SMP Tue Feb 24 11:46:22 CET 2009
--26414-- Arch and hwcaps: AMD64, amd64-sse2
--26414-- Page sizes: currently 4096, max supported 4096
--26414-- Valgrind library directory: /usr/lib64/valgrind
--26414-- Reading syms from 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed 
(0x400000)
--26414-- Reading syms from /usr/lib64/valgrind/amd64-linux/memcheck 
(0x38000000)
--26414-- object doesn't have a dynamic symbol table
--26414-- Reading syms from /lib64/ld-2.9.so (0x342D800000)
--26414-- Reading suppressions file: /usr/lib64/valgrind/default.supp
--26414-- Reading syms from 
/usr/lib64/valgrind/amd64-linux/vgpreload_core.so (0x4802000)
--26414-- Reading syms from 
/usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so (0x4A03000)
--26414-- REDIR: 0x342d817d30 (index) redirected to 0x4a07890 (index)
--26414-- REDIR: 0x342d817ee0 (strcmp) redirected to 0x4a07e50 (strcmp)
--26414-- REDIR: 0x342d817ff0 (strlen) redirected to 0x4a07b50 (strlen)
--26414-- Reading syms from 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so 
(0x4C0B000)
--26414-- Reading syms from 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_datetime.6.4.0svn.so 
(0x4E67000)
--26414-- Reading syms from /lib64/libz.so.1.2.3 (0x342FC00000)
--26414-- object doesn't have a symbol table
--26414-- Reading syms from /lib64/libm-2.9.so (0x342F000000)
--26414-- Reading syms from /lib64/libc-2.9.so (0x342EC00000)
--26414-- Reading syms from /lib64/libdl-2.9.so (0x342F400000)
--26414-- REDIR: 0x342ec81310 (rindex) redirected to 0x4a076f0 (rindex)
--26414-- REDIR: 0x342ec80e40 (strlen) redirected to 0x4a07b10 (strlen)
--26414-- REDIR: 0x342ec7c9a0 (malloc) redirected to 0x4a072d0 (malloc)
--26414-- REDIR: 0x342ec808f0 (strcpy) redirected to 0x4a07b70 (strcpy)
--26414-- REDIR: 0x342ec7a410 (free) redirected to 0x4a05fd0 (free)
--26414-- REDIR: 0x342ec810e0 (strncmp) redirected to 0x4a07d70 (strncmp)
--26414-- REDIR: 0x342ec808b0 (strcmp) redirected to 0x4a07df0 (strcmp)
--26414-- REDIR: 0x342ec7ce90 (realloc) redirected to 0x4a073f0 (realloc)
--26414-- REDIR: 0x342ec86f10 (strchrnul) redirected to 0x4a088a0 
(strchrnul)
--26414-- REDIR: 0x342ec83890 (mempcpy) redirected to 0x4a08900 (mempcpy)
--26414-- REDIR: 0x342ec82d60 (memset) redirected to 0x4a087d0 (memset)
--26414-- REDIR: 0x342ec80700 (index) redirected to 0x4a07810 (index)
--26414-- REDIR: 0x342ec841d0 (memcpy) redirected to 0x4a07f60 (memcpy)
--26414-- REDIR: 0x342ec35d50 (putenv) redirected to 0x4a08ac0 (putenv)
--26414-- REDIR: 0x342ec80f30 (strnlen) redirected to 0x4a07ac0 (strnlen)
--26414-- REDIR: 0x342ec80540 (strcat) redirected to 0x4a078d0 (strcat)
SECTION 1a (of 5): Initiating Memory.
SECTION 1b (of 5): Determining Offmap Flow.
100%
SECTION 2: A * Search.
100%
SECTION 3: Accumulating Surface Flow.
100%
SECTION 4: Watershed determination.
100%
SECTION 5: Closing Maps.
100%
--26414-- REDIR: 0x342ec82500 (memchr) redirected to 0x4a07f10 (memchr)
--26414-- REDIR: 0xffffffffff600400 (???) redirected to 0x3802d09d 
(vgPlain_amd64_linux_REDIR_FOR_vtime)
--26414-- REDIR: 0x342ec811b0 (strncpy) redirected to 0x4a07c40 (strncpy)
--26414-- REDIR: 0x342ec83ea0 (stpcpy) redirected to 0x4a08560 (stpcpy)
--26414-- REDIR: 0x342ec7c600 (calloc) redirected to 0x4a050a0 (calloc)
--26414-- Reading syms from /lib64/libnss_files-2.9.so (0x5492000)
--26414-- REDIR: 0x342ec86df0 (rawmemchr) redirected to 0x4a088e0 
(rawmemchr)
--26414-- Discarding syms at 0x5492000-0x569F000 in 
/lib64/libnss_files-2.9.so due to munmap()
==26414==
==26414== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 5 from 1)
--26414--
--26414-- supp: 5 dl-hack3-1
==26414== malloc/free: in use at exit: 8,177 bytes in 81 blocks.
==26414== malloc/free: 197 allocs, 116 frees, 29,996 bytes allocated.
==26414==
==26414== searching for pointers to 81 not-freed blocks.
==26414== checked 127,720 bytes.
==26414==
==26414== 168 bytes in 1 blocks are still reachable in loss record 1 of 5
==26414== at 0x4A074D1: realloc (vg_replace_malloc.c:429)
==26414== by 0x4C1C7B6: G__realloc (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C28B1B: set_env (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C28D27: read_env (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C290E6: G__getenv (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C29168: G_getenv (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C34337: G__location_path (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C343A5: G_location_path (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C309AB: G__gisinit (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x400E36: main (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed)
==26414==
==26414==
==26414== 353 bytes in 5 blocks are definitely lost in loss record 2 of 5
==26414== at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==26414== by 0x4C1C81E: G__malloc (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C3436B: G__location_path (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C343A5: G_location_path (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C309AB: G__gisinit (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x400E36: main (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed)
==26414==
==26414==
==26414== 1,024 bytes in 1 blocks are still reachable in loss record 3 of 5
==26414== at 0x4A05174: calloc (vg_replace_malloc.c:397)
==26414== by 0x4C1C891: G__calloc (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C39081: G_recreate_command (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C31625: G_command_history (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x400DCD: write_hist (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed)
==26414== by 0x4022F0: main (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed)
==26414==
==26414==
==26414== 3,072 bytes in 3 blocks are definitely lost in loss record 4 of 5
==26414== at 0x4A05174: calloc (vg_replace_malloc.c:397)
==26414== by 0x4C1C891: G__calloc (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C39081: G_recreate_command (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C31625: G_command_history (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x400DCD: write_hist (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed)
==26414== by 0x402272: main (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed)
==26414==
==26414==
==26414== 3,560 bytes in 71 blocks are still reachable in loss record 5 of 5
==26414== at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==26414== by 0x4C1C81E: G__malloc (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C4AE9A: G_store (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C413B6: G_set_program_name (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x4C3098F: G__gisinit (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26414== by 0x400E36: main (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed)
==26414==
==26414== LEAK SUMMARY:
==26414== definitely lost: 3,425 bytes in 8 blocks.
==26414== possibly lost: 0 bytes in 0 blocks.
==26414== still reachable: 4,752 bytes in 73 blocks.
==26414== suppressed: 0 bytes in 0 blocks.
--26414-- memcheck: sanity checks: 1 cheap, 2 expensive
--26414-- memcheck: auxmaps: 168 auxmap entries (10752k, 10M) in use
--26414-- memcheck: auxmaps_L1: 7886 searches, 54704 cmps, ratio 69:10
--26414-- memcheck: auxmaps_L2: 205 searches, 168 nodes
--26414-- memcheck: SMs: n_issued = 25 (400k, 0M)
--26414-- memcheck: SMs: n_deissued = 1 (16k, 0M)
--26414-- memcheck: SMs: max_noaccess = 524287 (8388592k, 8191M)
--26414-- memcheck: SMs: max_undefined = 0 (0k, 0M)
--26414-- memcheck: SMs: max_defined = 322 (5152k, 5M)
--26414-- memcheck: SMs: max_non_DSM = 24 (384k, 0M)
--26414-- memcheck: max sec V bit nodes: 2 (0k, 0M)
--26414-- memcheck: set_sec_vbits8 calls: 3 (new: 2, updates: 1)
--26414-- memcheck: max shadow mem size: 4528k, 4M
--26414-- translate: fast SP updates identified: 2,975 ( 86.8%)
--26414-- translate: generic_known SP updates identified: 318 ( 9.2%)
--26414-- translate: generic_unknown SP updates identified: 133 ( 3.8%)
--26414-- tt/tc: 8,885 tt lookups requiring 9,154 probes
--26414-- tt/tc: 8,885 fast-cache updates, 6 flushes
--26414-- transtab: new 4,048 (89,632 -> 1,492,661; ratio 166:10) [0 scs]
--26414-- transtab: dumped 0 (0 -> ??)
--26414-- transtab: discarded 70 (1,294 -> ??)
--26414-- scheduler: 154,625 jumps (bb entries).
--26414-- scheduler: 1/5,524 major/minor sched events.
--26414-- sanity: 2 cheap, 2 expensive checks.
--26414-- exectx: 769 lists, 207 contexts (avg 0 per list)
--26414-- exectx: 318 searches, 135 full compares (424 per 1000)
--26414-- exectx: 140 cmp2, 10 cmp4, 0 cmpAll
--26414-- errormgr: 10 supplist searches, 145 comparisons during search
--26414-- errormgr: 5 errlist searches, 10 comparisons during search

SEG mode:
CMD="r.watershed elevation=elevation at PERMANENT threshold=3000 
accumulation=elevation.acc drainage=elevation.dir basin=elevation.basin 
stream=elevation.stream -m --overwrite"
GRASS 6.4.0svn (nc_spm_08):~ > valgrind -v --tool=memcheck 
--leak-check=yes --show-reachable=yes $CMD
==26557== Memcheck, a memory error detector.
==26557== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==26557== Using LibVEX rev 1804, a library for dynamic binary translation.
==26557== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==26557== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
==26557== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==26557==
--26557-- Command line
--26557-- r.watershed
--26557-- elevation=elevation at PERMANENT
--26557-- threshold=3000
--26557-- accumulation=elevation.acc
--26557-- drainage=elevation.dir
--26557-- basin=elevation.basin
--26557-- stream=elevation.stream
--26557-- -m
--26557-- --overwrite
--26557-- Startup, with flags:
--26557-- -v
--26557-- --tool=memcheck
--26557-- --leak-check=yes
--26557-- --show-reachable=yes
--26557-- Contents of /proc/version:
--26557-- Linux version 2.6.27.15-c0.1 (mkkas at monster) (gcc version 
4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #1 SMP Tue Feb 24 11:46:22 CET 2009
--26557-- Arch and hwcaps: AMD64, amd64-sse2
--26557-- Page sizes: currently 4096, max supported 4096
--26557-- Valgrind library directory: /usr/lib64/valgrind
--26557-- Reading syms from 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed 
(0x400000)
--26557-- Reading syms from /usr/lib64/valgrind/amd64-linux/memcheck 
(0x38000000)
--26557-- object doesn't have a dynamic symbol table
--26557-- Reading syms from /lib64/ld-2.9.so (0x342D800000)
--26557-- Reading suppressions file: /usr/lib64/valgrind/default.supp
--26557-- Reading syms from 
/usr/lib64/valgrind/amd64-linux/vgpreload_core.so (0x4802000)
--26557-- Reading syms from 
/usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so (0x4A03000)
--26557-- REDIR: 0x342d817d30 (index) redirected to 0x4a07890 (index)
--26557-- REDIR: 0x342d817ee0 (strcmp) redirected to 0x4a07e50 (strcmp)
--26557-- REDIR: 0x342d817ff0 (strlen) redirected to 0x4a07b50 (strlen)
--26557-- Reading syms from 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so 
(0x4C0B000)
--26557-- Reading syms from 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_datetime.6.4.0svn.so 
(0x4E67000)
--26557-- Reading syms from /lib64/libz.so.1.2.3 (0x342FC00000)
--26557-- object doesn't have a symbol table
--26557-- Reading syms from /lib64/libm-2.9.so (0x342F000000)
--26557-- Reading syms from /lib64/libc-2.9.so (0x342EC00000)
--26557-- Reading syms from /lib64/libdl-2.9.so (0x342F400000)
--26557-- REDIR: 0x342ec81310 (rindex) redirected to 0x4a076f0 (rindex)
--26557-- REDIR: 0x342ec80e40 (strlen) redirected to 0x4a07b10 (strlen)
--26557-- REDIR: 0x342ec7c9a0 (malloc) redirected to 0x4a072d0 (malloc)
--26557-- REDIR: 0x342ec808f0 (strcpy) redirected to 0x4a07b70 (strcpy)
--26557-- REDIR: 0x342ec7a410 (free) redirected to 0x4a05fd0 (free)
--26557-- REDIR: 0x342ec810e0 (strncmp) redirected to 0x4a07d70 (strncmp)
--26557-- REDIR: 0x342ec808b0 (strcmp) redirected to 0x4a07df0 (strcmp)
--26557-- REDIR: 0x342ec7ce90 (realloc) redirected to 0x4a073f0 (realloc)
--26557-- REDIR: 0x342ec86f10 (strchrnul) redirected to 0x4a088a0 
(strchrnul)
--26557-- REDIR: 0x342ec83890 (mempcpy) redirected to 0x4a08900 (mempcpy)
--26557-- REDIR: 0x342ec82d60 (memset) redirected to 0x4a087d0 (memset)
--26557-- REDIR: 0x342ec80700 (index) redirected to 0x4a07810 (index)
--26557-- REDIR: 0x342ec841d0 (memcpy) redirected to 0x4a07f60 (memcpy)
--26557-- REDIR: 0x342ec35d50 (putenv) redirected to 0x4a08ac0 (putenv)
--26557-- REDIR: 0x342ec80f30 (strnlen) redirected to 0x4a07ac0 (strnlen)
--26557-- REDIR: 0x342ec80540 (strcat) redirected to 0x4a078d0 (strcat)
SECTION 1 beginning: Initiating Variables. 5 sections total.
SECTION 1b (of 5): Determining Offmap Flow.
100%
SECTION 2: A * Search.
100%
SECTION 3: Accumulating Surface Flow.
100%
SECTION 4: Watershed determination.
100%
SECTION 5: Closing Maps.
100%
--26557-- REDIR: 0x342ec82500 (memchr) redirected to 0x4a07f10 (memchr)
--26557-- REDIR: 0xffffffffff600400 (???) redirected to 0x3802d09d 
(vgPlain_amd64_linux_REDIR_FOR_vtime)
--26557-- REDIR: 0x342ec811b0 (strncpy) redirected to 0x4a07c40 (strncpy)
--26557-- REDIR: 0x342ec83ea0 (stpcpy) redirected to 0x4a08560 (stpcpy)
--26557-- REDIR: 0x342ec7c600 (calloc) redirected to 0x4a050a0 (calloc)
--26557-- Reading syms from /lib64/libnss_files-2.9.so (0x5492000)
--26557-- REDIR: 0x342ec86df0 (rawmemchr) redirected to 0x4a088e0 
(rawmemchr)
--26557-- Discarding syms at 0x5492000-0x569F000 in 
/lib64/libnss_files-2.9.so due to munmap()
==26557==
==26557== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 5 from 1)
--26557--
--26557-- supp: 5 dl-hack3-1
==26557== malloc/free: in use at exit: 8,177 bytes in 81 blocks.
==26557== malloc/free: 197 allocs, 116 frees, 29,996 bytes allocated.
==26557==
==26557== searching for pointers to 81 not-freed blocks.
==26557== checked 127,744 bytes.
==26557==
==26557== 168 bytes in 1 blocks are still reachable in loss record 1 of 5
==26557== at 0x4A074D1: realloc (vg_replace_malloc.c:429)
==26557== by 0x4C1C7B6: G__realloc (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C28B1B: set_env (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C28D27: read_env (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C290E6: G__getenv (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C29168: G_getenv (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C34337: G__location_path (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C343A5: G_location_path (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C309AB: G__gisinit (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x400E36: main (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed)
==26557==
==26557==
==26557== 353 bytes in 5 blocks are definitely lost in loss record 2 of 5
==26557== at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==26557== by 0x4C1C81E: G__malloc (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C3436B: G__location_path (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C343A5: G_location_path (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C309AB: G__gisinit (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x400E36: main (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed)
==26557==
==26557==
==26557== 1,024 bytes in 1 blocks are still reachable in loss record 3 of 5
==26557== at 0x4A05174: calloc (vg_replace_malloc.c:397)
==26557== by 0x4C1C891: G__calloc (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C39081: G_recreate_command (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C31625: G_command_history (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x400DCD: write_hist (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed)
==26557== by 0x4022F0: main (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed)
==26557==
==26557==
==26557== 3,072 bytes in 3 blocks are definitely lost in loss record 4 of 5
==26557== at 0x4A05174: calloc (vg_replace_malloc.c:397)
==26557== by 0x4C1C891: G__calloc (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C39081: G_recreate_command (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C31625: G_command_history (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x400DCD: write_hist (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed)
==26557== by 0x402272: main (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed)
==26557==
==26557==
==26557== 3,560 bytes in 71 blocks are still reachable in loss record 5 of 5
==26557== at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==26557== by 0x4C1C81E: G__malloc (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C4AE9A: G_store (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C413B6: G_set_program_name (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x4C3098F: G__gisinit (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.6.4.0svn.so)
==26557== by 0x400E36: main (in 
/home/metzm/src/grass64_release/dist.x86_64-unknown-linux-gnu/bin/r.watershed)
==26557==
==26557== LEAK SUMMARY:
==26557== definitely lost: 3,425 bytes in 8 blocks.
==26557== possibly lost: 0 bytes in 0 blocks.
==26557== still reachable: 4,752 bytes in 73 blocks.
==26557== suppressed: 0 bytes in 0 blocks.
--26557-- memcheck: sanity checks: 1 cheap, 2 expensive
--26557-- memcheck: auxmaps: 168 auxmap entries (10752k, 10M) in use
--26557-- memcheck: auxmaps_L1: 7886 searches, 54704 cmps, ratio 69:10
--26557-- memcheck: auxmaps_L2: 205 searches, 168 nodes
--26557-- memcheck: SMs: n_issued = 25 (400k, 0M)
--26557-- memcheck: SMs: n_deissued = 1 (16k, 0M)
--26557-- memcheck: SMs: max_noaccess = 524287 (8388592k, 8191M)
--26557-- memcheck: SMs: max_undefined = 0 (0k, 0M)
--26557-- memcheck: SMs: max_defined = 322 (5152k, 5M)
--26557-- memcheck: SMs: max_non_DSM = 24 (384k, 0M)
--26557-- memcheck: max sec V bit nodes: 2 (0k, 0M)
--26557-- memcheck: set_sec_vbits8 calls: 3 (new: 2, updates: 1)
--26557-- memcheck: max shadow mem size: 4528k, 4M
--26557-- translate: fast SP updates identified: 2,977 ( 86.8%)
--26557-- translate: generic_known SP updates identified: 318 ( 9.2%)
--26557-- translate: generic_unknown SP updates identified: 133 ( 3.8%)
--26557-- tt/tc: 8,936 tt lookups requiring 9,209 probes
--26557-- tt/tc: 8,936 fast-cache updates, 6 flushes
--26557-- transtab: new 4,072 (90,214 -> 1,509,917; ratio 167:10) [0 scs]
--26557-- transtab: dumped 0 (0 -> ??)
--26557-- transtab: discarded 70 (1,294 -> ??)
--26557-- scheduler: 154,870 jumps (bb entries).
--26557-- scheduler: 1/5,551 major/minor sched events.
--26557-- sanity: 2 cheap, 2 expensive checks.
--26557-- exectx: 769 lists, 207 contexts (avg 0 per list)
--26557-- exectx: 318 searches, 135 full compares (424 per 1000)
--26557-- exectx: 140 cmp2, 10 cmp4, 0 cmpAll
--26557-- errormgr: 10 supplist searches, 145 comparisons during search
--26557-- errormgr: 5 errlist searches, 10 comparisons during search

I can't see anything to worry about, should valgrind be run with other 
options?

Markus M


More information about the grass-dev mailing list