Changes between Initial Version and Version 2 of Ticket #3365


Ignore:
Timestamp:
Jul 4, 2017, 5:51:36 AM (7 years ago)
Author:
neteler
Comment:

Using valgrind:

GRASS 7.3.svn (latlong):~ > valgrind $CMD
==30211== Memcheck, a memory error detector
==30211== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==30211== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==30211== Command: r.in.gdal input=/mnt/GFC-2015-v1.3/loss_global_forest_cover_loss_2000_2015/loss_global_forest_cover_loss_2000_2015.vrt output=loss_global_forest_cover_loss_2000_2015
==30211== 
Importing raster map <loss_global_forest_cover_loss_2000_2015>...
==30211== Warning: client switching stacks?  SP change: 0xffee9d140 --> 0xffe91ed30
==30211==          to suppress, use: --max-stackframe=5760016 or greater
==30211== Invalid write of size 8
==30211==    at 0x5273D89: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/lib/libgrass_raster.7.3.svn.so)
==30211==    by 0x52744B4: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/lib/libgrass_raster.7.3.svn.so)
==30211==    by 0x4063DE: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/bin/r.in.gdal)
==30211==    by 0x404F64: main (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/bin/r.in.gdal)
==30211==  Address 0xffe91ed28 is on thread 1's stack
==30211== 
==30211== Invalid read of size 8
==30211==    at 0x6D63E3F: lseek (in /usr/lib64/libc-2.24.so)
==30211==    by 0x5273D8D: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/lib/libgrass_raster.7.3.svn.so)
==30211==    by 0x52744B4: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/lib/libgrass_raster.7.3.svn.so)
==30211==    by 0x4063DE: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/bin/r.in.gdal)
==30211==    by 0x404F64: main (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/bin/r.in.gdal)
==30211==  Address 0xffe91ed28 is on thread 1's stack
==30211==  in frame #0, created by lseek (???:)
==30211== 
==30211== Invalid write of size 1
==30211==    at 0x527378C: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/lib/libgrass_raster.7.3.svn.so)
==30211==    by 0x52744B4: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/lib/libgrass_raster.7.3.svn.so)
==30211==    by 0x4063DE: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/bin/r.in.gdal)
==30211==    by 0x404F64: main (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/bin/r.in.gdal)
==30211==  Address 0xffe91ed34 is on thread 1's stack
==30211== 
==30211== Invalid write of size 1
==30211==    at 0x5273798: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/lib/libgrass_raster.7.3.svn.so)
==30211==    by 0x52744B4: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/lib/libgrass_raster.7.3.svn.so)
==30211==    by 0x4063DE: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/bin/r.in.gdal)
==30211==    by 0x404F64: main (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/bin/r.in.gdal)
==30211==  Address 0xffe91ed32 is on thread 1's stack
==30211== 
==30211== Invalid read of size 1
==30211==    at 0x527384E: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/lib/libgrass_raster.7.3.svn.so)
==30211==    by 0x52744B4: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/lib/libgrass_raster.7.3.svn.so)
==30211==    by 0x4063DE: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/bin/r.in.gdal)
==30211==    by 0x404F64: main (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/bin/r.in.gdal)
==30211==  Address 0xffe91ed31 is on thread 1's stack
==30211== 
==30211== 
==30211== More than 10000000 total errors detected.  I'm not reporting any more.
==30211== Final error counts will be inaccurate.  Go fix your program!
==30211== Rerun with --error-limit=no to disable this cutoff.  Note
==30211== that errors may occur in your program without prior warning from
==30211== Valgrind, because errors are no longer being displayed.
==30211== 
==30211== 
==30211== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==30211==  Access not within mapped region at address 0xFFE7BF420
==30211==    at 0x5273CBA: ??? (in /home/mundialis/software/grass73_svn/dist.x86_64-pc-linux-gnu/lib/libgrass_raster.7.3.svn.so)
==30211==  If you believe this happened as a result of a stack
==30211==  overflow in your program's main thread (unlikely but
==30211==  possible), you can try to increase the size of the
==30211==  main thread stack using the --main-stacksize= flag.
==30211==  The main thread stack size used in this run was 8388608.
==30211== 
==30211== Process terminating with default action of signal 11 (SIGSEGV)
==30211==  Access not within mapped region at address 0xFFE7BF418
==30211==    at 0x4A286C0: _vgnU_freeres (vg_preloaded.c:59)
==30211==  If you believe this happened as a result of a stack
==30211==  overflow in your program's main thread (unlikely but
==30211==  possible), you can try to increase the size of the
==30211==  main thread stack using the --main-stacksize= flag.
==30211==  The main thread stack size used in this run was 8388608.
==30211== 
==30211== HEAP SUMMARY:
==30211==     in use at exit: 106,603,369 bytes in 11,066 blocks
==30211==   total heap usage: 78,802 allocs, 67,736 frees, 136,593,845 bytes allocated
==30211== 
==30211== LEAK SUMMARY:
==30211==    definitely lost: 134 bytes in 5 blocks
==30211==    indirectly lost: 353 bytes in 20 blocks
==30211==      possibly lost: 0 bytes in 0 blocks
==30211==    still reachable: 106,602,882 bytes in 11,041 blocks
==30211==         suppressed: 0 bytes in 0 blocks
==30211== Rerun with --leak-check=full to see details of leaked memory
==30211== 
==30211== For counts of detected and suppressed errors, rerun with: -v
==30211== ERROR SUMMARY: 10000000 errors from 5 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)

Next I converted the VRT to GeoTIFF and tried to import that:

GRASS 7.3.svn (latlong):~ > nice gdal_translate -co "COMPRESS=DEFLATE" /mnt/global_forest/GFC-2015-v1.3/loss_global_forest_cover_loss_2000_2015/loss_global_forest_cover_loss_2000_2015.vrt /scratch/loss_global_forest_cover_loss_2000_2015.tif
Input file size is 1440000, 560000
0..10...20...30...40...50...60...70...80...90...100 - done.

GRASS 7.3.svn (latlong):~ > r.in.gdal /scratch/loss_global_forest_cover_loss_2000_2015.tif out=loss_global_forest_cover_loss_2000_2015
Importing raster map <loss_global_forest_cover_loss_2000_2015>...
Segmentation fault (core dumped)

The debug results are the same as before:

GRASS 7.2.2svn (latlong):~/software/grass72_svn_debugmode/bin.x86_64-pc-linux-gnu > gdb r.in.gdal
r GNU gdb (GDB) Fedora 7.12.1-48.fc25
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from r.in.gdal...done.
(gdb) r /scratch/loss_global_forest_cover_loss_2000_2015.tif out=loss_global_forest_cover_loss_2000_2015
Starting program: /home/mundialis/software/grass72_svn_debugmode/dist.x86_64-pc-linux-gnu/bin/r.in.gdal /scratch/loss_global_forest_cover_loss_2000_2015.tif out=loss_global_forest_cover_loss_2000_2015
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.24-8.fc25.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Proceeding with import of 1 raster bands...
Importing raster map <loss_global_forest_cover_loss_2000_2015>...

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff77a1ab9 in put_data (fd=0, null_buf=0x7fffffe9b080 "", cell=0x7fffc57fd010, row=0, n=1440000, zeros_r_nulls=0) at put_row.c:370
370		compressed_buf[0] = work_buf[0] = nbytes;

Legend:

Unmodified
Added
Removed
Modified