[GRASS5] Re: [GRASSLIST:5282] v.out.ascii Segfault -- backup plan?

Hi!

On Mon, Jan 10, 2005 at 05:38:08PM -0800, Dylan Beaudette wrote:

Just posted a bug report for v.out.ascii:

Same bug as #2851 posted 3 weeks ago, but on PPC.

Example Code:
v.out.ascii input=trails_57 output=trails.xy
Segmentation fault

Compile Time Arguments:
./configure --with-tcltk-includes=/usr/include/tcl8.3 --without-postgres
--without-odbc --with-mysql --with-mysql-includes=/usr/include/mysql/
--with-blas --with-lapack --with-freetype
--with-freetype-includes=/usr/include/freetype2

System is Debian/testing

Any ideas to workarounds until this is working again? I have considered
exporting lines as SHP file, and then dumping the xy coords with ogrinfo
-al ... any ideas for a better solution?

thanks in advance!

I thought, I'm the only one, who gets this bug! I have two installations of
Sarge + GRASS 5.7 and both of them are segfaulting by v.out.ascii.

Here some details:

I use debian gnu linux sarge. Before I started, I run rm -rf on
/usr/local/grass-5.7.cvs/ /usr/src/grass57 ~/.grassrc6 and I improved my
/etc/ld.so.conf like this:

/usr/X11R6/lib
/usr/local/lib
/usr/lib/atlas
/usr/local/grass-5.7.cvs/lib
/usr/lib

and run ldconfig

cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Celeron(R) CPU 2.00GHz
stepping : 9
cpu MHz : 2019.960
cache size : 128 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca =
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
bogomips : 4005.88

cat /proc/meminfo
MemTotal: 1557528 kB
MemFree: 1260100 kB
Buffers: 29436 kB
Cached: 169520 kB
SwapCached: 0 kB
Active: 176884 kB
Inactive: 89052 kB
HighTotal: 655296 kB
HighFree: 410112 kB
LowTotal: 902232 kB
LowFree: 849988 kB
SwapTotal: 1518100 kB
SwapFree: 1518100 kB
Dirty: 260 kB
Writeback: 0 kB
Mapped: 107152 kB
Slab: 14104 kB
Committed_AS: 157320 kB
PageTables: 980 kB
VmallocTotal: 114680 kB
VmallocUsed: 26028 kB
VmallocChunk: 84028 kB

I configured GRASS like this:

CFLAGS=3D"-g -Wall" ./configure --with-cxx --with-postgres-includes=3D/us=
r/include/postgresql/ --with-gdal=3D/usr/bin/gdal-config --with-proj --with=
-motif --with-glw --with-nls --with-freetype --with-freetype-includes=3D/us=
r/include/freetype2/ --with-tcltk-includes=3D/usr/include/tcl8.3/

And I got:

GRASS is now configured for: i686-pc-linux-gnu

Source directory: /usr/src/grass/grass51
Build directory: /usr/src/grass/grass51
Installation directory: /usr/local/grass-5.7.cvs
Startup script in directory: ${exec_prefix}/bin
C compiler: gcc -g -Wall=20
C++ compiler: c++ -g -O2
FORTRAN compiler: =20
Building shared libraries: yes

  NVIZ: yes

  X11 support: yes
  JPEG support: yes
  TIFF support: yes
  PNG support: yes
  Tcl/Tk support: yes
  PostgreSQL support: yes
  MySQL support: no
  OpenGL(R) support: yes
  ODBC support: no
  FFTW support: yes
  BLAS support: no
  LAPACK support: no
  Motif support: yes
  FreeType support: yes
  GLw support: yes
  NLS support: yes
  Readline support: no
  C++ support: yes
  openDWG support: no
  GDAL support: yes
  OGR support: yes

then I run make and error.log says:

GRASS GIS compilation log
-------------------------
Started compilation: P=E1 led 7 18:42:50 CET 2005
Errors in:
Finished compilation: P=E1 led 7 19:20:59 CET 2005

In GRASS:

GRASS 5.7.cvs:~ > echo "-592854.20115798|-1149140.62500086"| v.in.ascii out=tmp
Maximum input row length: 35
Maximum number of columns: 2
Minimum number of columns: 2
Building topology ...
1 primitives registered =20
Building areas: 100%
0 areas built =20
0 isles built
Attaching islands: Attaching centroids: 100%
Topology was built.
Number of nodes : 1
Number of primitives: 1
Number of points : 1
Number of lines : 0
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0
GRASS 5.7.cvs:~ > v.out.ascii tmp
Segmentation fault
GRASS 5.7.cvs:~ >

NVIZ is running well now.=20
I tryed the memtest86, it looked good.

The complete strace output from "v.out.ascii tmp" can you find on
www.fle.czu.cz/~jachym/tmp/strace.txt

My fried has debian sid apparently with out problem.

Jáchym

--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://www.fle.czu.cz/~jachym/gnupg_public_key/

Jachym Cepicky wrote:

GRASS 5.7.cvs:~ > echo "-592854.20115798|-1149140.62500086"| v.in.ascii out=tmp
GRASS 5.7.cvs:~ > v.out.ascii tmp
Segmentation fault
GRASS 5.7.cvs:~ >

The complete strace output from "v.out.ascii tmp" can you find on
www.fle.czu.cz/~jachym/tmp/strace.txt

Can you send a back trace from gdb?

Radim

Fixed. Update and recompile vector/v.out.ascii.

Radim

Jachym Cepicky wrote:

ahoj,

On Tue, Jan 11, 2005 at 09:02:53AM +0100, Radim Blazek wrote:

Jachym Cepicky wrote:

GRASS 5.7.cvs:~ > echo "-592854.20115798|-1149140.62500086"| v.in.ascii out=tmp
GRASS 5.7.cvs:~ > v.out.ascii tmp
Segmentation fault
GRASS 5.7.cvs:~ >

The complete strace output from "v.out.ascii tmp" can you find on
www.fle.czu.cz/~jachym/tmp/strace.txt

Can you send a back trace from gdb?

Radim

I hope, this is what you want, if not, describe please, how to get what you
want:

GRASS 5.7.cvs:~ > gdb --args v.out.ascii tmp
GNU gdb 6.1-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-linux"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) run
Starting program: /usr/local/grass-5.7.cvs/bin/v.out.ascii tmp
[Thread debugging using libthread_db enabled]
[New Thread 1089834368 (LWP 4888)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1089834368 (LWP 4888)]
0x4056114b in strlen () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0 0x4056114b in strlen () from /lib/tls/i686/cmov/libc.so.6
#1 0x4045c15d in G_store (s=0xffff <Address 0xffff out of bounds>)
    at store.c:20
#2 0x40039c79 in Vect__open_old (Map=0xbffff2f0, name=0x80609e8 "tmp", mapset=0xffff <Address 0xffff out of bounds>, update=0, head_only=0)
    at open.c:148
#3 0x4003a6e9 in Vect_open_old (Map=0xbffff2f0, name=0x80609e8 "tmp", mapset=0xffff <Address 0xffff out of bounds>) at open.c:375
#4 0x080497bb in main (argc=2, argv=0xbffff7d4) at out.c:67
(gdb)

Jáchym

Confirm, it run's all right now.

Thank you a lot .. a vubec fakt MOC dik, a preju hezkej den

Jachym

On Tue, Jan 11, 2005 at 09:28:49AM +0100, Radim Blazek wrote:

Fixed. Update and recompile vector/v.out.ascii.

Radim

Jachym Cepicky wrote:
>ahoj,
>
>On Tue, Jan 11, 2005 at 09:02:53AM +0100, Radim Blazek wrote:
>
>>Jachym Cepicky wrote:
>>
>>>GRASS 5.7.cvs:~ > echo "-592854.20115798|-1149140.62500086"| v.in.ascii
>>>out=tmp
>>>GRASS 5.7.cvs:~ > v.out.ascii tmp
>>>Segmentation fault
>>>GRASS 5.7.cvs:~ >
>>>
>>>The complete strace output from "v.out.ascii tmp" can you find on
>>>www.fle.czu.cz/~jachym/tmp/strace.txt
>>
>>Can you send a back trace from gdb?
>>
>>Radim
>
>
>I hope, this is what you want, if not, describe please, how to get what you
>want:
>
>GRASS 5.7.cvs:~ > gdb --args v.out.ascii tmp
>GNU gdb 6.1-debian
>Copyright 2004 Free Software Foundation, Inc.
>GDB is free software, covered by the GNU General Public License, and you
>are
>welcome to change it and/or distribute copies of it under certain
>conditions.
>Type "show copying" to see the conditions.
>There is absolutely no warranty for GDB. Type "show warranty" for details.
>This GDB was configured as "i386-linux"...Using host libthread_db library
>"/lib/tls/i686/cmov/libthread_db.so.1".
>
>(gdb) run
>Starting program: /usr/local/grass-5.7.cvs/bin/v.out.ascii tmp
>[Thread debugging using libthread_db enabled]
>[New Thread 1089834368 (LWP 4888)]
>
>Program received signal SIGSEGV, Segmentation fault.
>[Switching to Thread 1089834368 (LWP 4888)]
>0x4056114b in strlen () from /lib/tls/i686/cmov/libc.so.6
>(gdb) bt
>#0 0x4056114b in strlen () from /lib/tls/i686/cmov/libc.so.6
>#1 0x4045c15d in G_store (s=0xffff <Address 0xffff out of bounds>)
> at store.c:20
>#2 0x40039c79 in Vect__open_old (Map=0xbffff2f0, name=0x80609e8 "tmp",
> mapset=0xffff <Address 0xffff out of bounds>, update=0, head_only=0)
> at open.c:148
>#3 0x4003a6e9 in Vect_open_old (Map=0xbffff2f0, name=0x80609e8 "tmp",
> mapset=0xffff <Address 0xffff out of bounds>) at open.c:375
>#4 0x080497bb in main (argc=2, argv=0xbffff7d4) at out.c:67
>(gdb)
>
>Jáchym
>

--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://www.fle.czu.cz/~jachym/gnupg_public_key/

Thanks for the post.... this has been driving me nuts for the last 2 months on
PPC and i386 hardware.... since most of my vectors are in 5.7 format, using
v.out.ascii in 5.4 does not help...

here is a link the the output from strace on my machine (2x XEON)

http://basho.dept-lawr.ucdavis.edu/~dylan/v.out.ascii.strace.txt

FWIW, the errors in my strace seem different than in yours...

PS what version of GRASS is your friend (who is using SID) using?

Dylan

On Monday 10 January 2005 11:44 pm, Jachym Cepicky wrote:

Hi!

On Mon, Jan 10, 2005 at 05:38:08PM -0800, Dylan Beaudette wrote:
> Just posted a bug report for v.out.ascii:
>
> Same bug as #2851 posted 3 weeks ago, but on PPC.
>
> Example Code:
> v.out.ascii input=trails_57 output=trails.xy
> Segmentation fault
>
> Compile Time Arguments:
> ./configure --with-tcltk-includes=/usr/include/tcl8.3 --without-postgres
> --without-odbc --with-mysql --with-mysql-includes=/usr/include/mysql/
> --with-blas --with-lapack --with-freetype
> --with-freetype-includes=/usr/include/freetype2
>
> System is Debian/testing
>
> Any ideas to workarounds until this is working again? I have considered
> exporting lines as SHP file, and then dumping the xy coords with ogrinfo
> -al ... any ideas for a better solution?
>
> thanks in advance!

I thought, I'm the only one, who gets this bug! I have two installations of
Sarge + GRASS 5.7 and both of them are segfaulting by v.out.ascii.

Here some details:

I use debian gnu linux sarge. Before I started, I run rm -rf on
/usr/local/grass-5.7.cvs/ /usr/src/grass57 ~/.grassrc6 and I improved my
/etc/ld.so.conf like this:

/usr/X11R6/lib
/usr/local/lib
/usr/lib/atlas
/usr/local/grass-5.7.cvs/lib
/usr/lib

and run ldconfig

cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Celeron(R) CPU 2.00GHz
stepping : 9
cpu MHz : 2019.960
cache size : 128 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
= cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
bogomips : 4005.88

cat /proc/meminfo
MemTotal: 1557528 kB
MemFree: 1260100 kB
Buffers: 29436 kB
Cached: 169520 kB
SwapCached: 0 kB
Active: 176884 kB
Inactive: 89052 kB
HighTotal: 655296 kB
HighFree: 410112 kB
LowTotal: 902232 kB
LowFree: 849988 kB
SwapTotal: 1518100 kB
SwapFree: 1518100 kB
Dirty: 260 kB
Writeback: 0 kB
Mapped: 107152 kB
Slab: 14104 kB
Committed_AS: 157320 kB
PageTables: 980 kB
VmallocTotal: 114680 kB
VmallocUsed: 26028 kB
VmallocChunk: 84028 kB

I configured GRASS like this:

CFLAGS=3D"-g -Wall" ./configure --with-cxx
--with-postgres-includes=3D/us= r/include/postgresql/
--with-gdal=3D/usr/bin/gdal-config --with-proj --with= -motif --with-glw
--with-nls --with-freetype --with-freetype-includes=3D/us=
r/include/freetype2/ --with-tcltk-includes=3D/usr/include/tcl8.3/

And I got:

GRASS is now configured for: i686-pc-linux-gnu

Source directory: /usr/src/grass/grass51
Build directory: /usr/src/grass/grass51
Installation directory: /usr/local/grass-5.7.cvs
Startup script in directory: ${exec_prefix}/bin
C compiler: gcc -g -Wall=20
C++ compiler: c++ -g -O2
FORTRAN compiler: =20
Building shared libraries: yes

  NVIZ: yes

  X11 support: yes
  JPEG support: yes
  TIFF support: yes
  PNG support: yes
  Tcl/Tk support: yes
  PostgreSQL support: yes
  MySQL support: no
  OpenGL(R) support: yes
  ODBC support: no
  FFTW support: yes
  BLAS support: no
  LAPACK support: no
  Motif support: yes
  FreeType support: yes
  GLw support: yes
  NLS support: yes
  Readline support: no
  C++ support: yes
  openDWG support: no
  GDAL support: yes
  OGR support: yes

then I run make and error.log says:

GRASS GIS compilation log
-------------------------
Started compilation: P=E1 led 7 18:42:50 CET 2005
Errors in:
Finished compilation: P=E1 led 7 19:20:59 CET 2005

In GRASS:

GRASS 5.7.cvs:~ > echo "-592854.20115798|-1149140.62500086"| v.in.ascii
out=tmp Maximum input row length: 35
Maximum number of columns: 2
Minimum number of columns: 2
Building topology ...
1 primitives registered =20
Building areas: 100%
0 areas built =20
0 isles built
Attaching islands: Attaching centroids: 100%
Topology was built.
Number of nodes : 1
Number of primitives: 1
Number of points : 1
Number of lines : 0
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0
GRASS 5.7.cvs:~ > v.out.ascii tmp
Segmentation fault
GRASS 5.7.cvs:~ >

NVIZ is running well now.=20
I tryed the memtest86, it looked good.

The complete strace output from "v.out.ascii tmp" can you find on
www.fle.czu.cz/~jachym/tmp/strace.txt

My fried has debian sid apparently with out problem.

Jáchym