xcl run: say on stderr when the log or report.json cannot be written (#2277) #2276
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2286"
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 Creaa on 2026-11-25T12:26:13Z.
When XCL cannot create its log or write
report.json, it now says so once on stderr, with the path and the OS error, and the run goes on. Before, both failures were dropped: the run looked normal, the console showed aLog:path that did not exist, and there was nothing to attach to a bug report. Fixes #2277.What is in it
crates/xcl/src/log.rs:initopens the log through a newopen(p)that returns the error ofcreate_dir_allorFile::createwith the path;initprintsxcl: cannot create the log folder … / cannot open the log …: <OS error>.eprintln!, notxlog_*: the log is what failed, and its stderr echo is off unless the title setslog_to_stderr.crates/xcl/src/report.rs:write_finalwrites through a newsave(path, text); a failure printsxcl: cannot write the report …: <OS error>once per process (the report is written on several exit paths).a_log_that_cannot_be_opened_names_its_pathanda_report_that_cannot_be_written_names_its_path: a path under an existing file fails with a message naming it; a normal path still writes.Both messages go through
log::warn, a best-effort write to stderr that drops its own error:eprintln!panics when stderr cannot be written (a closed pipe), and these messages come exactly when the log is already unusable (found by @luckyteagirl in review);a_warning_to_a_broken_stderr_is_droppedchecks it with a writer that fails withBrokenPipe.Tested
cargo build --workspace && cargo test --workspace -- --test-threads=4: 1426 passed, 0 failed, 46 ignored. SKIPPED: the wave64 GPU tests (no wave64), the direct-DXIL f16/f32 cases refused per #1426,heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),pso_measurement_compiles_an_exact_synthetic_record(Developer Mode is off), andtest_title_draws_with_a_root_signature_under_the_debug_layer/uploads_start_from_each_subresources_state(no D3D12 debug layer installed).XCL_DATA_ROOTpointing at a root whose<title>\logsis a file: onmainthe run exits 0 and prints nothing about it; with this PR it exits 0 and prints (OS messages translated; the machine's Windows is not English.)Regression run
main:
this PR:
Not tested
AI use
🤖 Generated with Claude Code
upstream-sync referenced this pull request2026-11-25 14:08:43 +00:00
Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-25T15:00:13Z.
Independent Windows check of
cb29250d8a5197a1f40ab96ab173e84564a7235dwith a log file and a report file blocked independently.Tested
cargo build --locked --workspacepassed.xcl.logorreport.jsonin its own temporary data root. This prevented the launcher's rotation from clearing the obstruction. Rancargo test --locked -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer -- --exact --nocapture --test-threads=1withXCL_NETWORK=0andXCL_ADAPTER=AMD Radeon.Not tested
Full disk, a retail title, the parent revision and the full workspace suite.
AI use
OpenAI Codex (GPT-6.2 Sol) adapted the temporary fixture, ran the checks and wrote this report.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T17:17:34Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T08:51:11Z.
Review: COMMENTED
At exact head
c095117e(basee1d84b7, current mainb49be18), the two new error-reporting paths can turn the promised recoverable log/report I/O failure into a panic if stderr itself cannot be written. This is a source-derived review; I did not run a closed-pipe fixture.log::inituseseprintln!afteropen(p)fails, andreport::write_finaldoes the same aftersave()fails. Rust documents thateprintln!panics on a stderr write error. A valid redirected stderr pipe whose reader has closed is one such case. The new tests call onlyopen/save, so they do not cover the outer nonfatal path. This matters most when the log and report paths are already unwritable, since stderr may be the only remaining diagnostic channel.Could both paths use a best-effort stderr write and discard its error, as the runner already does for
SKIPPEDnotices? A subprocess with a valid but broken stderr pipe, or a small injected writer that returnsBrokenPipe, could assert that the production warning path returns without unwinding while retaining the once-only report guard.AI assistance: two GPT-6.2 Sol agents checked the source and Windows stderr behavior; GPT-6.2 Astra verified the exact-head paths and official Rust documentation.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T08:15:29Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: 1 failure under parallel scheduling; clean on--test-threads=1rerun (1312 passed, 0 failed, 27 ignored, 82s). Intermittent single-test flake — tracked in #1978.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by Creaa on 2026-11-26T12:05:37Z.
@luckyteagirl thanks, right:
eprintln!panics on a stderr it cannot write, and these two messages come exactly when the log is already unusable. Fixed in3550516(squashed into the PR's commit): both now go throughlog::warn, which writesxcl: <message>to stderr and drops the write's own error, as the runner does forSKIPPED;report::write_finalkeeps its once-only guard.a_warning_to_a_broken_stderr_is_droppedchecks it with a writer that fails withBrokenPipe(no panic) and a normal one (the line as before).Full suite and the smoke run rerun on the new head (1426 passed, 0 failed, 46 ignored; smoke block in the description).
AI use: Claude Code (Claude Opus 5.5) made the change, ran the checks and drafted this reply.
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T21:46:17Z.
Independent desktop NVIDIA verification of PR #2286 at head
3550516dfabb11e85dca93860b91c510229c6c0f(1commit; exact parent & merge-base:e1d84b7d9153f86a97d2ec5d209d196046fc0bea, pre-#2555ancestor ofmain).Environment
7956 MiBreported by D3D12), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200(Developer Mode off)rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, DXC1.9.2609.5,--releaseTargeted release tests & build (
3550516d)cargo test --release -p xcl --lib a_warning_to_a_broken_stderr_is_dropped -- --nocapture1 passed; 0 failed; 0 ignored; 1326 filtered out(0.00s)cargo test --release -p xcl --lib a_log_that_cannot_be_opened_names_its_path -- --nocapture1 passed; 0 failed; 0 ignored; 1326 filtered out(0.00s)cargo test --release -p xcl --lib a_report_that_cannot_be_written_names_its_path -- --nocapture1 passed; 0 failed; 0 ignored; 1326 filtered out(0.00s)cargo test --release -p xcl --lib log::(3 consecutive runs)3 passed; 0 failed; 0 ignored; 1324 filtered out× 3 (0.00s,0.00s,0.00s)cargo test --release -p xcl --lib report::(3 consecutive runs)2 passed; 0 failed; 0 ignored; 1325 filtered out× 3 (0.10s,0.10s,0.10s)cargo build --release -p xcl --bin xcl1m 08s, exit0)Paired quiet 60 s retail smoke (
title: 29640639)Exact parent & merge-base (
e1d84b7d9153f86a97d2ec5d209d196046fc0bea, cached baseline on the same machine):PR #2286 (
3550516dfabb11e85dca93860b91c510229c6c0f):Runtime log observations (
xcl.log)9222log lines,0[ERROR]/ device-removal / panic lines.19543 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample14011 MB committed by the process; video memory 6115 MB local, 4683 MB non-local.Limits of coverage
a_warning_to_a_broken_stderr_is_dropped,a_log_that_cannot_be_opened_names_its_path,a_report_that_cannot_be_written_names_its_path) and 3×log::/report::runs.title: 29640639; no separate live CLI run against a read-only output directory or closed stderr handle was performed. Frame-count delta vs. the cached parent smoke (1594vs.1531) reflects normal single-run startup variance and is not attributed to this PR.AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-27T06:17:49Z.
NVIDIA and AMD full-suite run, to go with the reports above by Decodere, since none of them covers AMD. Tested exact head
3550516d(on its basee1d84b7).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1414 passed, 0 failed, 44 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,dispatch_chain_native_wave64_builds_whole,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.a_warning_to_a_broken_stderr_is_dropped,a_log_that_cannot_be_opened_names_its_path,a_report_that_cannot_be_written_names_its_path.XCL_ADAPTER=radeon),cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1425 passed, 0 failed, 46 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on mainc2ee10e4too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
Imported from ivall/xcl. Originally posted by throny on 2026-11-28T13:55:27Z.
merge-check claim
head:
3550516dfaImported from ivall/xcl. Originally posted by throny on 2026-11-28T14:12:21Z.
merge-check
base:
e13d6250head:
3550516dfamerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2133 passed, 10 failed, 48 ignored (26 SKIPPED lines). The 10 failures are the ones main itself has at
e13d6250on this GPU (#3093: the nine since #2959 and, since today, gpu::dxil::msaa_tests::direct_msaa_loads_precede_get_dimensions), the same set with and without this PR; base alone: 2130 passed, 10 failed, 48 ignored.review: none. The new helpers do not collide with anything on main, the report hunk lands in write_final, and the once-only guard is right. The earlier review point about a panic in eprintln is addressed on this head. The test writes and removes only its own folder under the temp directory.
performance: none; error path only.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Imported from ivall/xcl. Originally posted by relativespace2K on 2026-11-30T01:35:41Z.
merge-check
base:
53e85fb1head:
3550516dfamerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2791 passed, 6 failed, 49 ignored; failing: gpu::dxil::compact_tests::gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form, gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline, ram_budget::tests::windows_takes_a_working_set_maximum_and_lifts_it, and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (in
--test gpu_two_pass_cache_e2e, so 5 failing tests give 6 failures). The same five fail on base53e85fb1alone (2788 passed, 6 failed, 49 ignored there), so none comes from this PR; its three new tests passed. 13 SKIPPED lines, all environmental: no D3D12 debug layer / d3d12SDKLayers.dll, no heap windows, no GPU_UPLOAD, per-lane f16/f32 forms refused.review: no blocking finding;
crates/xcl/src/log.rsandcrates/xcl/src/report.rs, every hunk read. Theinitpath now returns the folder and file errors instead of swallowing them, and the message names the path and the OS error;warnwrites withwriteln!to stderr so a broken stderr cannot panic the wayeprintln!would (there is a test with aBrokenPipewriter for exactly that), and the report's failure is said once through anAtomicBool. Alog::initname with no parent folder is not a regression here:create_dir_all("")returnsOk, so a bare relative file name still opens (the one caller passes an absolute path under the data folder anyway). Not a duplicate of #2634, which reports failures of writes and flushes to an already-open log; this one reports not being able to open the log at all and not being able to writereport.json. Both touchcrates/xcl/src/log.rsnext to theFILE/LEVELstatics, so whichever lands second will probably need a small rebase.performance: none: one
create_dir_all/File::createat start-up that both paths already did, and oneAtomicBoolswap per failed report write.verdict: safe to merge
hardware / tool and model: AMD Radeon RX 6800 XT 16 GB (RDNA2, wave64), driver 32.0.21045.29003; Ryzen 5 5600, 32 GB RAM; Windows 10 IoT Enterprise LTSC 2024, 10.0.26100 build 26100.9974; Rust 1.100.0; DXC 1.9.2602.17; debug build. DeepSeek Harness coding agent, model DeepSeek V4.1 Flash.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:44:50Z.
Triage (#1607) – head
3550516#2634 (same issue #2277) is a follow-up, not a duplicate: it reports failed
write_all/flush calls to an open log, while this PR reports a log that cannot be opened and areport.jsonthat cannot be written. Both editlog.rs, so whichever merges second will need a rebase. No problems found in the diff.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by tiagonleal on 2026-12-02T21:42:34Z.
merge-check
base:
5ad98adbc3head:
3550516dfamerge: clean (merge commit 47947105ba172087e94aa5a0747b9f1099573e8e;
git diff --checkclean)build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 3008 passed, 0 failed, 52 ignored; SKIPPED: 24 (22 no wave64, 2 no heap windows); failing: none
title run: Newer Retail Game, release build of this merge, Series S settings (
XCL_DEVICE_TYPE=lockhart,XCL_COHERENT_MB=512,XCL_UMA_WINDOWS=16,XCL_SPARSE_LAZY=1), scripted A presses, 240 s planned: into the world at 80 s, 55 s there with 51 frames presented, no crash, no device removal; then our RAM guard stopped it (free RAM under 1 GB on this 32 GB PC, as in main's second run).review: none.
performance: none. World frame rate not compared: on this 32 GB PC the runs of main and of the PRs end 30 to 150 s into the world (RAM guard or time limit).
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB (driver 617.42), Ryzen 7 9800X3D, 32 GB, Windows 11 Pro 26300 / Claude Code with Claude Opus 5.5
Same settings on main
5ad98adb, two runs: into the world at 94 s with 145 s there and no frame presented (ran to the 240 s limit); into the world at 80 s with 59 s there and 90 frames, then stopped by our RAM guard (free RAM under 1 GB). "In the world" here means the first 2 s window of the activity log with 5,000+ draws and dispatches.AI use: Claude Code (Claude Opus 5.5) ran the build, tests and title runs and wrote this; a Claude Sonnet subagent read the diff and I checked its points.
~Tiago
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.