You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2026/05/06 15:26:09 UTC

[PR] GH-49942: [Python] Protect PyBuffer and NumPyBuffer destructors against interpreter finalization [arrow]

pitrou opened a new pull request, #49943:
URL: https://github.com/apache/arrow/pull/49943

   ### Rationale for this change
   
   In https://github.com/apache/arrow/pull/38637 we protected the `OwnedRef` and `OwnedRefNoGIL` destructors against being called when the Python interpreter is being finalized, but we didn't address other classes with custom destructors, such as `PyBuffer` and `NumPyBuffer`.
   
   ### What changes are included in this PR?
   
   Avoid executing Python C API code if the interpreter is finalized while a C++ destructor runs.
   
   ### Are these changes tested?
   
   Only manually, using the initial reproducer in https://github.com/apache/arrow/issues/45214.
   
   ### Are there any user-facing changes?
   
   No.
   


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


Re: [PR] GH-49942: [Python] Protect PyBuffer and NumPyBuffer destructors against interpreter finalization [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #49943:
URL: https://github.com/apache/arrow/pull/49943#issuecomment-4389802509

   @github-actions crossbow submit *wheel*mac* *wheel*win*


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


Re: [PR] GH-49942: [Python] Protect PyBuffer and NumPyBuffer destructors against interpreter finalization [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #49943:
URL: https://github.com/apache/arrow/pull/49943#issuecomment-4460442256

   After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit d4e0e26ac074cb0c59478ada8f83f2e509a0d3f2.
   
   There was 1 benchmark result with an error:
   
   - Commit Run on `amd64-m5-4xlarge-linux` at [2026-05-15 11:16:17Z](https://conbench.arrow-dev.org/compare/runs/07818e956851463f82a6cd7d0d2bf640...12421153ae1c4b9f8597e5ea2e166692/)
     - [`file-write` (Python) with compression=uncompressed, dataset=fanniemae_2016Q4, file_type=feather, input_type=dataframe](https://conbench.arrow-dev.org/benchmark-results/06a06f544d39767c800014feda3fcbd7)
   
   There were no benchmark performance regressions. 🎉
   
   The [full Conbench report](https://github.com/apache/arrow/runs/76194020281) has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them.


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


Re: [PR] GH-49942: [Python] Protect PyBuffer and NumPyBuffer destructors against interpreter finalization [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49943:
URL: https://github.com/apache/arrow/pull/49943#issuecomment-4389831798

   Revision: bbe7634c98cdd798824ede434aa92229d939f7eb
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-62ea8dd650](https://github.com/ursacomputing/crossbow/branches/all?query=actions-62ea8dd650)
   
   |Task|Status|
   |----|------|
   |wheel-macos-monterey-cp310-cp310-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-macos-monterey-cp310-cp310-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/25446142187/job/74650686761)|
   |wheel-macos-monterey-cp310-cp310-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-macos-monterey-cp310-cp310-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/25446132880/job/74650678765)|
   |wheel-macos-monterey-cp311-cp311-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-macos-monterey-cp311-cp311-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/25446134318/job/74650657161)|
   |wheel-macos-monterey-cp311-cp311-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-macos-monterey-cp311-cp311-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/25446133331/job/74650652653)|
   |wheel-macos-monterey-cp312-cp312-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-macos-monterey-cp312-cp312-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/25446132831/job/74650651225)|
   |wheel-macos-monterey-cp312-cp312-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-macos-monterey-cp312-cp312-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/25446136101/job/74650663253)|
   |wheel-macos-monterey-cp313-cp313-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-macos-monterey-cp313-cp313-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/25446133767/job/74650655338)|
   |wheel-macos-monterey-cp313-cp313-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-macos-monterey-cp313-cp313-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/25446134394/job/74650656874)|
   |wheel-macos-monterey-cp313-cp313t-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-macos-monterey-cp313-cp313t-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/25446134554/job/74650657460)|
   |wheel-macos-monterey-cp313-cp313t-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-macos-monterey-cp313-cp313t-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/25446134005/job/74650655837)|
   |wheel-macos-monterey-cp314-cp314-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-macos-monterey-cp314-cp314-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/25446135772/job/74650662716)|
   |wheel-macos-monterey-cp314-cp314-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-macos-monterey-cp314-cp314-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/25446133621/job/74650654540)|
   |wheel-macos-monterey-cp314-cp314t-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-macos-monterey-cp314-cp314t-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/25446134373/job/74650657178)|
   |wheel-macos-monterey-cp314-cp314t-arm64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-macos-monterey-cp314-cp314t-arm64)](https://github.com/ursacomputing/crossbow/actions/runs/25446132781/job/74650651295)|
   |wheel-windows-cp310-cp310-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-windows-cp310-cp310-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/25446133209/job/74650652242)|
   |wheel-windows-cp311-cp311-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-windows-cp311-cp311-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/25446133684/job/74650656027)|
   |wheel-windows-cp312-cp312-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-windows-cp312-cp312-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/25446133770/job/74650654509)|
   |wheel-windows-cp313-cp313-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-windows-cp313-cp313-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/25446134959/job/74650659088)|
   |wheel-windows-cp313-cp313t-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-windows-cp313-cp313t-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/25446132964/job/74650651414)|
   |wheel-windows-cp314-cp314-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-windows-cp314-cp314-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/25446135010/job/74650659133)|
   |wheel-windows-cp314-cp314t-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ea8dd650-github-wheel-windows-cp314-cp314t-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/25446133063/job/74650652040)|


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


Re: [PR] GH-49942: [Python] Protect PyBuffer and NumPyBuffer destructors against interpreter finalization [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #49943:
URL: https://github.com/apache/arrow/pull/49943#issuecomment-4395390186

   After merging your PR, Conbench analyzed the 0 benchmarking runs that have been run so far on merge-commit d4e0e26ac074cb0c59478ada8f83f2e509a0d3f2.
   
   None of the specified runs were found on the Conbench server.
   
   The [full Conbench report](https://github.com/apache/arrow/runs/74776144163) has more details.


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


Re: [PR] GH-49942: [Python] Protect PyBuffer and NumPyBuffer destructors against interpreter finalization [arrow]

Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd merged PR #49943:
URL: https://github.com/apache/arrow/pull/49943


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


Re: [PR] GH-49942: [Python] Protect PyBuffer and NumPyBuffer destructors against interpreter finalization [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49943:
URL: https://github.com/apache/arrow/pull/49943#issuecomment-4389685049

   Revision: bbe7634c98cdd798824ede434aa92229d939f7eb
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-62ce37605c](https://github.com/ursacomputing/crossbow/branches/all?query=actions-62ce37605c)
   
   |Task|Status|
   |----|------|
   |example-python-minimal-build-fedora-conda|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-example-python-minimal-build-fedora-conda)](https://github.com/ursacomputing/crossbow/actions/runs/25445180280/job/74647192121)|
   |example-python-minimal-build-ubuntu-venv|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-example-python-minimal-build-ubuntu-venv)](https://github.com/ursacomputing/crossbow/actions/runs/25445181918/job/74647201710)|
   |test-conda-python-3.10|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.10)](https://github.com/ursacomputing/crossbow/actions/runs/25445174735/job/74647175475)|
   |test-conda-python-3.10-hdfs-2.9.2|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.10-hdfs-2.9.2)](https://github.com/ursacomputing/crossbow/actions/runs/25445179506/job/74647191658)|
   |test-conda-python-3.10-hdfs-3.2.1|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.10-hdfs-3.2.1)](https://github.com/ursacomputing/crossbow/actions/runs/25445175984/job/74647179271)|
   |test-conda-python-3.10-pandas-1.3.4-numpy-1.21.2|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.10-pandas-1.3.4-numpy-1.21.2)](https://github.com/ursacomputing/crossbow/actions/runs/25445176863/job/74647179927)|
   |test-conda-python-3.11|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.11)](https://github.com/ursacomputing/crossbow/actions/runs/25445179133/job/74647191169)|
   |test-conda-python-3.11-dask-latest|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.11-dask-latest)](https://github.com/ursacomputing/crossbow/actions/runs/25445178063/job/74647183701)|
   |test-conda-python-3.11-dask-upstream_devel|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.11-dask-upstream_devel)](https://github.com/ursacomputing/crossbow/actions/runs/25445179713/job/74647193609)|
   |test-conda-python-3.11-hypothesis|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.11-hypothesis)](https://github.com/ursacomputing/crossbow/actions/runs/25445180856/job/74647198738)|
   |test-conda-python-3.11-pandas-latest-numpy-latest|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.11-pandas-latest-numpy-latest)](https://github.com/ursacomputing/crossbow/actions/runs/25445179217/job/74647193373)|
   |test-conda-python-3.11-spark-master|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.11-spark-master)](https://github.com/ursacomputing/crossbow/actions/runs/25445178482/job/74647187916)|
   |test-conda-python-3.12|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.12)](https://github.com/ursacomputing/crossbow/actions/runs/25445181006/job/74647194698)|
   |test-conda-python-3.12-cpython-debug|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.12-cpython-debug)](https://github.com/ursacomputing/crossbow/actions/runs/25445179115/job/74647191317)|
   |test-conda-python-3.12-pandas-latest-numpy-1.26|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.12-pandas-latest-numpy-1.26)](https://github.com/ursacomputing/crossbow/actions/runs/25445179951/job/74647195689)|
   |test-conda-python-3.12-pandas-latest-numpy-latest|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.12-pandas-latest-numpy-latest)](https://github.com/ursacomputing/crossbow/actions/runs/25445173817/job/74647171312)|
   |test-conda-python-3.13|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.13)](https://github.com/ursacomputing/crossbow/actions/runs/25445171525/job/74647166839)|
   |test-conda-python-3.13-pandas-nightly-numpy-nightly|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.13-pandas-nightly-numpy-nightly)](https://github.com/ursacomputing/crossbow/actions/runs/25445176706/job/74647182300)|
   |test-conda-python-3.13-pandas-upstream_devel-numpy-nightly|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.13-pandas-upstream_devel-numpy-nightly)](https://github.com/ursacomputing/crossbow/actions/runs/25445178959/job/74647189718)|
   |test-conda-python-3.14|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-3.14)](https://github.com/ursacomputing/crossbow/actions/runs/25445180375/job/74647192419)|
   |test-conda-python-emscripten|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-conda-python-emscripten)](https://github.com/ursacomputing/crossbow/actions/runs/25445172414/job/74647166954)|
   |test-debian-13-python-3-amd64|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-debian-13-python-3-amd64)](https://github.com/ursacomputing/crossbow/actions/runs/25445174905/job/74647176211)|
   |test-debian-13-python-3-i386|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-debian-13-python-3-i386)](https://github.com/ursacomputing/crossbow/actions/runs/25445172799/job/74647170383)|
   |test-fedora-42-python-3|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-fedora-42-python-3)](https://github.com/ursacomputing/crossbow/actions/runs/25445175274/job/74647176855)|
   |test-ubuntu-22.04-python-3|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-ubuntu-22.04-python-3)](https://github.com/ursacomputing/crossbow/actions/runs/25445181791/job/74647196759)|
   |test-ubuntu-22.04-python-313-freethreading|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-ubuntu-22.04-python-313-freethreading)](https://github.com/ursacomputing/crossbow/actions/runs/25445180616/job/74647198049)|
   |test-ubuntu-24.04-python-3|[![GitHub Actions](https://github.com/ursacomputing/crossbow/actions/workflows/crossbow.yml/badge.svg?branch=actions-62ce37605c-github-test-ubuntu-24.04-python-3)](https://github.com/ursacomputing/crossbow/actions/runs/25445179462/job/74647192039)|


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


Re: [PR] GH-49942: [Python] Protect PyBuffer and NumPyBuffer destructors against interpreter finalization [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #49943:
URL: https://github.com/apache/arrow/pull/49943#issuecomment-4389611135

   @github-actions crossbow submit -g python


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