Bug#868759: gdal-bin: Segmentation fault with SQLite driver.

2017-07-19 Thread Sebastiaan Couwenberg
On 07/19/2017 05:24 PM, Andy G Wood wrote:
> Could this be a bug in libdap25 which also migrated into testing in recent 
> days?  Although the test case gives a segfault, a valid sqlite database is 
> created.

The libdap issue seems unlikely since you experienced this issue before
libdap migrated to testing, and the issue did not affect by test in a
clean buster chroot (before libdap migrated).

Tomorrow gdal built with the new libdap will migrate to testing, that
could solve your issue, but also seems unlikely.

Kind Regards,

Bas

-- 
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1



Bug#868759: gdal-bin: Segmentation fault with SQLite driver.

2017-07-19 Thread Andy G Wood
Hi Bas,

> You may have some packages from unstable or not fully upgraded all
> packages in testing/buster.
> 
> Please make sure that all your installed packages are from testing/buster.

Both of
$ dpkg-query -l | grep -v '^ii'
$ apt-show-versions | grep 'unstable '
show nothing that would suggest I have anything other than all installed 
packages from testing/buster.

Apologies if I am telling you nothing that you didn't already know, but a 
Google search suggested that a SIGSEGV caused by malloc could be a heap 
corruption and recommended valgrind.  Nothing ventured, nothing gained, I 
tried valgrind:
-
$ valgrind --leak-check=yes ogr2ogr -t_srs EPSG:3857 -f "SQLite" -dsco 
SPATIALITE=YES test.sqlite test.xml
Memcheck, a memory error detector
Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
Command: ogr2ogr -t_srs EPSG:3857 -f SQLite -dsco SPATIALITE=YES test.sqlite 
test.xml

Invalid free() / delete / delete[] / realloc()
   at 0x4C2D2DB: operator delete(void*) (in /usr/lib/valgrind/
vgpreload_memcheck-amd64-linux.so)
   by 0x6B60C7E: __cxa_finalize (cxa_finalize.c:56)
   by 0x1873C6C2: ??? (in /usr/lib/x86_64-linux-gnu/libdap.so.25.0.0)
   by 0x400FE79: _dl_fini (dl-fini.c:235)
   by 0x6B6090F: __run_exit_handlers (exit.c:83)
   by 0x6B60969: exit (exit.c:105)
   by 0x6B4B2B7: (below main) (libc-start.c:325)
 Address 0x1d043680 is 0 bytes inside a block of size 25 free'd
   at 0x4C2D2DB: operator delete(void*) (in /usr/lib/valgrind/
vgpreload_memcheck-amd64-linux.so)
   by 0x6B60C7E: __cxa_finalize (cxa_finalize.c:56)
   by 0xF8F08F2: ??? (in /usr/lib/x86_64-linux-gnu/libdap.so.23.1.1)
   by 0x400FE79: _dl_fini (dl-fini.c:235)
   by 0x6B6090F: __run_exit_handlers (exit.c:83)
   by 0x6B60969: exit (exit.c:105)
   by 0x6B4B2B7: (below main) (libc-start.c:325)
-

Could this be a bug in libdap25 which also migrated into testing in recent 
days?  Although the test case gives a segfault, a valid sqlite database is 
created.

Andy.



Bug#868759: gdal-bin: Segmentation fault with SQLite driver.

2017-07-18 Thread Sebastiaan Couwenberg
Control: tags -1 unreproducible

Hi Andy,

Thanks for the stacktrace. Unfortunately I cannot reproduce the issue on
my unstable system, nor in an uptodate buster chroot:

 Starting program: /usr/bin/ogr2ogr -t_srs EPSG:3857 -f SQLite -dsco
SPATIALITE=YES test.sqlite test.xml
 [Thread debugging using libthread_db enabled]
 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
 [Inferior 1 (process 4272) exited normally]

You may have some packages from unstable or not fully upgraded all
packages in testing/buster.

Please make sure that all your installed packages are from testing/buster.

Kind Regards,

Bas

-- 
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1



Bug#868759: gdal-bin: Segmentation fault with SQLite driver.

2017-07-18 Thread Andy G Wood
Hi Bas,

> On 2017-07-18 12:13, Andy Wood wrote:
> > Segmentation fault which probably appeared after gdal 2.2.1+dfsg-1
> > went into buster:
> > 
> > $ ogr2ogr -t_srs EPSG:3857 -f "SQLite" -dsco SPATIALITE=YES \
> > 
> >   test.sqlite test.xml
> > 
> > Segmentation fault
> 
> Can you provide a gdb stracktrace with the gdal-bin-dbgsym &
> libgdal20-dbgsym packages installed?

I am no expert in this, so here we go ...
$ sudo dpkg -i libgdal20-dbgsym_2.2.1+dfsg-1_amd64.deb
$ sudo dpkg -i gdal-bin-dbgsym_2.2.1+dfsg-1_amd64.deb

$ gdb ogr2ogr
...
Reading symbols from ogr2ogr...Reading symbols from /usr/lib/debug/.build-id/
30/99d3a1c94ed49cc3714327d174f10b46e0ff56.debug...done.
 (gdb) set pagination 0
 (gdb) run -t_srs EPSG:3857 -f "SQLite" -dsco SPATIALITE=YES test.sqlite 
test.xml
Starting program: /usr/bin/ogr2ogr -t_srs EPSG:3857 -f "SQLite" -dsco 
SPATIALITE=YES test.sqlite test.xml
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
malloc_consolidate (av=av@entry=0x760e0b00 ) at malloc.c:4207
4207malloc.c: No such file or directory.
 (gdb) bt
#0  malloc_consolidate (av=av@entry=0x760e0b00 ) at malloc.c:
4207
#1  0x75dbeea8 in _int_free (av=0x760e0b00 , 
p=0x557937b0, have_lock=0) at malloc.c:4113
#2  0x75d7c93d in __run_exit_handlers (status=0, listp=0x760e05d8 
<__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, 
run_dtors=run_dtors@entry=true) at exit.c:92
#3  0x75d7c96a in __GI_exit (status=) at exit.c:105
#4  0x75d672b8 in __libc_start_main (main=0x58f0 , argc=9, argv=0x7fffded8, init=, fini=, rtld_fini=, stack_end=0x7fffdec8) at ../csu/libc-
start.c:325
#5  0x603a in _start ()

Hope that helps.
Andy.



Bug#868759: gdal-bin: Segmentation fault with SQLite driver.

2017-07-18 Thread Bas Couwenberg

Control: tags -1 moreinfo

Hi Andy,

On 2017-07-18 12:13, Andy Wood wrote:

Segmentation fault which probably appeared after gdal 2.2.1+dfsg-1
went into buster:

$ ogr2ogr -t_srs EPSG:3857 -f "SQLite" -dsco SPATIALITE=YES \
  test.sqlite test.xml
Segmentation fault


Can you provide a gdb stracktrace with the gdal-bin-dbgsym & 
libgdal20-dbgsym packages installed?


Kind Regards,

Bas



Bug#868759: gdal-bin: Segmentation fault with SQLite driver.

2017-07-18 Thread Andy Wood
Package: gdal-bin
Version: 2.2.1+dfsg-1
Severity: important

Dear Maintainer,

Segmentation fault which probably appeared after gdal 2.2.1+dfsg-1 went into 
buster:

$ ogr2ogr -t_srs EPSG:3857 -f "SQLite" -dsco SPATIALITE=YES \
  test.sqlite test.xml
Segmentation fault

$ cat test.xml

 
  test.csv
  test
  wkbPoint
  WGS84
  
 


$ cat test.csv
LAT,LON
50.683,3.883
52.3,0.267
42.75,-1.633
52.3,0.267

Andy.

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (900, 'testing'), (300, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages gdal-bin depends on:
ii  libc6   2.24-12
ii  libgcc1 1:7.1.0-9
ii  libgdal20 [gdal-abi-2-2-1]  2.2.1+dfsg-1
ii  libstdc++6  7.1.0-9

gdal-bin recommends no packages.

Versions of packages gdal-bin suggests:
pn  libgdal-grass  
ii  python-gdal2.2.1+dfsg-1

-- no debconf information