Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#32544 closed Cleanup/optimization (fixed)

Confirm support for GDAL 3.2 and GEOS 3.9.

Reported by: Sebastian Kapunkt Owned by: Claude Paroz
Component: GIS Version: 4.0
Severity: Normal Keywords:
Cc: Claude Paroz Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Using MultiPolygon on Apple MacBook pro with the M1 chip causes segmentation fault.

Here is what I did to produce the error:

python manage.py shell

>>>from django.contrib.gis.geos import MultiPolygon
>>>MultiPolygon()
[1] 34350 segmentation fault  python manage.py shell

I have these relevant settings in my settings.py:

GDAL_LIBRARY_PATH = os.getenv("GDAL_LIBRARY_PATH")
GEOS_LIBRARY_PATH = os.getenv("GEOS_LIBRARY_PATH")

.env

export GDAL_LIBRARY_PATH=/opt/homebrew/lib/libgdal.dylib
export GEOS_LIBRARY_PATH=/opt/homebrew/lib/libgeos_c.dylib

uname -a:

Darwin Sebastians-MacBook-Pro.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:06:51 PST 2021; root:xnu-7195.81.3~1/RELEASE_ARM64_T8101 arm64

geos-config --version 3.9.1

gdalinfo --version GDAL 3.2.1, released 2020/12/29

Change History (9)

comment:1 by Mariusz Felisiak, 3 years ago

Cc: Claude Paroz added
Summary: django.contrib.gis.geos import MultiPolygon segmentation fault (Apple M1)Add support for GDAL 3.2 and GEOS 3.9.
Triage Stage: UnreviewedAccepted
Type: BugNew feature
Version: 3.14.0

GDAL 3.2 and GEOS 3.9 are not supported by Django, see docs. I've change this ticket to a new feature.

comment:2 by Aapo Rista, 3 years ago

I guess this is not related to GEOS or GDAL versions, but M1 CPU architecture and the bug is in GEOS. See #32600.

I've in this Macbook Pro (13-inch, 2017, Intel Core i5) software listed below and I've no problems with multi geometries.

$ python manage.py shell
Python 3.9.2 (default, Feb 24 2021, 13:26:09) 
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.contrib.gis.geos import MultiPolygon
>>> MultiPolygon()
<MultiPolygon object at 0x1057ab490>

My new Macbook Air (M1, 2020) throws Segmentation fault 11 (as seen in #32600).

$ geos-config --version
3.9.1

$ gdalinfo --version
GDAL 3.2.2, released 2021/03/05

$ python -V
Python 3.9.2

$ uname -a
Darwin mymac.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64

comment:3 by Mariusz Felisiak, 3 years ago

Aapo, thanks for details. Even if the crash is not related to GEOS or GDAL versions, this ticket is still valid as we have some tests failures with these versions.

comment:4 by Claude Paroz, 3 years ago

Owner: changed from nobody to Claude Paroz
Status: newassigned

comment:5 by Claude Paroz, 3 years ago

Has patch: set

comment:6 by Mariusz Felisiak, 3 years ago

Patch needs improvement: set

comment:7 by Mariusz Felisiak, 3 years ago

Patch needs improvement: unset
Summary: Add support for GDAL 3.2 and GEOS 3.9.Confirm support for GDAL 3.2 and GEOS 3.9.
Triage Stage: AcceptedReady for checkin
Type: New featureCleanup/optimization

comment:8 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In e3cfba00:

Fixed #32544 -- Confirmed support for GDAL 3.2 and GEOS 3.9.

comment:9 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

In 5eb17d31:

[3.2.x] Fixed #32544 -- Confirmed support for GDAL 3.2 and GEOS 3.9.

Backport of e3cfba0029516aafe40f963378e234df2c0d33bb from main.

Note: See TracTickets for help on using tickets.
Back to Top