You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/05/05 23:58:53 UTC
[GitHub] [arrow] wesm opened a new pull request #7112: ARROW-8684: [Python] Do not call tobytes inside atexit extension type teardown function
wesm opened a new pull request #7112:
URL: https://github.com/apache/arrow/pull/7112
It seems that Cython calling out to some pure Python code (here `pyarrow.compat.tobytes`) inside the atexit handler hits an esoteric bug on Python >= 3.7.5 on macOS. These code changes fix the problem for me. I'll try to create a minimal reproducer for the benefit of the Cython issue tracker since this seems to be a Cython bug
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] wesm commented on pull request #7112: ARROW-8684: [Python] Do not call tobytes inside atexit extension type teardown function
Posted by GitBox <gi...@apache.org>.
wesm commented on pull request #7112:
URL: https://github.com/apache/arrow/pull/7112#issuecomment-624681850
@pitrou since this is reproducible on macOS, if it were possible to produce a debug build of CPython and build pyarrow against it (I tried, but since wheels can't be installed a bunch of things would need to be built from source) then we might be able to determine how exactly this bug is triggered. I'm concerned that there might be some "deterministic non-determinism" going on here and this bug could arise again in the future
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] pitrou commented on a change in pull request #7112: ARROW-8684: [Python] Do not call tobytes inside atexit extension type teardown function
Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #7112:
URL: https://github.com/apache/arrow/pull/7112#discussion_r420686544
##########
File path: python/pyarrow/types.pxi
##########
@@ -817,6 +817,12 @@ def register_extension_type(ext_type):
_python_extension_types_registry.append(_type)
+cdef _unregister_extension_type(bytes type_name):
+ # ARROW-8684: Due to a Cython (?) bug we cannot call "compat.tobytes"
Review comment:
Calling `compat.tobytes` gives the same error???
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] github-actions[bot] commented on pull request #7112: ARROW-8684: [Python] Do not call tobytes inside atexit extension type teardown function
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7112:
URL: https://github.com/apache/arrow/pull/7112#issuecomment-624370335
https://issues.apache.org/jira/browse/ARROW-8684
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] wesm commented on pull request #7112: ARROW-8684: [Python] Do not call tobytes inside atexit extension type teardown function
Posted by GitBox <gi...@apache.org>.
wesm commented on pull request #7112:
URL: https://github.com/apache/arrow/pull/7112#issuecomment-624374454
I spent maybe 20 minutes fruitlessly trying to create a minimal reproducer of the original issue. I don't like fixing a bug without understanding it, but if someone else is able to figure out the problem that would be great
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] wesm commented on a change in pull request #7112: ARROW-8684: [Python] Do not call tobytes inside atexit extension type teardown function
Posted by GitBox <gi...@apache.org>.
wesm commented on a change in pull request #7112:
URL: https://github.com/apache/arrow/pull/7112#discussion_r420738609
##########
File path: python/pyarrow/types.pxi
##########
@@ -817,6 +817,12 @@ def register_extension_type(ext_type):
_python_extension_types_registry.append(_type)
+cdef _unregister_extension_type(bytes type_name):
+ # ARROW-8684: Due to a Cython (?) bug we cannot call "compat.tobytes"
Review comment:
No, for some reason calling tobytes from within the atexit handler triggers the bug
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org