[Django] #27399: Segfault when running GDALBandTests on OSX 10.11.6

10 views
Skip to first unread message

Django

unread,
Oct 28, 2016, 11:42:41 AM10/28/16
to django-...@googlegroups.com
#27399: Segfault when running GDALBandTests on OSX 10.11.6
--------------------------------------+--------------------
Reporter: Tatiana Vasilevskaya | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
When running `gis_tests.gdal_tests.test_raster.GDALBandTests` tests on OSX
10.11.6 django calls `capi.open_ds` inside `GDALRaster`. This results in a
Segmentation fault. Occurs on the master branch
(80e742d991b276023a3aa51a29ed757879051282).

{{{
/Users/vasilty/Documents/Projects/django/tests/runtests.py(483)<module>()
-> options.exclude_tags,
/Users/vasilty/Documents/Projects/django/tests/runtests.py(277)django_tests()
-> extra_tests=extra_tests,
/Users/vasilty/Documents/Projects/django/django/test/runner.py(596)run_tests()
-> result = self.run_suite(suite)
/Users/vasilty/Documents/Projects/django/django/test/runner.py(561)run_suite()
-> return runner.run(suite)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/unittest/runner.py(176)run()
-> test(result)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/unittest/suite.py(84)__call__()
-> return self.run(*args, **kwds)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/unittest/suite.py(122)run()
-> test(result)
/Users/vasilty/Documents/Projects/django/django/test/testcases.py(211)__call__()
-> super(SimpleTestCase, self).__call__(result)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/unittest/case.py(648)__call__()
-> return self.run(*args, **kwds)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/unittest/case.py(596)run()
-> self.setUp()
>
/Users/vasilty/Documents/Projects/django/tests/gis_tests/gdal_tests/test_raster.py(312)setUp()
-> self.rs_path = os.path.join(os.path.dirname(upath(__file__)),
'../data/rasters/raster.tif')
}}}

TIFFReadDirectory: Warning, Unknown field with tag 42113 (0xa481)
encountered.
Segmentation fault: 11

--
Ticket URL: <https://code.djangoproject.com/ticket/27399>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 28, 2016, 11:44:00 AM10/28/16
to django-...@googlegroups.com
#27399: Segfault when running GDALBandTests on OSX 10.11.6
--------------------------------------+------------------------------------

Reporter: Tatiana Vasilevskaya | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Markus Holtermann):

* needs_docs: => 0
* needs_better_patch: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:1>

Django

unread,
Oct 28, 2016, 12:59:41 PM10/28/16
to django-...@googlegroups.com
#27399: Segfault when running GDALBandTests on OSX 10.11.6
--------------------------------------+------------------------------------

Reporter: Tatiana Vasilevskaya | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham):

Do you have any details about why Django might be at fault? We don't ship
any C code, so segfaults are generally not caused by Django.

--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:2>

Django

unread,
Oct 29, 2016, 1:55:20 AM10/29/16
to django-...@googlegroups.com
#27399: Segfault when running GDALBandTests on OSX 10.11.6
--------------------------------------+------------------------------------

Reporter: Tatiana Vasilevskaya | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Markus Holtermann):

Even if we don't ship C code, either our documentation lacks some details
on supported GDAL / GIS versions (that's beyond my knowledge) or we should
check for that. Either way, I don't think Django's test should segfault
regardless.

--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:3>

Django

unread,
Oct 29, 2016, 6:51:33 AM10/29/16
to django-...@googlegroups.com
#27399: Segfault when running GDALBandTests on OSX 10.11.6
--------------------------------------+------------------------------------

Reporter: Tatiana Vasilevskaya | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham):

What are the relevant GIS library versions? Did you reproduce the issue,
Markus?

--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:4>

Django

unread,
Nov 5, 2016, 12:52:57 PM11/5/16
to django-...@googlegroups.com
#27399: Segfault when running GDALBandTests on OSX 10.11.6
--------------------------------------+------------------------------------

Reporter: Tatiana Vasilevskaya | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Saulius Žemaitaitis):

I can still reproduce it on master
(24c9cce1c9fb0dfe14e42de1ec2a2a209a64dd80).

OSX 10.11.6

Library versions (installed from Homebrew):
{{{
gdal 1.11.5_1
geos 3.5.0
libgeotiff 1.4.1_2
liblwgeom 2.1.5_3
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:5>

Django

unread,
Nov 6, 2016, 7:25:24 AM11/6/16
to django-...@googlegroups.com
#27399: Segfault when running GDALBandTests on OSX 10.11.6
--------------------------------------+------------------------------------

Reporter: Tatiana Vasilevskaya | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Saulius Žemaitaitis):

The problem seems to be due to the way Pillow and GDAL interact. Pillow
wheel ships its own version of libtiff while GDAL library uses the system
one. This apparently causes the segfault. I don't have the skills to
narrow it down further.

Workaround is to install Pillow from source on OSX:
{{{
pip install --no-binary Pillow -r tests/requirements/py3.txt
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:6>

Django

unread,
Jan 25, 2018, 3:36:18 AM1/25/18
to django-...@googlegroups.com
#27399: Segfault when running GDALBandTests on OSX 10.11.6
--------------------------------------+------------------------------------

Reporter: Tatiana Vasilevskaya | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by winsent):

Look at this example. Install only pillow and Django without GDAL python
binding. This code raise exeption after pillow installed.

{{{
GEOTIF_PATH=/ta/dem.tif

virtualenv --python=python3 test
cd test
source bin/activate
pip install django==1.11.9 pillow
python -c "from django.contrib.gis.gdal import GDALRaster;
print(GDALRaster('$GEOTIF_PATH'))"
django-admin startproject testtest
cd testtest
django-admin startapp testtesttest
echo "\n\nINSTALLED_APPS += ['testtesttest']" >> testtest/settings.py
mkdir -p testtesttest/management/commands
touch testtesttest/management/__init__.py
testtesttest/management/commands/__init__.py
echo "from django.core.management.base import BaseCommand
class Command(BaseCommand):
def handle(self, *args, **options):
from django.contrib.gis.gdal import GDALRaster
print(GDALRaster('$GEOTIF_PATH'))
" > testtesttest/management/commands/gdal_test.py
python manage.py gdal_test
pip uninstall -y pillow
python manage.py gdal_test
}}}

Result:
{{{


TIFFReadDirectory: Warning, Unknown field with tag 42113 (0xa481)
encountered.

[1] 53998 bus error python manage.py gdal_test
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:7>

Django

unread,
Jun 18, 2020, 5:25:40 AM6/18/20
to django-...@googlegroups.com
#27399: Segfault when running GDALBandTests on OSX 10.11.6
-------------------------------------+-------------------------------------
Reporter: Tatiana | Owner: nobody
Vasilevskaya |
Type: Bug | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: new => closed
* resolution: => invalid
* stage: Accepted => Unreviewed


Comment:

Django 1.11 and GDAL 1.11 are no longer supported. Closing unless someone
can provide a clear path to reproduce this issue on supported versions.

--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:8>

Django

unread,
Jun 18, 2020, 5:26:52 AM6/18/20
to django-...@googlegroups.com
#27399: Segfault when running GDALBandTests on OSX 10.11.6
-------------------------------------+-------------------------------------
Reporter: Tatiana | Owner: nobody
Vasilevskaya |
Type: Bug | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* resolution: invalid => needsinfo


--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:9>

Reply all
Reply to author
Forward
0 new messages