Repository navigation
[Core] Reanchor stack protection boundary to current stack before py calls - #67132
Merged
Merged
Conversation
Signed-off-by: davik <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request splits the GIL acquisition block in task_execution_handler within python/ray/_raylet.pyx into two separate blocks. The first block (with gil:) ensures that CPython's stack protection is re-anchored to the current fiber stack before any Python calls are made, preventing potential stack depth check failures in Python 3.14+. The subsequent initialization steps are then executed in a separate with gil, disable_client_hook(): block. There are no review comments, and I have no feedback to provide.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 78ceb1c. Configure here.
Signed-off-by: davik <[email protected]>
MengjinYan
approved these changes
Oct 20, 2026
This was referenced Oct 23, 2026
kaka11chen
added a commit
to AstroVela/vane
that referenced
this pull request
Oct 23, 2026
#1058) ## Summary Fresh dependency resolution breaks existing behavior with Pandas 3.1.0 and Anthropic 2.1.0. Restore compatibility and make the native UDF rejection test observe errors reliably. - Replace Pandas' deprecated inplace column drop with column deletion before reinserting the converted column at its original position. Update three test fixtures to assign the result of `rename`. Timezone/date conversions retain their column order and types. - Pass the unused Anthropic credential as `None`, then restore the captured application credentials and clear worker-provided custom headers. Real loopback requests cover both credential kinds under conflicting worker settings; Ray assertions accept either supported SDK header format while requiring only the application credential. - Give the serving acceptance test's recovery request its normal 30-second fixture budget. The gated request still expires after one second, and the test still requires exactly one timeout, two worker initializations and no active or pending-cleanup requests. Production deadlines are unchanged. - Keep the image-to-tensor allocation regression focused on conversion and Arrow export: inspect the single exported chunk directly instead of calling `combine_chunks()` inside the address-space limit. A single-chunk concatenation still copies the complete 31.6 MiB RGBA buffer. The original 512 MiB/1 GiB limits, pixel checks and empty-output checks remain, with explicit one-row/one-chunk assertions added. - Propagate native UDF executor errors after its completion loop. `ExecutionIsFinished()` also becomes true when a worker records an error, so the old in-loop check could miss it and make the macOS rejection test fail. Exercise the expected rejection with one and four threads. ## Related issue Closes #1057. Also fixes shared Pandas conversion failures, the independent serving recovery-test timeout and native UDF error-check timing observed in recent PR pipelines. ## Documentation impact - [x] No user-facing documentation update is required. - [ ] Documentation is updated in this PR or in a linked website PR. - [ ] <!-- docs-follow-up --> A follow-up issue is required in `AstroVela/vane-website`. The changes restore existing behavior and strengthen test fixtures; no public API is added. ## Validation Native UDF test follow-up: - Compile the exact changed C++ test file as a focused Catch2 executable linked against the existing Linux C++11 Release engine. Both cases pass, with **five assertions** covering one and four threads. - **200 independent processes pass normally**, and **200 pass with a temporary 50 ms delay after executor initialization**. The delay allows the background error to arrive before the wait loop; the old helper fails **50/50 processes under that diagnostic delay**. Its unmodified timing passed 50 local runs, confirming why a passing retry alone did not demonstrate a fix. The delay/probe is temporary and is not included in the committed test. - Root and DuckDB formatting, changed-file pre-commit and source copyleft checks pass. Incremental noneditable Release reinstall succeeds (Vane 0.3.0.dev72, Python 3.12.3, Ray 2.59.0). Installed verifier and package metadata checks: **35 passed, 1 skipped** (optional ADBC dependency). The focused C++ cases and 200 ordinary processes also pass against the newly built engine. - The fresh full base release gate on Python 3.12.3 / Ray 2.59.0 completes in three separate pytest processes: **non-Ray 4,342 passed / 24 skipped / 86 deselected; shared-Ray 67 passed / 8 skipped / 3,188 deselected; owner-Ray 2 passed / 3,261 deselected**. Total: **4,411 passed, 32 skipped**. Skips require optional media, HTTP, OCR, vector-store or ADBC dependencies. - The rebuilt Release wheel passes `scripts/check_release_artifacts.py`. - The [macOS arm64 native CI job](https://github.com/AstroVela/vane/actions/runs/39940433305/job/120370908077) **passes: 4,833 test cases, 1,681,294 assertions; 230 conditional skips**. The previously failing pull-based UDF rejection case passes. The remaining jobs in the full CI run are still running. Earlier runtime compatibility validation on Linux x86-64, Python 3.12.3, freshly built noneditable Release wheel; Pandas 3.1.0, PyArrow 26.0.0, NumPy 2.5.4 and Ray 2.59.0: - All **23 previously failing Pandas cases pass**. Broader dataframe/Arrow/relation/type coverage: **773 passed, 4 skipped, 1 xfailed, 1 xpassed**. - Anthropic client/content tests: **97 passed** with SDK **2.1.0**, and **97 passed** with the declared floor **0.117.0**. - Local serving acceptance module: **14 passed**. The recovery regression also passes in **three independent pytest processes**. - Image-to-tensor regression (`911596d0db4385606c7c2a54fd3d70cd3e067b63`): `scripts/run_installed_pytest.sh tests/fast/test_image_to_tensor.py -m 'not real_ray' -q -rs --timeout=120`: **100 passed, 1 skipped** (optional native_media artifact not configured), including all three bounded-allocation cases. This used the exact Python 3.12 wheel from failed CI run `39890547650`, noneditably installed with NumPy 2.5.4 and PyArrow 26.0.0. Only this related module ran for the follow-up; no C++ rebuild. The original three cases also passed locally, so the CI allocation failure was not reproduced locally; a separate buffer-address check confirmed that single-chunk concatenation makes the unnecessary copy. - Changed-file formatting and pre-commit checks pass. Source copyleft checks pass. CI resolves Ray from the package's `ray>=2.58.0,<3` requirement. Python 3.14's intermittent async-actor stack-boundary defect remains tracked by [Ray #66399](ray-project/ray#66399); its [upstream fix](ray-project/ray#67132) has not reached a stable release. The native C++ helper fix addresses the independent macOS failure. ## Checklist - [x] The change is focused and includes regression coverage. - [x] Public behavior and compatibility impact are documented above. - [x] No dependencies, copied code, model assets, or datasets are added. - [x] No credentials, private endpoints, personal paths, generated data, model weights, or build artifacts are included. - [x] Application/worker credential and header isolation remains enforced. - [x] Native changes were rebuilt; affected installed-package tests and static checks passed.
kaka11chen
added a commit
to kaka11chen/astrovela_vane
that referenced
this pull request
Oct 23, 2026
AstroVela#1058) ## Summary Fresh dependency resolution breaks existing behavior with Pandas 3.1.0 and Anthropic 2.1.0. Restore compatibility and make the native UDF rejection test observe errors reliably. - Replace Pandas' deprecated inplace column drop with column deletion before reinserting the converted column at its original position. Update three test fixtures to assign the result of `rename`. Timezone/date conversions retain their column order and types. - Pass the unused Anthropic credential as `None`, then restore the captured application credentials and clear worker-provided custom headers. Real loopback requests cover both credential kinds under conflicting worker settings; Ray assertions accept either supported SDK header format while requiring only the application credential. - Give the serving acceptance test's recovery request its normal 30-second fixture budget. The gated request still expires after one second, and the test still requires exactly one timeout, two worker initializations and no active or pending-cleanup requests. Production deadlines are unchanged. - Keep the image-to-tensor allocation regression focused on conversion and Arrow export: inspect the single exported chunk directly instead of calling `combine_chunks()` inside the address-space limit. A single-chunk concatenation still copies the complete 31.6 MiB RGBA buffer. The original 512 MiB/1 GiB limits, pixel checks and empty-output checks remain, with explicit one-row/one-chunk assertions added. - Propagate native UDF executor errors after its completion loop. `ExecutionIsFinished()` also becomes true when a worker records an error, so the old in-loop check could miss it and make the macOS rejection test fail. Exercise the expected rejection with one and four threads. ## Related issue Closes AstroVela#1057. Also fixes shared Pandas conversion failures, the independent serving recovery-test timeout and native UDF error-check timing observed in recent PR pipelines. ## Documentation impact - [x] No user-facing documentation update is required. - [ ] Documentation is updated in this PR or in a linked website PR. - [ ] <!-- docs-follow-up --> A follow-up issue is required in `AstroVela/vane-website`. The changes restore existing behavior and strengthen test fixtures; no public API is added. ## Validation Native UDF test follow-up: - Compile the exact changed C++ test file as a focused Catch2 executable linked against the existing Linux C++11 Release engine. Both cases pass, with **five assertions** covering one and four threads. - **200 independent processes pass normally**, and **200 pass with a temporary 50 ms delay after executor initialization**. The delay allows the background error to arrive before the wait loop; the old helper fails **50/50 processes under that diagnostic delay**. Its unmodified timing passed 50 local runs, confirming why a passing retry alone did not demonstrate a fix. The delay/probe is temporary and is not included in the committed test. - Root and DuckDB formatting, changed-file pre-commit and source copyleft checks pass. Incremental noneditable Release reinstall succeeds (Vane 0.3.0.dev72, Python 3.12.3, Ray 2.59.0). Installed verifier and package metadata checks: **35 passed, 1 skipped** (optional ADBC dependency). The focused C++ cases and 200 ordinary processes also pass against the newly built engine. - The fresh full base release gate on Python 3.12.3 / Ray 2.59.0 completes in three separate pytest processes: **non-Ray 4,342 passed / 24 skipped / 86 deselected; shared-Ray 67 passed / 8 skipped / 3,188 deselected; owner-Ray 2 passed / 3,261 deselected**. Total: **4,411 passed, 32 skipped**. Skips require optional media, HTTP, OCR, vector-store or ADBC dependencies. - The rebuilt Release wheel passes `scripts/check_release_artifacts.py`. - The [macOS arm64 native CI job](https://github.com/AstroVela/vane/actions/runs/39940433305/job/120370908077) **passes: 4,833 test cases, 1,681,294 assertions; 230 conditional skips**. The previously failing pull-based UDF rejection case passes. The remaining jobs in the full CI run are still running. Earlier runtime compatibility validation on Linux x86-64, Python 3.12.3, freshly built noneditable Release wheel; Pandas 3.1.0, PyArrow 26.0.0, NumPy 2.5.4 and Ray 2.59.0: - All **23 previously failing Pandas cases pass**. Broader dataframe/Arrow/relation/type coverage: **773 passed, 4 skipped, 1 xfailed, 1 xpassed**. - Anthropic client/content tests: **97 passed** with SDK **2.1.0**, and **97 passed** with the declared floor **0.117.0**. - Local serving acceptance module: **14 passed**. The recovery regression also passes in **three independent pytest processes**. - Image-to-tensor regression (`911596d0db4385606c7c2a54fd3d70cd3e067b63`): `scripts/run_installed_pytest.sh tests/fast/test_image_to_tensor.py -m 'not real_ray' -q -rs --timeout=120`: **100 passed, 1 skipped** (optional native_media artifact not configured), including all three bounded-allocation cases. This used the exact Python 3.12 wheel from failed CI run `39890547650`, noneditably installed with NumPy 2.5.4 and PyArrow 26.0.0. Only this related module ran for the follow-up; no C++ rebuild. The original three cases also passed locally, so the CI allocation failure was not reproduced locally; a separate buffer-address check confirmed that single-chunk concatenation makes the unnecessary copy. - Changed-file formatting and pre-commit checks pass. Source copyleft checks pass. CI resolves Ray from the package's `ray>=2.58.0,<3` requirement. Python 3.14's intermittent async-actor stack-boundary defect remains tracked by [Ray #66399](ray-project/ray#66399); its [upstream fix](ray-project/ray#67132) has not reached a stable release. The native C++ helper fix addresses the independent macOS failure. ## Checklist - [x] The change is focused and includes regression coverage. - [x] Public behavior and compatibility impact are documented above. - [x] No dependencies, copied code, model assets, or datasets are added. - [x] No credentials, private endpoints, personal paths, generated data, model weights, or build artifacts are included. - [x] Application/worker credential and header isolation remains enforced. - [x] Native changes were rebuilt; affected installed-package tests and static checks passed. (cherry picked from commit 2e1cebd)
kaka11chen
added a commit
to kaka11chen/astrovela_vane
that referenced
this pull request
Oct 23, 2026
AstroVela#1058) ## Summary Fresh dependency resolution breaks existing behavior with Pandas 3.1.0 and Anthropic 2.1.0. Restore compatibility and make the native UDF rejection test observe errors reliably. - Replace Pandas' deprecated inplace column drop with column deletion before reinserting the converted column at its original position. Update three test fixtures to assign the result of `rename`. Timezone/date conversions retain their column order and types. - Pass the unused Anthropic credential as `None`, then restore the captured application credentials and clear worker-provided custom headers. Real loopback requests cover both credential kinds under conflicting worker settings; Ray assertions accept either supported SDK header format while requiring only the application credential. - Give the serving acceptance test's recovery request its normal 30-second fixture budget. The gated request still expires after one second, and the test still requires exactly one timeout, two worker initializations and no active or pending-cleanup requests. Production deadlines are unchanged. - Keep the image-to-tensor allocation regression focused on conversion and Arrow export: inspect the single exported chunk directly instead of calling `combine_chunks()` inside the address-space limit. A single-chunk concatenation still copies the complete 31.6 MiB RGBA buffer. The original 512 MiB/1 GiB limits, pixel checks and empty-output checks remain, with explicit one-row/one-chunk assertions added. - Propagate native UDF executor errors after its completion loop. `ExecutionIsFinished()` also becomes true when a worker records an error, so the old in-loop check could miss it and make the macOS rejection test fail. Exercise the expected rejection with one and four threads. ## Related issue Closes AstroVela#1057. Also fixes shared Pandas conversion failures, the independent serving recovery-test timeout and native UDF error-check timing observed in recent PR pipelines. ## Documentation impact - [x] No user-facing documentation update is required. - [ ] Documentation is updated in this PR or in a linked website PR. - [ ] <!-- docs-follow-up --> A follow-up issue is required in `AstroVela/vane-website`. The changes restore existing behavior and strengthen test fixtures; no public API is added. ## Validation Native UDF test follow-up: - Compile the exact changed C++ test file as a focused Catch2 executable linked against the existing Linux C++11 Release engine. Both cases pass, with **five assertions** covering one and four threads. - **200 independent processes pass normally**, and **200 pass with a temporary 50 ms delay after executor initialization**. The delay allows the background error to arrive before the wait loop; the old helper fails **50/50 processes under that diagnostic delay**. Its unmodified timing passed 50 local runs, confirming why a passing retry alone did not demonstrate a fix. The delay/probe is temporary and is not included in the committed test. - Root and DuckDB formatting, changed-file pre-commit and source copyleft checks pass. Incremental noneditable Release reinstall succeeds (Vane 0.3.0.dev72, Python 3.12.3, Ray 2.59.0). Installed verifier and package metadata checks: **35 passed, 1 skipped** (optional ADBC dependency). The focused C++ cases and 200 ordinary processes also pass against the newly built engine. - The fresh full base release gate on Python 3.12.3 / Ray 2.59.0 completes in three separate pytest processes: **non-Ray 4,342 passed / 24 skipped / 86 deselected; shared-Ray 67 passed / 8 skipped / 3,188 deselected; owner-Ray 2 passed / 3,261 deselected**. Total: **4,411 passed, 32 skipped**. Skips require optional media, HTTP, OCR, vector-store or ADBC dependencies. - The rebuilt Release wheel passes `scripts/check_release_artifacts.py`. - The [macOS arm64 native CI job](https://github.com/AstroVela/vane/actions/runs/39940433305/job/120370908077) **passes: 4,833 test cases, 1,681,294 assertions; 230 conditional skips**. The previously failing pull-based UDF rejection case passes. The remaining jobs in the full CI run are still running. Earlier runtime compatibility validation on Linux x86-64, Python 3.12.3, freshly built noneditable Release wheel; Pandas 3.1.0, PyArrow 26.0.0, NumPy 2.5.4 and Ray 2.59.0: - All **23 previously failing Pandas cases pass**. Broader dataframe/Arrow/relation/type coverage: **773 passed, 4 skipped, 1 xfailed, 1 xpassed**. - Anthropic client/content tests: **97 passed** with SDK **2.1.0**, and **97 passed** with the declared floor **0.117.0**. - Local serving acceptance module: **14 passed**. The recovery regression also passes in **three independent pytest processes**. - Image-to-tensor regression (`911596d0db4385606c7c2a54fd3d70cd3e067b63`): `scripts/run_installed_pytest.sh tests/fast/test_image_to_tensor.py -m 'not real_ray' -q -rs --timeout=120`: **100 passed, 1 skipped** (optional native_media artifact not configured), including all three bounded-allocation cases. This used the exact Python 3.12 wheel from failed CI run `39890547650`, noneditably installed with NumPy 2.5.4 and PyArrow 26.0.0. Only this related module ran for the follow-up; no C++ rebuild. The original three cases also passed locally, so the CI allocation failure was not reproduced locally; a separate buffer-address check confirmed that single-chunk concatenation makes the unnecessary copy. - Changed-file formatting and pre-commit checks pass. Source copyleft checks pass. CI resolves Ray from the package's `ray>=2.58.0,<3` requirement. Python 3.14's intermittent async-actor stack-boundary defect remains tracked by [Ray #66399](ray-project/ray#66399); its [upstream fix](ray-project/ray#67132) has not reached a stable release. The native C++ helper fix addresses the independent macOS failure. ## Checklist - [x] The change is focused and includes regression coverage. - [x] Public behavior and compatibility impact are documented above. - [x] No dependencies, copied code, model assets, or datasets are added. - [x] No credentials, private endpoints, personal paths, generated data, model weights, or build artifacts are included. - [x] Application/worker credential and header isolation remains enforced. - [x] Native changes were rebuilt; affected installed-package tests and static checks passed. (cherry picked from commit 2e1cebd)
kaka11chen
added a commit
to kaka11chen/astrovela_vane
that referenced
this pull request
Oct 23, 2026
AstroVela#1058) ## Summary Fresh dependency resolution breaks existing behavior with Pandas 3.1.0 and Anthropic 2.1.0. Restore compatibility and make the native UDF rejection test observe errors reliably. - Replace Pandas' deprecated inplace column drop with column deletion before reinserting the converted column at its original position. Update three test fixtures to assign the result of `rename`. Timezone/date conversions retain their column order and types. - Pass the unused Anthropic credential as `None`, then restore the captured application credentials and clear worker-provided custom headers. Real loopback requests cover both credential kinds under conflicting worker settings; Ray assertions accept either supported SDK header format while requiring only the application credential. - Give the serving acceptance test's recovery request its normal 30-second fixture budget. The gated request still expires after one second, and the test still requires exactly one timeout, two worker initializations and no active or pending-cleanup requests. Production deadlines are unchanged. - Keep the image-to-tensor allocation regression focused on conversion and Arrow export: inspect the single exported chunk directly instead of calling `combine_chunks()` inside the address-space limit. A single-chunk concatenation still copies the complete 31.6 MiB RGBA buffer. The original 512 MiB/1 GiB limits, pixel checks and empty-output checks remain, with explicit one-row/one-chunk assertions added. - Propagate native UDF executor errors after its completion loop. `ExecutionIsFinished()` also becomes true when a worker records an error, so the old in-loop check could miss it and make the macOS rejection test fail. Exercise the expected rejection with one and four threads. ## Related issue Closes AstroVela#1057. Also fixes shared Pandas conversion failures, the independent serving recovery-test timeout and native UDF error-check timing observed in recent PR pipelines. ## Documentation impact - [x] No user-facing documentation update is required. - [ ] Documentation is updated in this PR or in a linked website PR. - [ ] <!-- docs-follow-up --> A follow-up issue is required in `AstroVela/vane-website`. The changes restore existing behavior and strengthen test fixtures; no public API is added. ## Validation Native UDF test follow-up: - Compile the exact changed C++ test file as a focused Catch2 executable linked against the existing Linux C++11 Release engine. Both cases pass, with **five assertions** covering one and four threads. - **200 independent processes pass normally**, and **200 pass with a temporary 50 ms delay after executor initialization**. The delay allows the background error to arrive before the wait loop; the old helper fails **50/50 processes under that diagnostic delay**. Its unmodified timing passed 50 local runs, confirming why a passing retry alone did not demonstrate a fix. The delay/probe is temporary and is not included in the committed test. - Root and DuckDB formatting, changed-file pre-commit and source copyleft checks pass. Incremental noneditable Release reinstall succeeds (Vane 0.3.0.dev72, Python 3.12.3, Ray 2.59.0). Installed verifier and package metadata checks: **35 passed, 1 skipped** (optional ADBC dependency). The focused C++ cases and 200 ordinary processes also pass against the newly built engine. - The fresh full base release gate on Python 3.12.3 / Ray 2.59.0 completes in three separate pytest processes: **non-Ray 4,342 passed / 24 skipped / 86 deselected; shared-Ray 67 passed / 8 skipped / 3,188 deselected; owner-Ray 2 passed / 3,261 deselected**. Total: **4,411 passed, 32 skipped**. Skips require optional media, HTTP, OCR, vector-store or ADBC dependencies. - The rebuilt Release wheel passes `scripts/check_release_artifacts.py`. - The [macOS arm64 native CI job](https://github.com/AstroVela/vane/actions/runs/39940433305/job/120370908077) **passes: 4,833 test cases, 1,681,294 assertions; 230 conditional skips**. The previously failing pull-based UDF rejection case passes. The remaining jobs in the full CI run are still running. Earlier runtime compatibility validation on Linux x86-64, Python 3.12.3, freshly built noneditable Release wheel; Pandas 3.1.0, PyArrow 26.0.0, NumPy 2.5.4 and Ray 2.59.0: - All **23 previously failing Pandas cases pass**. Broader dataframe/Arrow/relation/type coverage: **773 passed, 4 skipped, 1 xfailed, 1 xpassed**. - Anthropic client/content tests: **97 passed** with SDK **2.1.0**, and **97 passed** with the declared floor **0.117.0**. - Local serving acceptance module: **14 passed**. The recovery regression also passes in **three independent pytest processes**. - Image-to-tensor regression (`911596d0db4385606c7c2a54fd3d70cd3e067b63`): `scripts/run_installed_pytest.sh tests/fast/test_image_to_tensor.py -m 'not real_ray' -q -rs --timeout=120`: **100 passed, 1 skipped** (optional native_media artifact not configured), including all three bounded-allocation cases. This used the exact Python 3.12 wheel from failed CI run `39890547650`, noneditably installed with NumPy 2.5.4 and PyArrow 26.0.0. Only this related module ran for the follow-up; no C++ rebuild. The original three cases also passed locally, so the CI allocation failure was not reproduced locally; a separate buffer-address check confirmed that single-chunk concatenation makes the unnecessary copy. - Changed-file formatting and pre-commit checks pass. Source copyleft checks pass. CI resolves Ray from the package's `ray>=2.58.0,<3` requirement. Python 3.14's intermittent async-actor stack-boundary defect remains tracked by [Ray #66399](ray-project/ray#66399); its [upstream fix](ray-project/ray#67132) has not reached a stable release. The native C++ helper fix addresses the independent macOS failure. ## Checklist - [x] The change is focused and includes regression coverage. - [x] Public behavior and compatibility impact are documented above. - [x] No dependencies, copied code, model assets, or datasets are added. - [x] No credentials, private endpoints, personal paths, generated data, model weights, or build artifacts are included. - [x] Application/worker credential and header isolation remains enforced. - [x] Native changes were rebuilt; affected installed-package tests and static checks passed. (cherry picked from commit 2e1cebd)
kaka11chen
added a commit
to kaka11chen/astrovela_vane
that referenced
this pull request
Oct 23, 2026
AstroVela#1058) ## Summary Fresh dependency resolution breaks existing behavior with Pandas 3.1.0 and Anthropic 2.1.0. Restore compatibility and make the native UDF rejection test observe errors reliably. - Replace Pandas' deprecated inplace column drop with column deletion before reinserting the converted column at its original position. Update three test fixtures to assign the result of `rename`. Timezone/date conversions retain their column order and types. - Pass the unused Anthropic credential as `None`, then restore the captured application credentials and clear worker-provided custom headers. Real loopback requests cover both credential kinds under conflicting worker settings; Ray assertions accept either supported SDK header format while requiring only the application credential. - Give the serving acceptance test's recovery request its normal 30-second fixture budget. The gated request still expires after one second, and the test still requires exactly one timeout, two worker initializations and no active or pending-cleanup requests. Production deadlines are unchanged. - Keep the image-to-tensor allocation regression focused on conversion and Arrow export: inspect the single exported chunk directly instead of calling `combine_chunks()` inside the address-space limit. A single-chunk concatenation still copies the complete 31.6 MiB RGBA buffer. The original 512 MiB/1 GiB limits, pixel checks and empty-output checks remain, with explicit one-row/one-chunk assertions added. - Propagate native UDF executor errors after its completion loop. `ExecutionIsFinished()` also becomes true when a worker records an error, so the old in-loop check could miss it and make the macOS rejection test fail. Exercise the expected rejection with one and four threads. ## Related issue Closes AstroVela#1057. Also fixes shared Pandas conversion failures, the independent serving recovery-test timeout and native UDF error-check timing observed in recent PR pipelines. ## Documentation impact - [x] No user-facing documentation update is required. - [ ] Documentation is updated in this PR or in a linked website PR. - [ ] <!-- docs-follow-up --> A follow-up issue is required in `AstroVela/vane-website`. The changes restore existing behavior and strengthen test fixtures; no public API is added. ## Validation Native UDF test follow-up: - Compile the exact changed C++ test file as a focused Catch2 executable linked against the existing Linux C++11 Release engine. Both cases pass, with **five assertions** covering one and four threads. - **200 independent processes pass normally**, and **200 pass with a temporary 50 ms delay after executor initialization**. The delay allows the background error to arrive before the wait loop; the old helper fails **50/50 processes under that diagnostic delay**. Its unmodified timing passed 50 local runs, confirming why a passing retry alone did not demonstrate a fix. The delay/probe is temporary and is not included in the committed test. - Root and DuckDB formatting, changed-file pre-commit and source copyleft checks pass. Incremental noneditable Release reinstall succeeds (Vane 0.3.0.dev72, Python 3.12.3, Ray 2.59.0). Installed verifier and package metadata checks: **35 passed, 1 skipped** (optional ADBC dependency). The focused C++ cases and 200 ordinary processes also pass against the newly built engine. - The fresh full base release gate on Python 3.12.3 / Ray 2.59.0 completes in three separate pytest processes: **non-Ray 4,342 passed / 24 skipped / 86 deselected; shared-Ray 67 passed / 8 skipped / 3,188 deselected; owner-Ray 2 passed / 3,261 deselected**. Total: **4,411 passed, 32 skipped**. Skips require optional media, HTTP, OCR, vector-store or ADBC dependencies. - The rebuilt Release wheel passes `scripts/check_release_artifacts.py`. - The [macOS arm64 native CI job](https://github.com/AstroVela/vane/actions/runs/39940433305/job/120370908077) **passes: 4,833 test cases, 1,681,294 assertions; 230 conditional skips**. The previously failing pull-based UDF rejection case passes. The remaining jobs in the full CI run are still running. Earlier runtime compatibility validation on Linux x86-64, Python 3.12.3, freshly built noneditable Release wheel; Pandas 3.1.0, PyArrow 26.0.0, NumPy 2.5.4 and Ray 2.59.0: - All **23 previously failing Pandas cases pass**. Broader dataframe/Arrow/relation/type coverage: **773 passed, 4 skipped, 1 xfailed, 1 xpassed**. - Anthropic client/content tests: **97 passed** with SDK **2.1.0**, and **97 passed** with the declared floor **0.117.0**. - Local serving acceptance module: **14 passed**. The recovery regression also passes in **three independent pytest processes**. - Image-to-tensor regression (`911596d0db4385606c7c2a54fd3d70cd3e067b63`): `scripts/run_installed_pytest.sh tests/fast/test_image_to_tensor.py -m 'not real_ray' -q -rs --timeout=120`: **100 passed, 1 skipped** (optional native_media artifact not configured), including all three bounded-allocation cases. This used the exact Python 3.12 wheel from failed CI run `39890547650`, noneditably installed with NumPy 2.5.4 and PyArrow 26.0.0. Only this related module ran for the follow-up; no C++ rebuild. The original three cases also passed locally, so the CI allocation failure was not reproduced locally; a separate buffer-address check confirmed that single-chunk concatenation makes the unnecessary copy. - Changed-file formatting and pre-commit checks pass. Source copyleft checks pass. CI resolves Ray from the package's `ray>=2.58.0,<3` requirement. Python 3.14's intermittent async-actor stack-boundary defect remains tracked by [Ray #66399](ray-project/ray#66399); its [upstream fix](ray-project/ray#67132) has not reached a stable release. The native C++ helper fix addresses the independent macOS failure. ## Checklist - [x] The change is focused and includes regression coverage. - [x] Public behavior and compatibility impact are documented above. - [x] No dependencies, copied code, model assets, or datasets are added. - [x] No credentials, private endpoints, personal paths, generated data, model weights, or build artifacts are included. - [x] Application/worker credential and header isolation remains enforced. - [x] Native changes were rebuilt; affected installed-package tests and static checks passed. (cherry picked from commit 2e1cebd)
kaka11chen
added a commit
to hubgeter/vane
that referenced
this pull request
Oct 23, 2026
AstroVela#1058) ## Summary Fresh dependency resolution breaks existing behavior with Pandas 3.1.0 and Anthropic 2.1.0. Restore compatibility and make the native UDF rejection test observe errors reliably. - Replace Pandas' deprecated inplace column drop with column deletion before reinserting the converted column at its original position. Update three test fixtures to assign the result of `rename`. Timezone/date conversions retain their column order and types. - Pass the unused Anthropic credential as `None`, then restore the captured application credentials and clear worker-provided custom headers. Real loopback requests cover both credential kinds under conflicting worker settings; Ray assertions accept either supported SDK header format while requiring only the application credential. - Give the serving acceptance test's recovery request its normal 30-second fixture budget. The gated request still expires after one second, and the test still requires exactly one timeout, two worker initializations and no active or pending-cleanup requests. Production deadlines are unchanged. - Keep the image-to-tensor allocation regression focused on conversion and Arrow export: inspect the single exported chunk directly instead of calling `combine_chunks()` inside the address-space limit. A single-chunk concatenation still copies the complete 31.6 MiB RGBA buffer. The original 512 MiB/1 GiB limits, pixel checks and empty-output checks remain, with explicit one-row/one-chunk assertions added. - Propagate native UDF executor errors after its completion loop. `ExecutionIsFinished()` also becomes true when a worker records an error, so the old in-loop check could miss it and make the macOS rejection test fail. Exercise the expected rejection with one and four threads. ## Related issue Closes AstroVela#1057. Also fixes shared Pandas conversion failures, the independent serving recovery-test timeout and native UDF error-check timing observed in recent PR pipelines. ## Documentation impact - [x] No user-facing documentation update is required. - [ ] Documentation is updated in this PR or in a linked website PR. - [ ] <!-- docs-follow-up --> A follow-up issue is required in `AstroVela/vane-website`. The changes restore existing behavior and strengthen test fixtures; no public API is added. ## Validation Native UDF test follow-up: - Compile the exact changed C++ test file as a focused Catch2 executable linked against the existing Linux C++11 Release engine. Both cases pass, with **five assertions** covering one and four threads. - **200 independent processes pass normally**, and **200 pass with a temporary 50 ms delay after executor initialization**. The delay allows the background error to arrive before the wait loop; the old helper fails **50/50 processes under that diagnostic delay**. Its unmodified timing passed 50 local runs, confirming why a passing retry alone did not demonstrate a fix. The delay/probe is temporary and is not included in the committed test. - Root and DuckDB formatting, changed-file pre-commit and source copyleft checks pass. Incremental noneditable Release reinstall succeeds (Vane 0.3.0.dev72, Python 3.12.3, Ray 2.59.0). Installed verifier and package metadata checks: **35 passed, 1 skipped** (optional ADBC dependency). The focused C++ cases and 200 ordinary processes also pass against the newly built engine. - The fresh full base release gate on Python 3.12.3 / Ray 2.59.0 completes in three separate pytest processes: **non-Ray 4,342 passed / 24 skipped / 86 deselected; shared-Ray 67 passed / 8 skipped / 3,188 deselected; owner-Ray 2 passed / 3,261 deselected**. Total: **4,411 passed, 32 skipped**. Skips require optional media, HTTP, OCR, vector-store or ADBC dependencies. - The rebuilt Release wheel passes `scripts/check_release_artifacts.py`. - The [macOS arm64 native CI job](https://github.com/AstroVela/vane/actions/runs/39940433305/job/120370908077) **passes: 4,833 test cases, 1,681,294 assertions; 230 conditional skips**. The previously failing pull-based UDF rejection case passes. The remaining jobs in the full CI run are still running. Earlier runtime compatibility validation on Linux x86-64, Python 3.12.3, freshly built noneditable Release wheel; Pandas 3.1.0, PyArrow 26.0.0, NumPy 2.5.4 and Ray 2.59.0: - All **23 previously failing Pandas cases pass**. Broader dataframe/Arrow/relation/type coverage: **773 passed, 4 skipped, 1 xfailed, 1 xpassed**. - Anthropic client/content tests: **97 passed** with SDK **2.1.0**, and **97 passed** with the declared floor **0.117.0**. - Local serving acceptance module: **14 passed**. The recovery regression also passes in **three independent pytest processes**. - Image-to-tensor regression (`911596d0db4385606c7c2a54fd3d70cd3e067b63`): `scripts/run_installed_pytest.sh tests/fast/test_image_to_tensor.py -m 'not real_ray' -q -rs --timeout=120`: **100 passed, 1 skipped** (optional native_media artifact not configured), including all three bounded-allocation cases. This used the exact Python 3.12 wheel from failed CI run `39890547650`, noneditably installed with NumPy 2.5.4 and PyArrow 26.0.0. Only this related module ran for the follow-up; no C++ rebuild. The original three cases also passed locally, so the CI allocation failure was not reproduced locally; a separate buffer-address check confirmed that single-chunk concatenation makes the unnecessary copy. - Changed-file formatting and pre-commit checks pass. Source copyleft checks pass. CI resolves Ray from the package's `ray>=2.58.0,<3` requirement. Python 3.14's intermittent async-actor stack-boundary defect remains tracked by [Ray #66399](ray-project/ray#66399); its [upstream fix](ray-project/ray#67132) has not reached a stable release. The native C++ helper fix addresses the independent macOS failure. ## Checklist - [x] The change is focused and includes regression coverage. - [x] Public behavior and compatibility impact are documented above. - [x] No dependencies, copied code, model assets, or datasets are added. - [x] No credentials, private endpoints, personal paths, generated data, model weights, or build artifacts are included. - [x] Application/worker credential and header isolation remains enforced. - [x] Native changes were rebuilt; affected installed-package tests and static checks passed. (cherry picked from commit 2e1cebd)
kaka11chen
added a commit
to AstroVela/vane
that referenced
this pull request
Oct 23, 2026
#1058) ## Summary Fresh dependency resolution breaks existing behavior with Pandas 3.1.0 and Anthropic 2.1.0. Restore compatibility and make the native UDF rejection test observe errors reliably. - Replace Pandas' deprecated inplace column drop with column deletion before reinserting the converted column at its original position. Update three test fixtures to assign the result of `rename`. Timezone/date conversions retain their column order and types. - Pass the unused Anthropic credential as `None`, then restore the captured application credentials and clear worker-provided custom headers. Real loopback requests cover both credential kinds under conflicting worker settings; Ray assertions accept either supported SDK header format while requiring only the application credential. - Give the serving acceptance test's recovery request its normal 30-second fixture budget. The gated request still expires after one second, and the test still requires exactly one timeout, two worker initializations and no active or pending-cleanup requests. Production deadlines are unchanged. - Keep the image-to-tensor allocation regression focused on conversion and Arrow export: inspect the single exported chunk directly instead of calling `combine_chunks()` inside the address-space limit. A single-chunk concatenation still copies the complete 31.6 MiB RGBA buffer. The original 512 MiB/1 GiB limits, pixel checks and empty-output checks remain, with explicit one-row/one-chunk assertions added. - Propagate native UDF executor errors after its completion loop. `ExecutionIsFinished()` also becomes true when a worker records an error, so the old in-loop check could miss it and make the macOS rejection test fail. Exercise the expected rejection with one and four threads. ## Related issue Closes #1057. Also fixes shared Pandas conversion failures, the independent serving recovery-test timeout and native UDF error-check timing observed in recent PR pipelines. ## Documentation impact - [x] No user-facing documentation update is required. - [ ] Documentation is updated in this PR or in a linked website PR. - [ ] <!-- docs-follow-up --> A follow-up issue is required in `AstroVela/vane-website`. The changes restore existing behavior and strengthen test fixtures; no public API is added. ## Validation Native UDF test follow-up: - Compile the exact changed C++ test file as a focused Catch2 executable linked against the existing Linux C++11 Release engine. Both cases pass, with **five assertions** covering one and four threads. - **200 independent processes pass normally**, and **200 pass with a temporary 50 ms delay after executor initialization**. The delay allows the background error to arrive before the wait loop; the old helper fails **50/50 processes under that diagnostic delay**. Its unmodified timing passed 50 local runs, confirming why a passing retry alone did not demonstrate a fix. The delay/probe is temporary and is not included in the committed test. - Root and DuckDB formatting, changed-file pre-commit and source copyleft checks pass. Incremental noneditable Release reinstall succeeds (Vane 0.3.0.dev72, Python 3.12.3, Ray 2.59.0). Installed verifier and package metadata checks: **35 passed, 1 skipped** (optional ADBC dependency). The focused C++ cases and 200 ordinary processes also pass against the newly built engine. - The fresh full base release gate on Python 3.12.3 / Ray 2.59.0 completes in three separate pytest processes: **non-Ray 4,342 passed / 24 skipped / 86 deselected; shared-Ray 67 passed / 8 skipped / 3,188 deselected; owner-Ray 2 passed / 3,261 deselected**. Total: **4,411 passed, 32 skipped**. Skips require optional media, HTTP, OCR, vector-store or ADBC dependencies. - The rebuilt Release wheel passes `scripts/check_release_artifacts.py`. - The [macOS arm64 native CI job](https://github.com/AstroVela/vane/actions/runs/39940433305/job/120370908077) **passes: 4,833 test cases, 1,681,294 assertions; 230 conditional skips**. The previously failing pull-based UDF rejection case passes. The remaining jobs in the full CI run are still running. Earlier runtime compatibility validation on Linux x86-64, Python 3.12.3, freshly built noneditable Release wheel; Pandas 3.1.0, PyArrow 26.0.0, NumPy 2.5.4 and Ray 2.59.0: - All **23 previously failing Pandas cases pass**. Broader dataframe/Arrow/relation/type coverage: **773 passed, 4 skipped, 1 xfailed, 1 xpassed**. - Anthropic client/content tests: **97 passed** with SDK **2.1.0**, and **97 passed** with the declared floor **0.117.0**. - Local serving acceptance module: **14 passed**. The recovery regression also passes in **three independent pytest processes**. - Image-to-tensor regression (`911596d0db4385606c7c2a54fd3d70cd3e067b63`): `scripts/run_installed_pytest.sh tests/fast/test_image_to_tensor.py -m 'not real_ray' -q -rs --timeout=120`: **100 passed, 1 skipped** (optional native_media artifact not configured), including all three bounded-allocation cases. This used the exact Python 3.12 wheel from failed CI run `39890547650`, noneditably installed with NumPy 2.5.4 and PyArrow 26.0.0. Only this related module ran for the follow-up; no C++ rebuild. The original three cases also passed locally, so the CI allocation failure was not reproduced locally; a separate buffer-address check confirmed that single-chunk concatenation makes the unnecessary copy. - Changed-file formatting and pre-commit checks pass. Source copyleft checks pass. CI resolves Ray from the package's `ray>=2.58.0,<3` requirement. Python 3.14's intermittent async-actor stack-boundary defect remains tracked by [Ray #66399](ray-project/ray#66399); its [upstream fix](ray-project/ray#67132) has not reached a stable release. The native C++ helper fix addresses the independent macOS failure. ## Checklist - [x] The change is focused and includes regression coverage. - [x] Public behavior and compatibility impact are documented above. - [x] No dependencies, copied code, model assets, or datasets are added. - [x] No credentials, private endpoints, personal paths, generated data, model weights, or build artifacts are included. - [x] Application/worker credential and header isolation remains enforced. - [x] Native changes were rebuilt; affected installed-package tests and static checks passed. (cherry picked from commit 2e1cebd)
sai-miduthuri
added a commit
that referenced
this pull request
Nov 10, 2026
…rent stack before py calls (#67132) (#67996) ## Description Cherry-pick of #67132 (master commit 6077a8a) onto `releases/2.60.1`. #64772, which is in 2.60, re-anchors CPython 3.14's stack-protection bounds to the async actor's fiber stack on each task switch, to fix a memory leak. But the re-anchor runs after `task_execution_handler` has already made a Python call on the new fiber. That call can see the stale bounds and raise a spurious `RecursionError`, which crashes the actor worker with `Check failed: objects_valid 1 return objects expected, 1 returned. Object at idx 0 was not stored.` This is #66399 (P1). #67132 re-anchors the boundary to the current stack before any Python call in `task_execution_handler`. ## Related issues Related to #67132 and #66399. ## Additional information ### Cherry-pick details Applied cleanly with `git cherry-pick -x`. It has the same 2 files, +287/-106, and the same `git patch-id --stable` as the master commit. No prerequisite commits are missing: - After the pick, `test_asyncio.py` is identical to master at 6077a8a. - `_raylet.pyx` differs from master at that commit only by #66514 ("Guard local GC during core worker startup"), which isn't on this branch. - #66514 changes only `gc_collect`, while #67132 changes only `task_execution_handler`, so this change doesn't depend on it. Not a duplicate: this branch doesn't contain #67132, and no PR against `releases/2.60.1` references it. ### Testing | Command | Result | |---|---| | `pre-commit run --files python/ray/_raylet.pyx python/ray/tests/test_asyncio.py` | Passed, including cython-lint | I didn't run the tests locally. `_raylet.pyx` needs a full Ray build, which wasn't practical on my machine. Both new tests in `test_asyncio.py` skip below CPython 3.14. Premerge CI runs the core Python tests on 3.10 and 3.12, so it runs the rest of `test_asyncio.py` against the changed `task_execution_handler`, but not these two tests. AI assistance was used to prepare this cherry-pick. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: davik <[email protected]> Signed-off-by: Sai Miduthuri <[email protected]> Co-authored-by: Kunchen (David) Dai <[email protected]>
sai-miduthuri
added a commit
that referenced
this pull request
Nov 10, 2026
…rent stack before py calls (#67132) (#68023) ## Description Cherry-pick of #67132 (master commit 6077a8a) onto `releases/2.59.2`. #64772, which is in 2.59, re-anchors CPython 3.14's stack-protection bounds to the async actor's fiber stack on each task switch, to fix a memory leak. But the re-anchor runs after `task_execution_handler` has already made a Python call on the new fiber. That call can see the stale bounds and raise a spurious `RecursionError`, which crashes the actor worker with `Check failed: objects_valid 1 return objects expected, 1 returned. Object at idx 0 was not stored.` This is #66399 (P1). #67132 re-anchors the boundary to the current stack before any Python call in `task_execution_handler`. ## Related issues Related to #67132 and #66399. The same pick for 2.60.1 is #67996. ## Additional information ### Cherry-pick details Applied cleanly with `git cherry-pick -x`. It has the same 2 files, +287/-106, and the same `git patch-id --stable` as the master commit. No prerequisite commits are missing: - #64772 is on this branch; it merged to master before the 2.59 branch cut. - `_raylet.pyx` differs from master at 6077a8a by #66514, #65243 and #65487, which aren't on this branch. None of them touches `task_execution_handler`, the only function #67132 changes. - `test_asyncio.py` differs from master by tests that #66576 and #65243 add. #67132's two tests go after `test_async_actor_finalizes_objects_dropped_on_fiber`, which this branch has from #64772. Not a duplicate: this branch doesn't contain #67132, and no PR against `releases/2.59.2` references it. ### Testing | Command | Result | |---|---| | `pre-commit run --files python/ray/_raylet.pyx python/ray/tests/test_asyncio.py` | Passed, including cython-lint | I didn't run the tests locally. `_raylet.pyx` needs a full Ray build, which wasn't practical on my machine. Both new tests in `test_asyncio.py` skip below CPython 3.14. Premerge CI on this branch runs the core Python tests on 3.10, and postmerge also on 3.12, so it runs the rest of `test_asyncio.py` against the changed `task_execution_handler`, but not these two tests. AI assistance was used to prepare this cherry-pick. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: davik <[email protected]> Signed-off-by: Sai Miduthuri <[email protected]> Co-authored-by: Kunchen (David) Dai <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
In #64772, we began reanchoring the python's stack boundaries each time ray swapped between async actor task contexts in order to provide a ballpark estimate of the new fiber stack location to python to make sure python doesn't leak memory in 3.14.
However, as issue #66399 has reported, this act of reanchoring has the potential to trigger recursive depth failure if any python calls is invoked on the new fiber stack location before the reanchoring occurs.
We have reproduced both failure behaviors reported in the issue locally via the repro script below:
And on master we were able to observe the reported failure from the issue locally:
Additionally, we have also verified that the issue was indeed caused by the actor failing at the
disable_client_hookcall before reanchor due too recursion depth exceeded by attaching gdb to the run and logging out the stack information at the time of failure:From these logs, we confirm that the issue is indeed caused by calls into python triggering
Py_CheckRecursiveCall, leading to the worker crash, causing no valid objects to be returned.What this PR changes
This PR takes the proposed suggestion of the issue and reanchors the stack before any python calls are made (i.e.
disable_client_hook).The only other call site for reanchor within the code is when we resume execution after yielding the fiber in
run_async_func_or_coro_in_event_loop. In this case, no python calls occurs before resuming execution and reanchor. Thus no reordering is needed here.Related issues
Fixes #66399