You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/03/21 12:48:09 UTC

[GitHub] [arrow-rs] tustvold opened a new issue, #3683: PyArrowConvert Leaks Memory

tustvold opened a new issue, #3683:
URL: https://github.com/apache/arrow-rs/issues/3683

   **Describe the bug**
   <!--
   A clear and concise description of what the bug is.
   -->
   
   PyArrowConvert calls `ArrowArray::into_raw` to convert the contents of `ArrowArray::empty` into raw pointers, it then passes these to python to populate, before passing them to `ArrowArray::try_from_raw`. This copies the memory contents and does not take ownership of the passed pointers, this appears to have been a change made in (#1449) by @viirya. The result is that the allocation of `Arc<FFI_ArrowSchema>` and `Arc<FFI_ArrowArray>` is never freed.
   
   Some of the memory leaks appear to have been fixed in https://github.com/apache/arrow-rs/pull/1878 but not the ones present in the python interface.
   
   I happen to think the `into_raw` method is extremely hard to use correctly, and I would propose removing it in favor of an interface that does not yield ownership of the pointers.
   
   **To Reproduce**
   <!--
   Steps to reproduce the behavior:
   -->
   
   
   
   **Expected behavior**
   <!--
   A clear and concise description of what you expected to happen.
   -->
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] tustvold commented on issue #3683: PyArrowConvert Leaks Memory

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #3683:
URL: https://github.com/apache/arrow-rs/issues/3683#issuecomment-1426077044

   `label_issue.py` automatically added labels {'arrow'} from #3685


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] tustvold closed issue #3683: PyArrowConvert Leaks Memory

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #3683: PyArrowConvert Leaks Memory
URL: https://github.com/apache/arrow-rs/issues/3683


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] tustvold closed issue #3683: PyArrowConvert Leaks Memory

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #3683: PyArrowConvert Leaks Memory
URL: https://github.com/apache/arrow-rs/issues/3683


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org