segfault on gdal.OpenEx() call

Bug #1640360 reported by Jivan Amara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gdal
Unknown
Unknown
gdal (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

With both libgdal20 & python-gdal at version 2.1.0 the following snippet will recreate:

import gdal
filename = 'http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/FeatureServer/0/query?where=objectid3D+objectid&outfields=*&f=json'
data = gdal.OpenEx(filename)

Defining the environment variable GDAL_SKIP=DODS eliminates the segfault.

Speaking with EvenR on #osgeo; he recommends that the DODS driver be disabled in the builds.

Details:
Ubuntu 16.04.1 LTS
libgdal20 2.1.0+dfsg-1~xenial0
python-gdal 2.1.0+dfsg-1~xenial0

Expected:
ERROR 4: Failed to read GeoJSON data
Actual:
segfault

Revision history for this message
Bas Couwenberg (sebastic) wrote :

I guess you're using the gdal packages from the UbuntuGIS PPA, since Ubuntu itself doesn't have 2.1.0.

Can you provide a link to the IRC discussion or otherwise provide more motivation why the DODS driver should be disabled now. It has been enabled for a very long time, so I'm surprised Even now recommends disabling it.

Revision history for this message
Johan Van de Wauw (johanvdw) wrote : Re: [Bug 1640360] Re: segfault on gdal.OpenEx() call

See:
http://irclogs.geoapt.com/osgeo/%23osgeo.2016-11-09.log

Op 9 nov. 2016 07:30 schreef "Bas Couwenberg" <email address hidden>:

> I guess you're using the gdal packages from the UbuntuGIS PPA, since
> Ubuntu itself doesn't have 2.1.0.
>
> Can you provide a link to the IRC discussion or otherwise provide more
> motivation why the DODS driver should be disabled now. It has been
> enabled for a very long time, so I'm surprised Even now recommends
> disabling it.
>
> --
> You received this bug notification because you are a member of
> UbuntuGIS, which is subscribed to gdal in Ubuntu.
> https://bugs.launchpad.net/bugs/1640360
>
> Title:
> segfault on gdal.OpenEx() call
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gdal/+bug/1640360/+subscriptions
>

Revision history for this message
Bas Couwenberg (sebastic) wrote :

00:24:09 transit: Hi, can I get a mantra so I can create an OSGeo account to register a bug report?
00:26:53 EvenR: transit: can you very shortly tell aobut the bug ?
00:28:45 transit: SegFault: https://dpaste.de/ppUM both libgdal20 & python-gdal at v2.1.0 on Ubuntu.
00:28:46 sigq: Title: dpaste.de: Snippet #389262 (at dpaste.de)
00:30:02 EvenR: transit: mantra givein in private chat. Hum I suspect this is an issue with the DODS driver and libdap that tend to segfault on non expected URLs
00:30:13 EvenR: you can try to define GDAL_SKIP=DODS as environment variable
00:32:02 transit: EvenR: That eliminates the segfault.
00:32:14 transit: EvenR: Still worth reporting?
00:33:54 EvenR: transit: perhaps report to the packagers. I'd recommend them to disable the DODS driver in their builds

That's not very informative.

I've inquired about the state of the DODS driver, before I can decided to disable it or not:

 https://lists.osgeo.org/pipermail/gdal-dev/2016-November/045475.html

Revision history for this message
Bas Couwenberg (sebastic) wrote :

Even has committed a fix for the segfault, and I've included it as a patch in the Debian package, see the discussion on the GDAL mailinglist:

 https://lists.osgeo.org/pipermail/gdal-dev/2016-November/045477.html

New revisions of the gdal package for trusty & xenial will be available in the ubuntugis-unstable PPA shortly.

Changed in gdal (Ubuntu):
status: New → Fix Committed
Revision history for this message
Bas Couwenberg (sebastic) wrote :

Fixed packages are available in Debian unstable and the various UbuntuGIS PPAs.

Changed in gdal (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Jivan Amara (development-1) wrote :

New package eliminates segfault, thanks :-)

One change I see with the new package is the KML driver reporting its short name as "LIBKML" instead of "KML". Is this a problem?

Revision history for this message
Bas Couwenberg (sebastic) wrote :

That wasn't changed between 2.1.0+dfsg-1~xenial0 & 2.1.0+dfsg-1~xenial1.

Revision history for this message
Even Rouault (even-rouault) wrote :

There's no change regarding KML. Both drivers KML and LIBKML exist. There LIBKML is normally the first one to be tried when iterating over drivers, hence the LIBKML name being reported

Revision history for this message
Jivan Amara (development-1) wrote :

Ok, thanks for your time guys.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.