Three failing tests (80,92,331) - Linux, AMD RX 7600 XT #2321

Closed
opened 2026-10-09 15:28:13 +00:00 by L-series · 3 comments
L-series commented 2026-10-09 15:28:13 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by L-series on 2026-10-09T15:28:13Z.


System config

GPU: AMD Radeon RX 7600 XT (RADV/Mesa 26.2.1-1)
OS: Arch Linux, kernel 7.1.9-arch1-2 x86_64.
Toolchain: GCC/G++ 16.2.1.
CMake: 4.4.2. Build type: Debug.

Attached are the failure-logs.txt

According to AI this is the root cause:

The three failures have two separate causes. Tests 80 and 92 hit the same AGC driver out-of-bounds read; test 331 fails an AT9 decode check.

•  agc_driver  and  agc_driver_pm4 :  PacketMemory.cpp:21  reads  packet[2]  unconditionally. Both tests submit valid two-dword packets, whose spans only have indices  0  and  1 :  CLEAR_STATE  in  Submit.cpp:111 , and  PFP_SYNC_ME  in  Pm4.cpp:627  (also validated as size 2 in  Execution/src/Pm4.cpp:335 ). The hardened  std::span  check aborts on index 2. The Vulkan startup and earlier “rejected submission” messages are not the cause; those are setup and negative-test output.
•  guest_ajm : The abort is at  GuestAjm.cpp:597 , where the test expects a complete, successful four-frame AT9 decode. The trace instead reports  result=2  (invalid data), 24 bytes consumed out of 384, and only one frame decoded. The decoder returns  0x82100001 , which the vendored Atrac9 error codes identify as  ERR_UNPACK_GRAD_START_UNIT_OOB ;  Ajm.cpp:647–648  converts that decoder error to the invalid-data result. This points to the synthetic AT9 input or its frame boundaries being rejected—not to a test-runner crash.  Require  aborts without printing a message, explaining the empty CTest output.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5780585176 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2321). Originally posted by [L-series](https://github.com/L-series) on 2026-10-09T15:28:13Z. --- # System config GPU: AMD Radeon RX 7600 XT (RADV/Mesa 26.2.1-1) OS: Arch Linux, kernel 7.1.9-arch1-2 x86_64. Toolchain: GCC/G++ 16.2.1. CMake: 4.4.2. Build type: Debug. Attached are the [failure-logs.txt](https://github.com/user-attachments/files/33257769/failure-logs.txt) According to AI this is the root cause: ``` The three failures have two separate causes. Tests 80 and 92 hit the same AGC driver out-of-bounds read; test 331 fails an AT9 decode check. •  agc_driver  and  agc_driver_pm4 :  PacketMemory.cpp:21  reads  packet[2]  unconditionally. Both tests submit valid two-dword packets, whose spans only have indices  0  and  1 :  CLEAR_STATE  in  Submit.cpp:111 , and  PFP_SYNC_ME  in  Pm4.cpp:627  (also validated as size 2 in  Execution/src/Pm4.cpp:335 ). The hardened  std::span  check aborts on index 2. The Vulkan startup and earlier “rejected submission” messages are not the cause; those are setup and negative-test output. •  guest_ajm : The abort is at  GuestAjm.cpp:597 , where the test expects a complete, successful four-frame AT9 decode. The trace instead reports  result=2  (invalid data), 24 bytes consumed out of 384, and only one frame decoded. The decoder returns  0x82100001 , which the vendored Atrac9 error codes identify as  ERR_UNPACK_GRAD_START_UNIT_OOB ;  Ajm.cpp:647–648  converts that decoder error to the invalid-data result. This points to the synthetic AT9 input or its frame boundaries being rejected—not to a test-runner crash.  Require  aborts without printing a message, explaining the empty CTest output. ```
Dextroid17 commented 2026-10-09 15:52:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-09T15:52:59Z.


Confirmed independently on Linux (gcc 16.2.1, base d70b8998), and the two agc_driver failures are already fixed by an open PR: #1587 ("read the RELEASE_MEM interrupt select only from RELEASE_MEM packets").

Root cause (your first bullet is right): Driver::preparePacketMemory reads packet[2] unconditionally at PacketMemory.cpp:21. Pm4::Validate accepts 2-dword packets — Pm4.cpp:335 case 0x42: size(2) (PFP_SYNC_ME) — and Pm4::PacketWords is ((header >> 16) & 0x3fff) + 2, so header 0xC0004200 is a 2-word span. Index 2 is one past the end.

Reproduced here with -D_GLIBCXX_ASSERTIONS (Debug + gcc 16.2.1), agc_driver and agc_driver_pm4 both abort:

#4 std::span<...>::operator[] (__idx=2)  ->  /usr/include/c++/16/span:288 Assertion '__idx < size()' failed
#5 Driver::preparePacketMemory (packet=std::span of length 2, header=0xC0004200, opcode=0x42)  at PacketMemory.cpp:21
#6 Driver::execute  at PacketExecution.cpp:170

Differential, same build config, only PacketMemory.cpp swapped:

                     main        #1587
agc_driver_tests     exit 134    exit 0
agc_driver_pm4_tests exit 134    exit 0

So tests #80 and #92 are fixed by #1587; #331 (guest_ajm) is the separate AT9 input issue your second bullet describes.

Severity note worth flagging: this is assertions-only. Normal CI is Release (build.yml, -DCMAKE_BUILD_TYPE=Release) and has no sanitizer/assertions job, so CI never sees it — which is why these tests are green upstream but abort in a Debug + _GLIBCXX_ASSERTIONS build.

Could not verify: Windows, and the #331 AT9 failure.

Written with AI assistance.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6084378795 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2321#issuecomment-6084378795). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-09T15:52:59Z. --- Confirmed independently on Linux (gcc 16.2.1, base `d70b8998`), and the two `agc_driver` failures are already fixed by an open PR: **#1587** ("read the RELEASE_MEM interrupt select only from RELEASE_MEM packets"). Root cause (your first bullet is right): `Driver::preparePacketMemory` reads `packet[2]` unconditionally at `PacketMemory.cpp:21`. `Pm4::Validate` accepts 2-dword packets — `Pm4.cpp:335` `case 0x42: size(2)` (PFP_SYNC_ME) — and `Pm4::PacketWords` is `((header >> 16) & 0x3fff) + 2`, so header `0xC0004200` is a 2-word span. Index 2 is one past the end. Reproduced here with `-D_GLIBCXX_ASSERTIONS` (Debug + gcc 16.2.1), `agc_driver` and `agc_driver_pm4` both abort: ``` #4 std::span<...>::operator[] (__idx=2) -> /usr/include/c++/16/span:288 Assertion '__idx < size()' failed #5 Driver::preparePacketMemory (packet=std::span of length 2, header=0xC0004200, opcode=0x42) at PacketMemory.cpp:21 #6 Driver::execute at PacketExecution.cpp:170 ``` Differential, same build config, only `PacketMemory.cpp` swapped: ``` main #1587 agc_driver_tests exit 134 exit 0 agc_driver_pm4_tests exit 134 exit 0 ``` So tests #80 and #92 are fixed by #1587; #331 (`guest_ajm`) is the separate AT9 input issue your second bullet describes. Severity note worth flagging: this is assertions-only. Normal CI is Release (`build.yml`, `-DCMAKE_BUILD_TYPE=Release`) and has no sanitizer/assertions job, so CI never sees it — which is why these tests are green upstream but abort in a Debug + `_GLIBCXX_ASSERTIONS` build. Could not verify: Windows, and the #331 AT9 failure. Written with AI assistance.
Dextroid17 commented 2026-10-09 15:57:37 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-09T15:57:37Z.


Follow-up to complete the map: test #331 (guest_ajm) is the AT9 block issue, covered by open PR #2163 ("use a synthetic AT9 block that stays inside the gradient table").

Reproduced on Linux, gcc 16.2.1, base d70b8998: at Debug -O0, guest_ajm_tests aborts at GuestAjm.cpp:597 (DecodeAt9Superframe, Require(false)); with #2163 it exits 0. Release passes on both arms — this is the -O0-only gradient-table failure your second bullet describes (the 27-byte block reports 24 bytes used at -O0, so the second frame is parsed from offset 24).

So all three failures map to open PRs: #80 and #92 to #1587, #331 to #2163. Note both are build-config-specific — CI is Release and has no sanitizer/assertions or -O0 job, which is why they are green upstream.

Written with AI assistance.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6084458623 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2321#issuecomment-6084458623). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-09T15:57:37Z. --- Follow-up to complete the map: test #331 (`guest_ajm`) is the AT9 block issue, covered by open PR **#2163** ("use a synthetic AT9 block that stays inside the gradient table"). Reproduced on Linux, gcc 16.2.1, base `d70b8998`: at Debug `-O0`, `guest_ajm_tests` aborts at `GuestAjm.cpp:597` (`DecodeAt9Superframe`, `Require(false)`); with #2163 it exits 0. Release passes on both arms — this is the `-O0`-only gradient-table failure your second bullet describes (the 27-byte block reports 24 bytes used at `-O0`, so the second frame is parsed from offset 24). So all three failures map to open PRs: #80 and #92 to #1587, #331 to #2163. Note both are build-config-specific — CI is Release and has no sanitizer/assertions or `-O0` job, which is why they are green upstream. Written with AI assistance.
oneandonlydean commented 2026-10-10 03:07:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-10T03:07:59Z.


Fixed on main by #1587 (preparePacketMemory reads packet[2] only for RELEASE_MEM) and #2163 (the guest_ajm AT9 fixture stays inside the gradient table), so the suite passes in Debug with _GLIBCXX_ASSERTIONS. Reopen if any of the three still fails on current main.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6093146433 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2321#issuecomment-6093146433). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-10T03:07:59Z. --- Fixed on main by #1587 (`preparePacketMemory` reads `packet[2]` only for RELEASE_MEM) and #2163 (the `guest_ajm` AT9 fixture stays inside the gradient table), so the suite passes in Debug with `_GLIBCXX_ASSERTIONS`. Reopen if any of the three still fails on current main.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#2321
No description provided.