test(vk): serialize recording admission in its parallel fixture #2074
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2074
Loading…
Reference in a new issue
No description provided.
Delete branch "PirateKingIsh/Longshot:fix/recording-admission-parallel"
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?
Summary
Repeated runs of
tests/test_recording_admission.py --case parallelcan fail withworker slot ownershiporpool ownership/double freeeven when no renderer code changed. The fixture starts two workers and calls the extracted recording function directly. It omitted the caller lock that current main holds around recording admission, so both workers could resize the same resource deque. Its fake Vulkan handles, maps and counters also had unsynchronized writes.This restores the caller contract in the fixture, gives the fake driver atomic handles and locked bookkeeping, and makes its barrier flag thread-local as in the renderer. The workers still copy through their own recording state after admission. Renderer code, the source extraction, all assertions, failure injection and the parallel case are unchanged.
Read
tests/recording_admission_test.cppfirst. For the caller contract,gpu/vk/vk_replay.cppholdsreplay_muinrun_submitanddo_presentbeforebegin_recordingcallsdraw_begin_recording. Current main has no internalParLockin that extracted function: the fixture's own lock went with the renderer's parallel replay in #1763 (a3565ac5), while this two-worker case stayed, which is when it started failing intermittently.Flags and settings: none.
Testing
Tested: Windows 11 build 26200, Python 3.14.10, LLVM-MinGW clang++ 23.1.5, normal user permissions. No game build or game run: only a game-free test fixture changes, with no Vulkan driver involved. Main was
9dd41326; the tested fixture is byte-identical to commite4f47fb47bb973d51010c0f1e8caaad1448c2272.worker slot ownership; the earlier investigation also sawpool ownership/double free. The individual failing interleavings were not instrumented, so no diagnostic is assigned to just one of the races.tests/run_all.py --strict --exact tests/test_recording_admission.pypassed with no skip.9dd41326, using the same compiler, arguments and permissions, had 777 passed, 89 failed, 48 skipped. 0 new failed checks. This wastests/run_all.pydirectly, not an all-greenmise run testclaim. Platform skips remain skips. The earlier long-path check rejected its temporary root as too deep; it passed here with a shorter temporary root, with its source unchanged. The other long-path test still rejects its root (250 against a limit of 248, previously 257). The portable-builder check now passes its native assertions before the missing .NET v8.0 reference assemblies stop it; an exact-main recheck under the same temporary root confirmed that same failure. Shared failures are named below;test_vbytes.pytimes out on both sides andtest_job_queue.pypasses on both.Checks that also fail on the exact main baseline
tests/test_appimage_player_build.pytests/test_auto_handheld.pytests/test_bug_report_defaults.pytests/test_capture_read_once.pytests/test_capture_readback_visibility.pytests/test_compile_retry_jobs.pytests/test_compile_stops_on_exception.pytests/test_crash_dialog.pytests/test_crash_record.pytests/test_crt_options.pytests/test_damage_debug_menu.pytests/test_dev_ab.pytests/test_dev_build.pytests/test_dev_migrate.pytests/test_dev_packs.pytests/test_device_lost_exit.pytests/test_display_startup_failure.pytests/test_dlss_feature_size.pytests/test_draw_binds.pytests/test_draw_stream_visibility.pytests/test_failed_compile_keeps_objects.pytests/test_flush_nothing_held.pytests/test_frame_overlap.pytests/test_fsr3fi_hud_layer.pytests/test_fsr3fi_hudless_colour.pytests/test_fsr_image_retirement.pytests/test_fsr_uniform_ownership.pytests/test_game_menu_mouse_buttons.pytests/test_gpu_wait_stats.pytests/test_guest_imported.pytests/test_high_fps_fixes.pytests/test_host_guest_writes.pytests/test_input_background.pytests/test_libc_hooks.pytests/test_lift_cache.pytests/test_lift_cleanup_error.pytests/test_linux_preflight.pytests/test_linux_pressure.pytests/test_long_paths.pytests/test_low_vram_texture_mips.pytests/test_make_game_ngx.pytests/test_menu_i18n.pytests/test_menu_keys.pytests/test_menu_text_field.pytests/test_mesh_conv.pytests/test_mise_build.pytests/test_missing_nup.pytests/test_mods_list.pytests/test_nfc_model_info.pytests/test_ngx_sdk.pytests/test_oot_shadow_fit.pytests/test_pads_after_menu.pytests/test_pass_barrier.pytests/test_pending_guest_import.pytests/test_perf_report.pytests/test_pipeline_play_cache.pytests/test_portable_builder_home.pytests/test_portable_builder_startup.pytests/test_prepare_cache_save.pytests/test_present_queue_default.pytests/test_present_source_crop.pytests/test_profiling_mode.pytests/test_psychov35_fsr3_fg.pytests/test_readback_timeout_source.pytests/test_recorder_own_idle.pytests/test_recorder_sync.pytests/test_reflex_swapchain_lifetime.pytests/test_renderer_new_handler.pytests/test_renhdrum.pytests/test_replay_write_order.pytests/test_run_all_mingw.pytests/test_run_all_output.pytests/test_sampler_admission.pytests/test_sdiv_overflow.pytests/test_slow_frames.pytests/test_song_note_cue.pytests/test_sparse_mirror.pytests/test_staging_burst.pytests/test_target_reuse_memory.pytests/test_texel_buffer_ownership.pytests/test_ub_update_batch.pytests/test_ui_record.pytests/test_upscaler_rows.pytests/test_vbytes.pytests/test_vcore_escape.pytests/test_vcore_mask0.pytests/test_vk_occlusion_queries.pytests/test_work_lock.pyStill to test:
Measurements
Verdict: the fixture's intermittent ownership failures stopped in the requested patched repetitions and returned when only the fix was reverted. No game performance change is claimed.
All counts are measured. Setup is the Windows test environment above; each invocation compiled a fresh fixture. The two 50-run unpatched controls were before and after the patched tests, not interleaved performance samples.
9dd41326e4f47fb4Risks
A test-only synchronization change can hide a problem if it supplies a lock absent from production. Here the admission lock models the actual caller's
replay_mu, and the fake-driver lock protects only fake handles, maps and counters. The fixture still does not model concurrent stream growth, concurrent descriptor binding, GPU execution or GPU resource lifetime. The observed failures alone do not prove a renderer race, nor does this test establish general renderer safety.No game behavior, switch, save, cache or player setting changes. Reverting the commit is enough to return to the original fixture.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). Direct strict Windows runner results and shared failures are disclosed above; no all-green claim.main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Ready to merge
No game run: this commit changes only a game-free test fixture. Windows 11 build 26200, Python 3.14.10 and LLVM-MinGW clang++ 23.1.5. Main
9dd41326failed 33/50 parallel repetitions. Commite4f47fb47bpassed 100/100 without added load, 100/100 beside six suite-check workers, and 20/20 complete executions (22 cases each). Reverting only the fixture change restored 33/50 failures. The focused strict suite passed. Renderer code, extraction, assertions and the parallel case are unchanged. Flags and settings: none.