DirectStorage: handle BCPack output allocation failure #1371
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1381"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-24T15:25:12Z.
Runtime fix verified with unit tests and RX 9070 XT smoke run.
What is in it
Tested
cargo build --workspacecargo test -p xcl --lib oversized_output_returns_allocation_error: 1 passed.cargo test --workspace -- --test-threads=4 --nocapture: 752 passed, 0 failed, 41 ignored. The reported passes include tests that return early.test_title_draws_with_a_root_signature_under_the_debug_layeranduploads_start_from_each_subresources_state, because the D3D12 debug layer is unavailable.Regression run
main:
PR:
Not tested
AI use
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T15:33:08Z.
Full-suite run, since this PR has no test report yet. Tested exact head
a714559(on its base930e8b4).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 752 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.oversized_output_returns_allocation_error.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 752 passed, 0 failed, 41 ignored, no skips.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T16:49:46Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by throny on 2026-11-25T00:26:58Z.
Two contributors checked independently and found that #1438 #1785 solves the same problem (for #1392) in a different way: #1607, group D54. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.
This is a hint from the community triage in #1607, not a maintainer decision.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Imported from ivall/xcl. Originally posted by anes66 on 2026-11-25T06:02:38Z.
CPU-only allocator-refusal verification on exact head
a71455945d0373b19b67f845251a4e1991509374passed. Optional test companion 98886cb adds one test only, directly on that head.The existing
usize::MAXregression covers a capacity overflow. This additional case uses a representable, block-aligned 128 MiB output size and a 64 MiB Windows Job Object process-commit cap applied only to an isolated test child, so it exercises a real allocator refusal without exhausting the machine's memory.Tested
Error::Allocation; the child completed normally. Creating/configuring/assigning the job must succeed or the test fails.cargo test --locked -p xcl --lib hle::bcpack::tests:: -j 2 -- --nocapture --test-threads=1: 8 passed / 0 failed / 0 ignored / 0 skips. This includes the original oversized-output test, synthetic fixtures, malformed-input checks and the new child test. The nested child summary is the same test invocation and is not counted again.vec![0u8; out_len]: the child aborted and stderr containedmemory allocation of 134217728 bytes failed; the parent test failed as expected. Restored before the final passing suite and commit.Not tested
Whole-system exhaustion, intermediate decoder allocations, downstream DirectStorage error mapping, release, full workspace/GPU suite, retail smoke or newer-main integration. This verifies graceful refusal of the output allocation, not that every allocation in a title run becomes recoverable or that #1381 fixes a particular retail crash.
AI use: Codex (GPT-6; exact variant unavailable) wrote the test and temporary negative control, ran CPU verification and prepared this report.
Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-25T14:46:28Z.
Thanks @anes66 for the additional regression test. Commit
17bcfe6includes your isolated child-process test, which checks that each supported BCPack mode reports allocation refusal under a 64 MiB process commit limit rather than aborting.cargo test -p xcl --lib output_allocation_refused_by_windows_returns_an_error -- --test-threads=2: 1 passed, 0 failed, 0 ignored.cargo test --workspace -- --test-threads=2: passed, 0 failures; the xcl unit suite reported 709 passed and 21 ignored, with additional workspace and documentation tests passing.The updated head is queued for automated RX 9070 XT smoke verification.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:03:20Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:31:59Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:35:26Z.
Triage (#1607) – head
17bcfe6#1785 makes the same change to
bcpack::decode(try_reserve_exactfor the output buffer, a new error variant) and more (thevictoryrecord buffer, request size limits indstorage.rs), but it is later, has no tests and no test run, and conflicts with main. #1438 changes onlydstorage::execute(bounds and fallible source buffers), not the decoder.No problems found in the diff; the change still applies to main's
bcpack::decode.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.