[Django] #25961: remove handling of thread-non-safe GEOS functions

10 views
Skip to first unread message

Django

unread,
Dec 22, 2015, 1:33:00 AM12/22/15
to django-...@googlegroups.com
#25961: remove handling of thread-non-safe GEOS functions
--------------------------------------+--------------------
Reporter: sir-sigurd | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
All supported GEOS versions provide thread-safe API that means that
handling of GEOS functions could be simplified.

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

Django

unread,
Dec 22, 2015, 1:35:21 AM12/22/15
to django-...@googlegroups.com
#25961: remove handling of thread-non-safe GEOS functions
-------------------------------------+-------------------------------------
Reporter: sir-sigurd | Owner: sir-
Type: | sigurd
Cleanup/optimization | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* status: new => assigned
* needs_better_patch: => 0
* needs_tests: => 0
* owner: nobody => sir-sigurd
* needs_docs: => 0
* has_patch: 0 => 1


Comment:

PR -- https://github.com/django/django/pull/5849

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

Django

unread,
Dec 22, 2015, 9:49:01 AM12/22/15
to django-...@googlegroups.com
#25961: remove handling of thread-non-safe GEOS functions
-------------------------------------+-------------------------------------
Reporter: sir-sigurd | Owner: sir-
Type: | sigurd
Cleanup/optimization | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

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

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

* stage: Unreviewed => Accepted


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

Django

unread,
Dec 22, 2015, 2:01:33 PM12/22/15
to django-...@googlegroups.com
#25961: remove handling of thread-non-safe GEOS functions
-------------------------------------+-------------------------------------
Reporter: sir-sigurd | Owner: sir-
Type: | sigurd
Cleanup/optimization | Status: assigned
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by claudep):

Feel free to go ahead, this is going above my head :-)

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

Django

unread,
Dec 22, 2015, 2:38:04 PM12/22/15
to django-...@googlegroups.com
#25961: remove handling of thread-non-safe GEOS functions
-------------------------------------+-------------------------------------
Reporter: sir-sigurd | Owner: sir-
Type: | sigurd
Cleanup/optimization | Status: assigned
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by sir-sigurd):

Replying to [comment:3 claudep]:


> Feel free to go ahead, this is going above my head :-)

Actually changes in my PR are quite trivial (maybe I did too much in a
single commit):
* `GEOSFunc` from django/contrib/gis/geos/prototypes/threadsafe.py is
simplified because we know that GEOS always have thread-safe API
* `GEOSFunc` is merged with `GEOSFuncFactory` from
django/contrib/gis/geos/libgeos.py
* the rest stuff from django/contrib/gis/geos/prototypes/threadsafe.py is
moved in django/contrib/gis/geos/libgeos.py

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

Django

unread,
Dec 22, 2015, 7:30:28 PM12/22/15
to django-...@googlegroups.com
#25961: remove handling of thread-non-safe GEOS functions
-------------------------------------+-------------------------------------
Reporter: sir-sigurd | Owner: sir-
Type: | sigurd
Cleanup/optimization | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

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

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

* stage: Accepted => Ready for checkin


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

Django

unread,
Dec 23, 2015, 8:03:43 AM12/23/15
to django-...@googlegroups.com
#25961: remove handling of thread-non-safe GEOS functions
-------------------------------------+-------------------------------------
Reporter: sir-sigurd | Owner: sir-
Type: | sigurd
Cleanup/optimization | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"312fc1af7b8a028611b45ee272652d59ea7bd85a" 312fc1af]:
{{{
#!CommitTicketReference repository=""
revision="312fc1af7b8a028611b45ee272652d59ea7bd85a"
Fixed #25961 -- Removed handling of thread-non-safe GEOS functions.
}}}

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

Django

unread,
Jan 5, 2016, 12:47:36 PM1/5/16
to django-...@googlegroups.com
#25961: remove handling of thread-non-safe GEOS functions
-------------------------------------+-------------------------------------
Reporter: sir-sigurd | Owner: sir-
Type: | sigurd
Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Release blocker | 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 timgraham):

* status: closed => new
* has_patch: 1 => 0
* resolution: fixed =>
* severity: Normal => Release blocker
* stage: Ready for checkin => Accepted


Comment:

We've seen occasional segmentation faults in the GIS tests on Jenkins
after this commit. apollo13 and knbk have been investigating (IRC
discussion and on [https://github.com/django/django/pull/5578 a pull
request] which seems to reproduce the segfault more regularly than on
master.

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

Django

unread,
Jan 6, 2016, 6:15:50 AM1/6/16
to django-...@googlegroups.com
#25961: remove handling of thread-non-safe GEOS functions
-------------------------------------+-------------------------------------
Reporter: sir-sigurd | Owner: sir-
Type: | sigurd
Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Release blocker | 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 sir-sigurd):

As this change is cleanup only I think it should be reverted until I or
someone else will have a good understanding why it's broken and how to fix
it.

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

Django

unread,
Jan 7, 2016, 6:49:57 PM1/7/16
to django-...@googlegroups.com
#25961: remove handling of thread-non-safe GEOS functions
-------------------------------------+-------------------------------------
Reporter: sir-sigurd | Owner: sir-
Type: | sigurd
Cleanup/optimization | 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 timgraham):

* severity: Release blocker => Normal


Comment:

The error seems to come from `GEOSContextHandle.__del__()`. Will revert
for now.

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

Django

unread,
Jan 7, 2016, 6:57:51 PM1/7/16
to django-...@googlegroups.com
#25961: remove handling of thread-non-safe GEOS functions
-------------------------------------+-------------------------------------
Reporter: sir-sigurd | Owner: sir-
Type: | sigurd
Cleanup/optimization | 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 timgraham):

In 59ef6559a31c175c1f52668ef0ffe9b8d87aa5a5:

Reverted #25961 -- Removed handling of thread-non-safe GEOS functions.

This reverts commit [312fc1a] as it seems
to cause segmentation faults as described in the ticket.

--
Ticket URL: <https://code.djangoproject.com/ticket/25961#comment:10>

Django

unread,
Sep 9, 2017, 11:02:13 AM9/9/17
to django-...@googlegroups.com
#25961: remove handling of thread-non-safe GEOS functions
-------------------------------------+-------------------------------------
Reporter: Sergey Fedoseev | Owner: Sergey
Type: | Fedoseev
Cleanup/optimization | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

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 Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"8b5a29800ce0bc7272917de99b46f6f6dcdb7d74" 8b5a2980]:
{{{
#!CommitTicketReference repository=""
revision="8b5a29800ce0bc7272917de99b46f6f6dcdb7d74"
Fixed #25961 -- Removed handling of non-thread safe GEOS functions.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25961#comment:11>

Reply all
Reply to author
Forward
0 new messages