Re: [GRASS-user] Buffer overflow v.in.ogr on GRASS 6.4 RC2

2009-01-14 Thread Nikos Alexandris
On Wed, 2009-01-14 at 23:24 +0100, wout bijkerk wrote:
> I just checked something that came to my mind pondering the problem 
> NIkos encountered (see thread Problem importing/viewing a ~160MB
> shapefile):
> 
> When I import a polygonshape without making an attribute table (-t 
> option), then the shape gets imported without a problem. But as soon
> as I import the same shape with the default of making the attribute
> table, then v.in.ogr gives a buffer overflow. Which is exactly the
> same problem Nikos had importing a big shape.
> 
> Any ideas?
> 
> Greetings,
> Wout

Hi Wout!

I want to make clear that the "buffer overflow" was caused due to the
use of, I suppose, incompatible libraries ([1] taken from [2]). Using a
newer gdal version fixed this.

I never really tried the "-t" option. But I feel I have to (re-)state
the problem I was facing: the import process was NOT failing, nor
self-killed by the system. It was running and, I guess, it was just
taking *too* long and this is why *I* killed/was killing the process.

I never really let it go as much as possible to see what happens. As
Hamish suggests (first reply on my post back then), it will probably
reach its destination if I'll let it run all the way.

In my case, it is about a coastline dataset with 9764427 vertices.

Kind regards, Nikos


[1] copy-pasted from [2]
---
 
Attemp 1 
 
# using gdal 1.5.3, grass6_devel 
# import shapefile 
v.in.ogr dsn=... out=... 
# buffer overflow error (or segfault --- I can't recall). 


 
Attemp 2 
 
# using gdal-1.6.0beta2, grass6_devel 
# importing the usual way 
v.in.ogr dsn=coastlines.shp out=coastlines_longtime -ew --o
Projection of input dataset and current location appear to match 
Layer: coastlines 
WARNING: Column name changed: 'AREA' -> 'area' 
WARNING: Column name changed: 'PERIMETER' -> 'perimeter' 
[...]

[2]
http://n2.nabble.com/Problem-importing-viewing-a-~160MB-shapefile-tt1886478.html#a1886480


___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Buffer overflow v.in.ogr on GRASS 6.4 RC2

2009-01-14 Thread wout bijkerk

wout bijkerk schreef:

Christian Braun schreef:

Hi list members,

I am using GRASS 6.4 RC2 on a Ubuntu 8.10 64bit system. By using 
v.in.ogr I come up with a buffer overflow.

Thanks in advance,
Christian


GRASS 6.4.0RC2 (2169_LUX):/data/grassdata/2169_LUX/cbraun > v.in.ogr 
dsn='PG:host=10.3.1.91 dbname=valid user=cbraun password=party7' 
out=usle_k_values layer=usle_k_values

Projection of input dataset and current location appear to match
Layer: usle_k_values
Importing map 2069 features...
*** buffer overflow detected ***: v.in.ogr terminated
=== Backtrace: =
/lib/libc.so.6(__fortify_fail+0x37)[0x7f0207093887]
/lib/libc.so.6[0x7f0207091750]
/lib/libc.so.6[0x7f0207090d8b]
/lib/libc.so.6(__snprintf_chk+0x7b)[0x7f0207090c5b]
/usr/lib/libgdal1.5.0.so.1(_ZN10OGRFeature16GetFieldAsStringEi+0x346)[0x7f0207db63f6] 


v.in.ogr(main+0x2284)[0x406b7c]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7f0206fb2466]
v.in.ogr[0x403969]
=== Memory map: 
0040-0040a000 r-xp  08:01 
536400 
/usr/local/grass-6.4.0RC2/bin/v.in.ogr
00609000-0060a000 r--p 9000 08:01 
536400 
/usr/local/grass-6.4.0RC2/bin/v.in.ogr
0060a000-0060b000 rw-p a000 08:01 
536400 
/usr/local/grass-6.4.0RC2/bin/v.in.ogr
023fa000-02698000 rw-p 023fa000 00:00 
0  [heap]
7f01fda9a000-7f01fdaa5000 r-xp  08:01 
892959 /lib/libnss_files-2.8.90.so
7f01fdaa5000-7f01fdca4000 ---p b000 08:01 
892959 /lib/libnss_files-2.8.90.so
7f01fdca4000-7f01fdca5000 r--p a000 08:01 
892959 /lib/libnss_files-2.8.90.so
7f01fdca5000-7f01fdca6000 rw-p b000 08:01 
892959 /lib/libnss_files-2.8.90.so
7f01fdca6000-7f01fdcb r-xp  08:01 
892961 /lib/libnss_nis-2.8.90.so
7f01fdcb-7f01fdeaf000 ---p a000 08:01 
892961 /lib/libnss_nis-2.8.90.so
7f01fdeaf000-7f01fdeb r--p 9000 08:01 
892961 /lib/libnss_nis-2.8.90.so
7f01fdeb-7f01fdeb1000 rw-p a000 08:01 
892961 /lib/libnss_nis-2.8.90.so
7f01fdeb1000-7f01fdeb9000 r-xp  08:01 
892957 /lib/libnss_compat-2.8.90.so
7f01fdeb9000-7f01fe0b8000 ---p 8000 08:01 
892957 /lib/libnss_compat-2.8.90.so
7f01fe0b8000-7f01fe0b9000 r--p 7000 08:01 
892957 /lib/libnss_compat-2.8.90.so
7f01fe0b9000-7f01fe0ba000 rw-p 8000 08:01 
892957 /lib/libnss_compat-2.8.90.so
7f01fe0ba000-7f01fe194000 r-xp  08:01 
474841 /usr/lib/libgfortran.so.3.0.0
7f01fe194000-7f01fe393000 ---p 000da000 08:01 
474841 /usr/lib/libgfortran.so.3.0.0
7f01fe393000-7f01fe394000 r--p 000d9000 08:01 
474841 /usr/lib/libgfortran.so.3.0.0
7f01fe394000-7f01fe395000 rw-p 000da000 08:01 
474841 /usr/lib/libgfortran.so.3.0.0

7f01fe395000-7f01fe396000 rw-p 7f01fe395000 00:00 0
7f01fe396000-7f01fe424000 r-xp  08:01 
737421 /usr/lib/libblas.so.3gf.0
7f01fe424000-7f01fe623000 ---p 0008e000 08:01 
737421 /usr/lib/libblas.so.3gf.0
7f01fe623000-7f01fe624000 r--p 0008d000 08:01 
737421 /usr/lib/libblas.so.3gf.0
7f01fe624000-7f01fe625000 rw-p 0008e000 08:01 
737421 /usr/lib/libblas.so.3gf.0
7f01fe625000-7f01fe6db000 r-xp  08:01 
737504 /usr/lib/libfftw3.so.3.1.2
7f01fe6db000-7f01fe8da000 ---p 000b6000 08:01 
737504 /usr/lib/libfftw3.so.3.1.2
7f01fe8da000-7f01fe8e r--p 000b5000 08:01 
737504 /usr/lib/libfftw3.so.3.1.2
7f01fe8e-7f01fe8e1000 rw-p 000bb000 08:01 
737504 /usr/lib/libfftw3.so.3.1.2
7f01fe8e1000-7f01fe918000 r-xp  08:01 
892994 /lib/libncurses.so.5.6
7f01fe918000-7f01feb17000 ---p 00037000 08:01 
892994 /lib/libncurses.so.5.6
7f01feb17000-7f01feb1c000 rw-p 00036000 08:01 
892994 /lib/libncurses.so.5.6
7f01feb1c000-7f01feb24000 r-xp  08:01 
643482 
/usr/local/grass-6.4.0RC2/lib/libgrass_gmath.6.4.0RC2.so
7f01feb24000-7f01fed23000 ---p 8000 08:01 
643482 
/usr/local/grass-6.4.0RC2/lib/libgrass_gmath.6.4.0RC2.so
7f01fed23000-7f01fed24000 r--p 7000 08:01 
643482 
/usr/local/grass-6.4.0RC2/lib/libgrass_gmath.6.4.0RC2.so
7f01fed24000-7f01fed25000 rw-p 8000 08:01 
643482 
/usr/local/grass-6.4.0RC2/lib/libgrass_gmath.6.4.0RC2.so
7f01fed25000-7f01fed2a000 r-xp  08:01 
643448 
/usr/local/grass-6.4.0RC2/lib/libgrass_vask.6.4.0RC2.so
7f01fed2a000-7f01fef29000 ---p 5000 08:01 
643448 
/usr/local/grass-6.4.0RC2/lib/libgrass_vask.6.4.0RC2.so
7f01fef29000-7f01fef2a000 r-

Re: [GRASS-user] Buffer overflow v.in.ogr on GRASS 6.4 RC2

2009-01-13 Thread wout bijkerk

Christian Braun schreef:

Hi list members,

I am using GRASS 6.4 RC2 on a Ubuntu 8.10 64bit system. By using 
v.in.ogr I come up with a buffer overflow.

Thanks in advance,
Christian


GRASS 6.4.0RC2 (2169_LUX):/data/grassdata/2169_LUX/cbraun > v.in.ogr 
dsn='PG:host=10.3.1.91 dbname=valid user=cbraun password=party7' 
out=usle_k_values layer=usle_k_values

Projection of input dataset and current location appear to match
Layer: usle_k_values
Importing map 2069 features...
*** buffer overflow detected ***: v.in.ogr terminated
=== Backtrace: =
/lib/libc.so.6(__fortify_fail+0x37)[0x7f0207093887]
/lib/libc.so.6[0x7f0207091750]
/lib/libc.so.6[0x7f0207090d8b]
/lib/libc.so.6(__snprintf_chk+0x7b)[0x7f0207090c5b]
/usr/lib/libgdal1.5.0.so.1(_ZN10OGRFeature16GetFieldAsStringEi+0x346)[0x7f0207db63f6] 


v.in.ogr(main+0x2284)[0x406b7c]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7f0206fb2466]
v.in.ogr[0x403969]
=== Memory map: 
0040-0040a000 r-xp  08:01 
536400 /usr/local/grass-6.4.0RC2/bin/v.in.ogr
00609000-0060a000 r--p 9000 08:01 
536400 /usr/local/grass-6.4.0RC2/bin/v.in.ogr
0060a000-0060b000 rw-p a000 08:01 
536400 /usr/local/grass-6.4.0RC2/bin/v.in.ogr
023fa000-02698000 rw-p 023fa000 00:00 
0  [heap]
7f01fda9a000-7f01fdaa5000 r-xp  08:01 
892959 /lib/libnss_files-2.8.90.so
7f01fdaa5000-7f01fdca4000 ---p b000 08:01 
892959 /lib/libnss_files-2.8.90.so
7f01fdca4000-7f01fdca5000 r--p a000 08:01 
892959 /lib/libnss_files-2.8.90.so
7f01fdca5000-7f01fdca6000 rw-p b000 08:01 
892959 /lib/libnss_files-2.8.90.so
7f01fdca6000-7f01fdcb r-xp  08:01 
892961 /lib/libnss_nis-2.8.90.so
7f01fdcb-7f01fdeaf000 ---p a000 08:01 
892961 /lib/libnss_nis-2.8.90.so
7f01fdeaf000-7f01fdeb r--p 9000 08:01 
892961 /lib/libnss_nis-2.8.90.so
7f01fdeb-7f01fdeb1000 rw-p a000 08:01 
892961 /lib/libnss_nis-2.8.90.so
7f01fdeb1000-7f01fdeb9000 r-xp  08:01 
892957 /lib/libnss_compat-2.8.90.so
7f01fdeb9000-7f01fe0b8000 ---p 8000 08:01 
892957 /lib/libnss_compat-2.8.90.so
7f01fe0b8000-7f01fe0b9000 r--p 7000 08:01 
892957 /lib/libnss_compat-2.8.90.so
7f01fe0b9000-7f01fe0ba000 rw-p 8000 08:01 
892957 /lib/libnss_compat-2.8.90.so
7f01fe0ba000-7f01fe194000 r-xp  08:01 
474841 /usr/lib/libgfortran.so.3.0.0
7f01fe194000-7f01fe393000 ---p 000da000 08:01 
474841 /usr/lib/libgfortran.so.3.0.0
7f01fe393000-7f01fe394000 r--p 000d9000 08:01 
474841 /usr/lib/libgfortran.so.3.0.0
7f01fe394000-7f01fe395000 rw-p 000da000 08:01 
474841 /usr/lib/libgfortran.so.3.0.0

7f01fe395000-7f01fe396000 rw-p 7f01fe395000 00:00 0
7f01fe396000-7f01fe424000 r-xp  08:01 
737421 /usr/lib/libblas.so.3gf.0
7f01fe424000-7f01fe623000 ---p 0008e000 08:01 
737421 /usr/lib/libblas.so.3gf.0
7f01fe623000-7f01fe624000 r--p 0008d000 08:01 
737421 /usr/lib/libblas.so.3gf.0
7f01fe624000-7f01fe625000 rw-p 0008e000 08:01 
737421 /usr/lib/libblas.so.3gf.0
7f01fe625000-7f01fe6db000 r-xp  08:01 
737504 /usr/lib/libfftw3.so.3.1.2
7f01fe6db000-7f01fe8da000 ---p 000b6000 08:01 
737504 /usr/lib/libfftw3.so.3.1.2
7f01fe8da000-7f01fe8e r--p 000b5000 08:01 
737504 /usr/lib/libfftw3.so.3.1.2
7f01fe8e-7f01fe8e1000 rw-p 000bb000 08:01 
737504 /usr/lib/libfftw3.so.3.1.2
7f01fe8e1000-7f01fe918000 r-xp  08:01 
892994 /lib/libncurses.so.5.6
7f01fe918000-7f01feb17000 ---p 00037000 08:01 
892994 /lib/libncurses.so.5.6
7f01feb17000-7f01feb1c000 rw-p 00036000 08:01 
892994 /lib/libncurses.so.5.6
7f01feb1c000-7f01feb24000 r-xp  08:01 
643482 
/usr/local/grass-6.4.0RC2/lib/libgrass_gmath.6.4.0RC2.so
7f01feb24000-7f01fed23000 ---p 8000 08:01 
643482 
/usr/local/grass-6.4.0RC2/lib/libgrass_gmath.6.4.0RC2.so
7f01fed23000-7f01fed24000 r--p 7000 08:01 
643482 
/usr/local/grass-6.4.0RC2/lib/libgrass_gmath.6.4.0RC2.so
7f01fed24000-7f01fed25000 rw-p 8000 08:01 
643482 
/usr/local/grass-6.4.0RC2/lib/libgrass_gmath.6.4.0RC2.so
7f01fed25000-7f01fed2a000 r-xp  08:01 
643448 
/usr/local/grass-6.4.0RC2/lib/libgrass_vask.6.4.0RC2.so
7f01fed2a000-7f01fef29000 ---p 5000 08:01 
643448 
/usr/local/grass-6.4.0RC2/lib/libgrass_vask.6.4.0RC2.so
7f01fef29000-7f01fef2a000 r--p 4000 08:01 
643448 

[GRASS-user] Buffer overflow v.in.ogr on GRASS 6.4 RC2

2009-01-13 Thread Christian Braun

Hi list members,

I am using GRASS 6.4 RC2 on a Ubuntu 8.10 64bit system. By using  
v.in.ogr I come up with a buffer overflow.

Thanks in advance,
Christian


GRASS 6.4.0RC2 (2169_LUX):/data/grassdata/2169_LUX/cbraun > v.in.ogr  
dsn='PG:host=10.3.1.91 dbname=valid user=cbraun password=party7'  
out=usle_k_values layer=usle_k_values

Projection of input dataset and current location appear to match
Layer: usle_k_values
Importing map 2069 features...
*** buffer overflow detected ***: v.in.ogr terminated
=== Backtrace: =
/lib/libc.so.6(__fortify_fail+0x37)[0x7f0207093887]
/lib/libc.so.6[0x7f0207091750]
/lib/libc.so.6[0x7f0207090d8b]
/lib/libc.so.6(__snprintf_chk+0x7b)[0x7f0207090c5b]
/usr/lib/libgdal1.5.0.so.1(_ZN10OGRFeature16GetFieldAsStringEi+0x346) 
[0x7f0207db63f6]

v.in.ogr(main+0x2284)[0x406b7c]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7f0206fb2466]
v.in.ogr[0x403969]
=== Memory map: 
0040-0040a000 r-xp  08:01  
536400 /usr/local/grass-6.4.0RC2/bin/ 
v.in.ogr
00609000-0060a000 r--p 9000 08:01  
536400 /usr/local/grass-6.4.0RC2/bin/ 
v.in.ogr
0060a000-0060b000 rw-p a000 08:01  
536400 /usr/local/grass-6.4.0RC2/bin/ 
v.in.ogr
023fa000-02698000 rw-p 023fa000 00:00  
0  [heap]
7f01fda9a000-7f01fdaa5000 r-xp  08:01  
892959 /lib/libnss_files-2.8.90.so
7f01fdaa5000-7f01fdca4000 ---p b000 08:01  
892959 /lib/libnss_files-2.8.90.so
7f01fdca4000-7f01fdca5000 r--p a000 08:01  
892959 /lib/libnss_files-2.8.90.so
7f01fdca5000-7f01fdca6000 rw-p b000 08:01  
892959 /lib/libnss_files-2.8.90.so
7f01fdca6000-7f01fdcb r-xp  08:01  
892961 /lib/libnss_nis-2.8.90.so
7f01fdcb-7f01fdeaf000 ---p a000 08:01  
892961 /lib/libnss_nis-2.8.90.so
7f01fdeaf000-7f01fdeb r--p 9000 08:01  
892961 /lib/libnss_nis-2.8.90.so
7f01fdeb-7f01fdeb1000 rw-p a000 08:01  
892961 /lib/libnss_nis-2.8.90.so
7f01fdeb1000-7f01fdeb9000 r-xp  08:01  
892957 /lib/libnss_compat-2.8.90.so
7f01fdeb9000-7f01fe0b8000 ---p 8000 08:01  
892957 /lib/libnss_compat-2.8.90.so
7f01fe0b8000-7f01fe0b9000 r--p 7000 08:01  
892957 /lib/libnss_compat-2.8.90.so
7f01fe0b9000-7f01fe0ba000 rw-p 8000 08:01  
892957 /lib/libnss_compat-2.8.90.so
7f01fe0ba000-7f01fe194000 r-xp  08:01  
474841 /usr/lib/libgfortran.so.3.0.0
7f01fe194000-7f01fe393000 ---p 000da000 08:01  
474841 /usr/lib/libgfortran.so.3.0.0
7f01fe393000-7f01fe394000 r--p 000d9000 08:01  
474841 /usr/lib/libgfortran.so.3.0.0
7f01fe394000-7f01fe395000 rw-p 000da000 08:01  
474841 /usr/lib/libgfortran.so.3.0.0

7f01fe395000-7f01fe396000 rw-p 7f01fe395000 00:00 0
7f01fe396000-7f01fe424000 r-xp  08:01  
737421 /usr/lib/libblas.so.3gf.0
7f01fe424000-7f01fe623000 ---p 0008e000 08:01  
737421 /usr/lib/libblas.so.3gf.0
7f01fe623000-7f01fe624000 r--p 0008d000 08:01  
737421 /usr/lib/libblas.so.3gf.0
7f01fe624000-7f01fe625000 rw-p 0008e000 08:01  
737421 /usr/lib/libblas.so.3gf.0
7f01fe625000-7f01fe6db000 r-xp  08:01  
737504 /usr/lib/libfftw3.so.3.1.2
7f01fe6db000-7f01fe8da000 ---p 000b6000 08:01  
737504 /usr/lib/libfftw3.so.3.1.2
7f01fe8da000-7f01fe8e r--p 000b5000 08:01  
737504 /usr/lib/libfftw3.so.3.1.2
7f01fe8e-7f01fe8e1000 rw-p 000bb000 08:01  
737504 /usr/lib/libfftw3.so.3.1.2
7f01fe8e1000-7f01fe918000 r-xp  08:01  
892994 /lib/libncurses.so.5.6
7f01fe918000-7f01feb17000 ---p 00037000 08:01  
892994 /lib/libncurses.so.5.6
7f01feb17000-7f01feb1c000 rw-p 00036000 08:01  
892994 /lib/libncurses.so.5.6
7f01feb1c000-7f01feb24000 r-xp  08:01  
643482 /usr/local/grass-6.4.0RC2/lib/ 
libgrass_gmath.6.4.0RC2.so
7f01feb24000-7f01fed23000 ---p 8000 08:01  
643482 /usr/local/grass-6.4.0RC2/lib/ 
libgrass_gmath.6.4.0RC2.so
7f01fed23000-7f01fed24000 r--p 7000 08:01  
643482 /usr/local/grass-6.4.0RC2/lib/ 
libgrass_gmath.6.4.0RC2.so
7f01fed24000-7f01fed25000 rw-p 8000 08:01  
643482 /usr/local/grass-6.4.0RC2/lib/ 
libgrass_gmath.6.4.0RC2.so
7f01fed25000-7f01fed2a000 r-xp  08:01  
643448 /usr/local/grass-6.4.0RC2/lib/libgrass_vask. 
6.4.0RC2.so
7f01fed2a000-7f01fef29000 ---p 5000 08:01  
643448 /usr/local/grass-6.4.0RC2/lib/libgrass_vask. 
6.4.0RC2.so
7f01fef29000-7f01fef2a000 r-