Micah Kornfield created ARROW-15511:
---------------------------------------
Summary: [Python] GIL not held for Ndarray1DIndexer on
Key: ARROW-15511
URL: https://issues.apache.org/jira/browse/ARROW-15511
Project: Apache Arrow
Issue Type: Bug
Components: Python
Affects Versions: 6.0.1
Reporter: Micah Kornfield
[In _ndarray_to_array the call to
NdarrayToArrow|https://github.com/apache/arrow/blob/658bec37aa5cbdd53b5e4cdc81b8ba3962e67f11/python/pyarrow/array.pxi#L82]
in explicitly excluded from the GIL. In some code-paths Ndarray1DIndexer is
instantiated which will try to do PyINC_REF and PyDdecREf on initialization and
destruction. These code paths do not appear to acquire the GIL.
I'm not sure what the best fix is:
# Acquire GIL as part of Ndarray1DIndexer construction.
# Eliminate the nogil block in _ndarray_to_array
# Eliminate the incref and decref calls in Ndarray1DIndexer
# Something else?
--
This message was sent by Atlassian Jira
(v8.20.1#820001)