Open adokter opened 1 year ago
Running valgrind on vol2bird code generated with vol2birdinstall also shows the issue, so not vol2birdR specific
valgrind /opt/vol2bird/vol2bird/bin/vol2bird 3_20110209_062319.pvol.h5
==420211== Memcheck, a memory error detector
==420211== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==420211== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==420211== Command: /opt/vol2bird/vol2bird/bin/vol2bird 3_20110209_062319.pvol.h5
==420211==
==420211== Warning: set address range perms: large range [0x556e000, 0x1afc0000) (defined)
Loaded user configuration file 'options.conf' ...
Warning: no dual-pol moments found, switching to SINGLE POL mode
Warning: using experimental SINGLE polarization mode on S-band data, results may be unreliable!
Warning: using MistNet, disabling other segmentation methods
Warning: Requested elevation scan at 1.500000 degrees but selected scan at 1.300000 degrees
Warning: Requested elevation scan at 3.500000 degrees but selected scan at 3.100000 degrees
Warning: Requested elevation scan at 4.500000 degrees but selected scan at 4.200000 degrees
Warning: Ignoring scan(s) not used as MistNet input: 2 4 8 9 10 11 12 13 14 ...
Warning: no spectrum width data found for MistNet input scan 0, initializing with values 0 instead.
Warning: no spectrum width data found for MistNet input scan 1, initializing with values 0 instead.
Warning: no spectrum width data found for MistNet input scan 2, initializing with values 0 instead.
Warning: no spectrum width data found for MistNet input scan 3, initializing with values 0 instead.
Warning: no spectrum width data found for MistNet input scan 4, initializing with values 0 instead.
==420211== Invalid read of size 8
==420211== at 0x4873E40: flatten3DTensor (librender.c:636)
==420211== by 0x4874E52: segmentScansUsingMistnet (librender.c:1011)
==420211== by 0x486B356: vol2birdSetUp (libvol2bird.c:5004)
==420211== by 0x10A98E: main (vol2bird.c:342)
==420211== Address 0x1e6b9c90 is 0 bytes after a block of size 80 alloc'd
==420211== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==420211== by 0x487364D: init3DTensor (librender.c:470)
==420211== by 0x4873F75: polarVolumeTo3DTensor (librender.c:670)
==420211== by 0x4874E31: segmentScansUsingMistnet (librender.c:1008)
==420211== by 0x486B356: vol2birdSetUp (libvol2bird.c:5004)
==420211== by 0x10A98E: main (vol2bird.c:342)
==420211==
==420211== Invalid read of size 8
==420211== at 0x4873E43: flatten3DTensor (librender.c:636)
==420211== by 0x4874E52: segmentScansUsingMistnet (librender.c:1011)
==420211== by 0x486B356: vol2birdSetUp (libvol2bird.c:5004)
==420211== by 0x10A98E: main (vol2bird.c:342)
==420211== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==420211==
==420211==
==420211== Process terminating with default action of signal 11 (SIGSEGV)
==420211== Access not within mapped region at address 0x0
==420211== at 0x4873E43: flatten3DTensor (librender.c:636)
==420211== by 0x4874E52: segmentScansUsingMistnet (librender.c:1011)
==420211== by 0x486B356: vol2birdSetUp (libvol2bird.c:5004)
==420211== by 0x10A98E: main (vol2bird.c:342)
==420211== If you believe this happened as a result of a stack
==420211== overflow in your program's main thread (unlikely but
==420211== possible), you can try to increase the size of the
==420211== main thread stack using the --main-stacksize= flag.
==420211== The main thread stack size used in this run was 8388608.
==420211==
==420211== HEAP SUMMARY:
==420211== in use at exit: 133,014,543 bytes in 221,111 blocks
==420211== total heap usage: 501,659 allocs, 280,548 frees, 200,529,418 bytes allocated
==420211==
==420211== LEAK SUMMARY:
==420211== definitely lost: 0 bytes in 0 blocks
==420211== indirectly lost: 0 bytes in 0 blocks
==420211== possibly lost: 0 bytes in 0 blocks
==420211== still reachable: 133,014,543 bytes in 221,111 blocks
==420211== of which reachable via heuristic:
==420211== stdstring : 4,459,126 bytes in 94,572 blocks
==420211== suppressed: 0 bytes in 0 blocks
==420211== Rerun with --leak-check=full to see details of leaked memory
==420211==
==420211== For lists of detected and suppressed errors, rerun with: -s
==420211== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Problematic file: 3_20110209_062319.pvol.h5.zip
load unzipped data:
This polar volume contains reflectivity and radial velocity data, but no spectrum width. vol2bird should initialize spectrum width fields with zero's and continue with a mistnet run after throwing a warning:
calculate profile without mistnet:
Calculate profile with mistnet leads to segfault: