startup: report DirectStorage queue errors and signal the error event #1866

Merged
Jess-Doit merged 5 commits from upstream-pr/1873 into main 2026-11-24 20:37:52 +00:00
Jess-Doit commented 2026-11-24 19:54:31 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-24T19:54:31Z.


Refs #1843

Change

Implement queue slot 10 RetrieveErrorRecord and signal the queue's slot 9
error event when the first read fails. The 656-byte x64 record counts failed
requests since retrieval and keeps the first request's HRESULT, options,
destination, source, sizes, cancellation tag and name. A file failure also
keeps the opened path and file offset. The existing failure sites still update
the heartbeat counters, including when a request could not start.

Layout: the record follows the published Xbox
DSTORAGE_ERROR_RECORD (dstorage_xs.h):

  • FailureCount at 0x000.
  • FirstFailure.HResult at 0x008 and FirstFailure.CommandType at 0x00c.
  • The request arm of the union from 0x010: options, destination, destination size, filename at 0x024, file offset at 0x230, source, source size, cancellation tag at 0x248 and name at 0x250. That is 0x290 bytes in all.

A failed read sets CommandType to DSTORAGE_COMMAND_TYPE_REQUEST (0). An empty record has a zero count and CommandType DSTORAGE_COMMAND_TYPE_NONE (-1), not all-zero bytes, which would read as REQUEST. That covers a new queue, the state after a retrieve, and a success-only queue. Only failed read requests are recorded; the status and signal arms are not synthesized.

The request offsets match Microsoft's MIT-licensed Xbox-GDK-Samples Win32 header, which leaves out CommandType and has padding at 0x00c. The stand-in's header pins every offset with static_assert. The consumer reads the record at the published offsets through its own declaration (xbox_error_record in tests/startup_stub_consumer.cpp), not the stand-in's struct.

The header and DirectStorage overview
describe a fresh notification after retrieval. The stand-in implements this
with a manual-reset event and clears it under the same lock as the record.
Each caller owns the handle returned by GetErrorEvent. The existing emergency
path that cannot allocate even a deferred entry can still fail at enqueue.

Differences from the sample's implementation: in DirectStorageWin32WrapperQueue.cpp, the queue creates an auto-reset event once, returns that same handle and closes it when the queue is destroyed. This stand-in differs in two places:

  • Handles: each GetErrorEvent call returns a duplicate handle. That stays safe whether a title closes the handle or not; the cost of never closing one is a leaked handle, not a broken queue.
  • Reset: the event is manual-reset and stays signaled until RetrieveErrorRecord. That matches the header's contract (retrieve once the event is signaled, then not again until the next signal), and a second waiter can't consume the notification.

The Xbox GetErrorEvent reference makes the returned handle the caller's.

Verification

Tested bd52841495856630fa22c0d067bb85824cf3b838 from
82749f0f84d9f8b571566fdf564d530e71f499aa on Windows 10 22H2 build
19045.6456 with MSVC 19.44.35230. A separate MSVC compile compared all
request and error-record field offsets and sizes with the pinned Microsoft header.

Preset Passed Failed Skipped
dev 18 0 0
release 18 0 0

startup_stubs checks two failed file reads in enqueue order, a distinct
success-only queue, an empty second retrieve and a memory failure that
re-arms the event. startup_storage_worker_start checks a signaled event
first acquired after four requests fail with E_OUTOFMEMORY during Submit.
The optional desktop DirectStorage NuGet tests require DSTORAGE_SDK_ROOT
and were outside this configuration's selection.

All three Debug mutation builds failed startup_stubs at the intended check.

Mutation First diagnostic
Remove first-failure SetEvent failed request did not leave the error event signaled
Clear the first failure but leave failure_count second retrieve did not clear the failure count and first record
Remove retrieval's ResetEvent retrieve did not reset the event

The restored DLL passed startup_stubs again.

. .\tools\dev.ps1
$env:VULKAN_SDK = 'C:\VulkanSDK\1.4.363.0'
$intake = (Resolve-Path 'out/pe-env/Scripts/python.exe').Path
$targets = @(
    'startup_stub_consumer', 'startup_stub_acphal', 'startup_stub_xapu',
    'startup_stub_xcrdapi', 'startup_stub_gameinput', 'startup_storage_file_range',
    'startup_dstorage_file_read_check', 'startup_inflate_status',
    'startup_storage_alloc_failure', 'startup_storage_refusal_order',
    'startup_storage_failure_counts', 'startup_dstorage_destination_check',
    'startup_storage_worker_start', 'startup_storage_root_check',
    'startup_inflate_probe', 'pe_map', 'cpu_dstorage_caller'
)
$filter = '^(startup_(stubs|storage_.*|dstorage_.*|inflate(_status)?|heartbeat_commit)|cpu_native_dstorage|docs_links)$'
foreach ($preset in 'dev', 'release') {
    cmake --preset $preset "-DINTAKE_PYTHON=$intake"
    cmake --build --preset $preset --target @targets -j 2
    ctest --preset $preset --no-tests=error -j 1 -R $filter -V
}

To reproduce each control, make its single change in xcrdapi.cpp, then
build and run the consumer check. Restore the source and repeat to confirm
the baseline.

cmake --build --preset dev --target startup_stub_xcrdapi -j 2
ctest --preset dev --no-tests=error -R '^startup_stubs$' --output-on-failure

At the head (5f2edd46: the CommandType change, a merge of main at 3041aab1, and test additions from review):

  • Event taken before a failure: startup_storage_worker_start takes the error-event handle before the failure as well as after it. Removing the first-failure SetEvent now fails both that test and startup_stubs.
  • Long name: a 70-character request name is cut to 63 characters plus a NUL in the record.
  • Merge: it keeps #1864's page-request counts at every failure site, next to the error record, and #1847's status-array initial state.
  • Tests: passed 16/16 in Debug and in Release, including #1864's startup_storage_page_end_counts tests. The command was ctest --preset <preset> --no-tests=error -R '^(startup_stubs|startup_storage_.*|startup_dstorage.*|docs_links)$'.
  • Control: a reset to all-zero bytes, instead of the NONE record, fails startup_stubs with second retrieve did not clear the failure count and first record.
  • CI: the pull-request preset doesn't run these stand-in checks (#1149).

AI-assisted (Codex, driven with Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6590174903 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1873). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-24T19:54:31Z. --- Refs #1843 ### Change Implement queue slot 10 `RetrieveErrorRecord` and signal the queue's slot 9 error event when the first read fails. The 656-byte x64 record counts failed requests since retrieval and keeps the first request's HRESULT, options, destination, source, sizes, cancellation tag and name. A file failure also keeps the opened path and file offset. The existing failure sites still update the heartbeat counters, including when a request could not start. **Layout:** the record follows the published Xbox [`DSTORAGE_ERROR_RECORD`](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/dstorage/structs/dstorage_error_record?view=gdk-2604) (`dstorage_xs.h`): - `FailureCount` at 0x000. - `FirstFailure.HResult` at 0x008 and `FirstFailure.CommandType` at 0x00c. - The request arm of the union from 0x010: options, destination, destination size, filename at 0x024, file offset at 0x230, source, source size, cancellation tag at 0x248 and name at 0x250. That is 0x290 bytes in all. A failed read sets `CommandType` to [`DSTORAGE_COMMAND_TYPE_REQUEST`](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/dstorage/enums/dstorage_command_type?view=gdk-2604) (0). An empty record has a zero count and `CommandType` `DSTORAGE_COMMAND_TYPE_NONE` (-1), not all-zero bytes, which would read as `REQUEST`. That covers a new queue, the state after a retrieve, and a success-only queue. Only failed read requests are recorded; the status and signal arms are not synthesized. The request offsets match Microsoft's MIT-licensed [Xbox-GDK-Samples Win32 header](https://github.com/microsoft/Xbox-GDK-Samples/blob/1f44bdabed6e340170e2c7d1007500e4dff897bb/Samples/System/SimpleDirectStorageCombo/DirectStorageWin32/dstorage_win32.h), which leaves out `CommandType` and has padding at 0x00c. The stand-in's header pins every offset with `static_assert`. The consumer reads the record at the published offsets through its own declaration (`xbox_error_record` in `tests/startup_stub_consumer.cpp`), not the stand-in's struct. The header and [DirectStorage overview](https://learn.microsoft.com/en-us/xbox/gdk/docs/features/console/storage/directstorage/directstorage-overview#geterroreventretrieveerrorrecord) describe a fresh notification after retrieval. The stand-in implements this with a manual-reset event and clears it under the same lock as the record. Each caller owns the handle returned by `GetErrorEvent`. The existing emergency path that cannot allocate even a deferred entry can still fail at enqueue. **Differences from the sample's implementation:** in `DirectStorageWin32WrapperQueue.cpp`, the queue creates an auto-reset event once, returns that same handle and closes it when the queue is destroyed. This stand-in differs in two places: - **Handles:** each `GetErrorEvent` call returns a duplicate handle. That stays safe whether a title closes the handle or not; the cost of never closing one is a leaked handle, not a broken queue. - **Reset:** the event is manual-reset and stays signaled until `RetrieveErrorRecord`. That matches the header's contract (retrieve once the event is signaled, then not again until the next signal), and a second waiter can't consume the notification. The Xbox [`GetErrorEvent`](https://learn.microsoft.com/en-us/xbox/gdk/docs/reference/system/dstorage/interfaces/idstoragequeuex/methods/idstoragequeuex_geterrorevent?view=gdk-2604) reference makes the returned handle the caller's. ### Verification Tested `bd52841495856630fa22c0d067bb85824cf3b838` from `82749f0f84d9f8b571566fdf564d530e71f499aa` on Windows 10 22H2 build 19045.6456 with MSVC 19.44.35230. A separate MSVC compile compared all request and error-record field offsets and sizes with the pinned Microsoft header. | Preset | Passed | Failed | Skipped | |---|---:|---:|---:| | `dev` | 18 | 0 | 0 | | `release` | 18 | 0 | 0 | `startup_stubs` checks two failed file reads in enqueue order, a distinct success-only queue, an empty second retrieve and a memory failure that re-arms the event. `startup_storage_worker_start` checks a signaled event first acquired after four requests fail with `E_OUTOFMEMORY` during Submit. The optional desktop DirectStorage NuGet tests require `DSTORAGE_SDK_ROOT` and were outside this configuration's selection. All three Debug mutation builds failed `startup_stubs` at the intended check. | Mutation | First diagnostic | |---|---| | Remove first-failure `SetEvent` | `failed request did not leave the error event signaled` | | Clear the first failure but leave `failure_count` | `second retrieve did not clear the failure count and first record` | | Remove retrieval's `ResetEvent` | `retrieve did not reset the event` | The restored DLL passed `startup_stubs` again. ```powershell . .\tools\dev.ps1 $env:VULKAN_SDK = 'C:\VulkanSDK\1.4.363.0' $intake = (Resolve-Path 'out/pe-env/Scripts/python.exe').Path $targets = @( 'startup_stub_consumer', 'startup_stub_acphal', 'startup_stub_xapu', 'startup_stub_xcrdapi', 'startup_stub_gameinput', 'startup_storage_file_range', 'startup_dstorage_file_read_check', 'startup_inflate_status', 'startup_storage_alloc_failure', 'startup_storage_refusal_order', 'startup_storage_failure_counts', 'startup_dstorage_destination_check', 'startup_storage_worker_start', 'startup_storage_root_check', 'startup_inflate_probe', 'pe_map', 'cpu_dstorage_caller' ) $filter = '^(startup_(stubs|storage_.*|dstorage_.*|inflate(_status)?|heartbeat_commit)|cpu_native_dstorage|docs_links)$' foreach ($preset in 'dev', 'release') { cmake --preset $preset "-DINTAKE_PYTHON=$intake" cmake --build --preset $preset --target @targets -j 2 ctest --preset $preset --no-tests=error -j 1 -R $filter -V } ``` To reproduce each control, make its single change in `xcrdapi.cpp`, then build and run the consumer check. Restore the source and repeat to confirm the baseline. ```powershell cmake --build --preset dev --target startup_stub_xcrdapi -j 2 ctest --preset dev --no-tests=error -R '^startup_stubs$' --output-on-failure ``` **At the head** (`5f2edd46`: the CommandType change, a merge of main at `3041aab1`, and test additions from review): - **Event taken before a failure:** `startup_storage_worker_start` takes the error-event handle before the failure as well as after it. Removing the first-failure `SetEvent` now fails both that test and `startup_stubs`. - **Long name:** a 70-character request name is cut to 63 characters plus a NUL in the record. - **Merge:** it keeps #1864's page-request counts at every failure site, next to the error record, and #1847's status-array initial state. - **Tests:** passed 16/16 in Debug and in Release, including #1864's `startup_storage_page_end_counts` tests. The command was `ctest --preset <preset> --no-tests=error -R '^(startup_stubs|startup_storage_.*|startup_dstorage.*|docs_links)$'`. - **Control:** a reset to all-zero bytes, instead of the `NONE` record, fails `startup_stubs` with `second retrieve did not clear the failure count and first record`. - **CI:** the pull-request preset doesn't run these stand-in checks (#1149). AI-assisted (Codex, driven with Claude Code).
tedin7 commented 2026-11-24 20:01:13 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T19:59:57Z.

Review: COMMENTED


Peer review of head abd992d20585de279df0f910704fdeaf8861db9f (PRODUCTION_REVIEW_ONLY, technical comment only).

No P1 and no P2 found by reading the change. The C++ was not built or run locally, so the Windows test results are not verified here.

Merge state: the PR is CONFLICTING with current main. git merge-tree reports a content conflict in src/startup_stubs/xcrdapi.cpp; the docs and test files merge cleanly. The branch needs a rebase before it can be merged. The review below is against the PR head.

Read in full: dstorage_error_record.h, the xcrdapi.cpp changes, the two tests, and both docs sections.

What I checked, with no defect found:

  • Layout: the static_asserts are consistent with each other: StorageRequest is 0x48; the record is 0x290 (4-byte count, 4 bytes of padding, 0x288 failure block) with the offsets listed. I could not compare them with the external sample header, whose revision the comment cites, so they are only checked for internal consistency.
  • Vtable: the queue table slots 9 (GetErrorEvent) and 10 (RetrieveErrorRecord) follow the existing slots 3 to 8, and the second takes the record pointer and returns void.
  • First failure kept, count saturating: count_failure takes the record lock, sets the first-failure fields only when the count was 0, and increments with a UINT32_MAX cap. Retrieve copies, then zeroes the whole record, so the next failure becomes the new first.
  • Null and unreadable pointers: !out returns early; the file object is read only after readable() and a kind == file check; the request name is bounded by probe_readable and leaves the zeroed buffer untouched when unreadable. The filename copy is a same-size MAX_PATH array copy.
  • Event handling: the error event is created lazily and already signaled if a failure exists. Each GetErrorEvent call returns a duplicated handle, so the caller can close it. The event is reset under the same lock as the record, so a concurrent failure cannot lose its notification. release() closes the stored handle when the count reaches 0 and a later count_failure checks for null under the lock.
  • Entry paths: every path that fails a request now passes the request bytes: the normal run, the unreadable-token case, a thrown entry, and the three unstarted paths (Unrecorded now carries a copy of the 0x48 bytes, copied only for requests). Status and signal entries never reach the record code. self is always a queue object where the cast is made.
  • Constant: memory_source_option = 1ull << 22 equals the old 0x400000.
  • Tests: the consumer test covers two failing file reads (count 2, first request kept, destination bytes untouched), a success-only queue (no signal, empty record), signal before and after Submit, reset on retrieve, a second retrieve returning an empty record, a guard word after the record buffer, and a memory-source failure that becomes the new first. The worker-start test covers the no-worker case and E_OUTOFMEMORY.

Notes (not blocking):

  • The record's result is E_FAIL for every read failure and E_OUTOFMEMORY for an entry that could not be stored; it does not carry the cause that the heartbeat counters already know (range, source, and so on). A title that reads the HRESULT will see the generic code. Passing the per-cause value would be a small extension.
  • count_failure is still noexcept, but it now takes a mutex through std::lock_guard; a failure to lock would terminate instead of reporting. This is theoretical, but it is a change from the previous lock-free body.
  • I could not check from here whether the external header documents the handle from GetErrorEvent as caller-owned. The change cites it, and the duplicate-handle choice is safe for a caller that closes it and cannot hurt one that does not.

Commands run (Linux):

  • git diff --check <merge-base>...HEAD: clean
  • tests/docs_links_check.py: pass
  • tests/bidi_controls_check.py: pass
  • git merge-tree against current main: one conflict, src/startup_stubs/xcrdapi.cpp
  • The Windows C++ build and the CTest targets startup_stubs and startup_storage_worker_start were not run locally.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6046417604 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1873#pullrequestreview-6046417604). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T19:59:57Z. **Review:** COMMENTED --- Peer review of head `abd992d20585de279df0f910704fdeaf8861db9f` (PRODUCTION_REVIEW_ONLY, technical comment only). **No P1 and no P2 found by reading the change. The C++ was not built or run locally, so the Windows test results are not verified here.** **Merge state: the PR is `CONFLICTING` with current `main`.** `git merge-tree` reports a content conflict in `src/startup_stubs/xcrdapi.cpp`; the docs and test files merge cleanly. The branch needs a rebase before it can be merged. The review below is against the PR head. Read in full: `dstorage_error_record.h`, the `xcrdapi.cpp` changes, the two tests, and both docs sections. What I checked, with no defect found: - **Layout:** the `static_assert`s are consistent with each other: `StorageRequest` is 0x48; the record is 0x290 (4-byte count, 4 bytes of padding, 0x288 failure block) with the offsets listed. I could not compare them with the external sample header, whose revision the comment cites, so they are only checked for internal consistency. - **Vtable:** the queue table slots 9 (`GetErrorEvent`) and 10 (`RetrieveErrorRecord`) follow the existing slots 3 to 8, and the second takes the record pointer and returns void. - **First failure kept, count saturating:** `count_failure` takes the record lock, sets the first-failure fields only when the count was 0, and increments with a `UINT32_MAX` cap. Retrieve copies, then zeroes the whole record, so the next failure becomes the new first. - **Null and unreadable pointers:** `!out` returns early; the file object is read only after `readable()` and a `kind == file` check; the request name is bounded by `probe_readable` and leaves the zeroed buffer untouched when unreadable. The filename copy is a same-size `MAX_PATH` array copy. - **Event handling:** the error event is created lazily and already signaled if a failure exists. Each `GetErrorEvent` call returns a duplicated handle, so the caller can close it. The event is reset under the same lock as the record, so a concurrent failure cannot lose its notification. `release()` closes the stored handle when the count reaches 0 and a later `count_failure` checks for null under the lock. - **Entry paths:** every path that fails a request now passes the request bytes: the normal run, the unreadable-token case, a thrown entry, and the three unstarted paths (`Unrecorded` now carries a copy of the 0x48 bytes, copied only for requests). Status and signal entries never reach the record code. `self` is always a queue object where the cast is made. - **Constant:** `memory_source_option = 1ull << 22` equals the old `0x400000`. - **Tests:** the consumer test covers two failing file reads (count 2, first request kept, destination bytes untouched), a success-only queue (no signal, empty record), signal before and after Submit, reset on retrieve, a second retrieve returning an empty record, a guard word after the record buffer, and a memory-source failure that becomes the new first. The worker-start test covers the no-worker case and `E_OUTOFMEMORY`. Notes (not blocking): - The record's `result` is `E_FAIL` for every read failure and `E_OUTOFMEMORY` for an entry that could not be stored; it does not carry the cause that the heartbeat counters already know (range, source, and so on). A title that reads the `HRESULT` will see the generic code. Passing the per-cause value would be a small extension. - `count_failure` is still `noexcept`, but it now takes a mutex through `std::lock_guard`; a failure to lock would terminate instead of reporting. This is theoretical, but it is a change from the previous lock-free body. - I could not check from here whether the external header documents the handle from `GetErrorEvent` as caller-owned. The change cites it, and the duplicate-handle choice is safe for a caller that closes it and cannot hurt one that does not. Commands run (Linux): - `git diff --check <merge-base>...HEAD`: clean - `tests/docs_links_check.py`: pass - `tests/bidi_controls_check.py`: pass - `git merge-tree` against current `main`: one conflict, `src/startup_stubs/xcrdapi.cpp` - The Windows C++ build and the CTest targets `startup_stubs` and `startup_storage_worker_start` were not run locally. AI-assisted; commands listed were executed locally.
upstream-sync closed this pull request 2026-11-24 21:01:02 +00:00
R0Y00 commented 2026-11-24 21:01:02 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T20:05:19Z.

Review: CHANGES_REQUESTED


The documented Xbox error-record layout has a DWORD CommandType immediately after HResult. In the current 656-byte layout that word is padding at +0x0c, so a consumer using the documented Xbox ABI cannot reliably recognize the populated request arm. Please pin the Xbox discriminator and request layout from its published definition, including the empty/reset state, and have the consumer read them by an independent declaration or fixed offsets. The narrow first slice can remain failed read requests; it does not need to synthesize failures for other arms. The caller-owned duplicate handle is consistent with the public GetErrorEvent documentation. Please also resolve current main conflicts, keeping the new page-end counters from #1864 and the phase ordering of #1847.

Microsoft Xbox error record · Xbox event handle ownership.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6046493684 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1873#pullrequestreview-6046493684). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T20:05:19Z. **Review:** CHANGES_REQUESTED --- The documented Xbox error-record layout has a DWORD CommandType immediately after HResult. In the current 656-byte layout that word is padding at +0x0c, so a consumer using the documented Xbox ABI cannot reliably recognize the populated request arm. Please pin the Xbox discriminator and request layout from its published definition, including the empty/reset state, and have the consumer read them by an independent declaration or fixed offsets. The narrow first slice can remain failed read requests; it does not need to synthesize failures for other arms. The caller-owned duplicate handle is consistent with the public GetErrorEvent documentation. Please also resolve current main conflicts, keeping the new page-end counters from #1864 and the phase ordering of #1847. [Microsoft Xbox error record](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/dstorage/structs/dstorage_error_record?view=gdk-2604) · [Xbox event handle ownership](https://learn.microsoft.com/en-us/xbox/gdk/docs/reference/system/dstorage/interfaces/idstoragequeuex/methods/idstoragequeuex_geterrorevent?view=gdk-2604).
tedin7 commented 2026-11-24 21:01:02 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T20:19:48Z.

Review: COMMENTED


Review of head cf00afe3781ab56915c655c10fa99966192d690a (bd528414, two merges of main, then cf00afe3 "record CommandType"; git merge-tree --write-tree origin/main HEAD merges cleanly).

Verdict: no P1, no P2. Three P3 notes. The stub and the tests that exercise it are Windows-only (MSVC __try/__except in local_log.h), so I could not run them here.

Layout and contract, checked against Microsoft's public documentation

  • Record. I read the GDK reference page for DSTORAGE_ERROR_RECORD (gdk-2604): FailureCount, then FirstFailure with HResult, CommandType, and a union whose Request arm is Options, Destination, DestinationSize, Filename[MAX_PATH], FileOffset, Source, SourceSize, CancellationTag, Name[64]. With 8-byte alignment of FirstFailure that gives 0x008 HResult, 0x00c CommandType, 0x010 Options, 0x018 Destination, 0x020 DestinationSize, 0x024 Filename, 0x230 FileOffset, 0x238 Source, 0x240 SourceSize, 0x248 CancellationTag, 0x250 Name, 0x290 in all: the same numbers as dstorage_error_record.h and as the independent constants in the consumer test. The Win32 sample header (revision 1f44bdab) has the same struct without CommandType, so the offsets after it are unchanged, as the header comment says.
  • Enum. DSTORAGE_COMMAND_TYPE: NONE = -1, REQUEST = 0, STATUS = 1, SIGNAL = 2, as in the header. The page says that with NONE "the remaining data is undefined", which is why an empty record is built with NONE rather than all zeros (zeros would read as REQUEST).
  • Event. The GetErrorEvent page: "When an error occurs for a read request in this queue, the event will be signalled", and "Call CloseHandle after the title no longer needs the event". The PR gives each call its own DuplicateHandle of the queue's event, which fits both. The overview page says the title waits on the event and then calls RetrieveErrorRecord for the first error since the last call; the PR resets the event in the same call that clears the record.

Reading of the code

  • Races. count_failure, queue_error_event, queue_retrieve_error_record and the event close in release() all take the queue's own error_mutex. SetEvent (on the first failure) and ResetEvent (on retrieve) both happen under it, so a failure that lands while a retrieve is running either goes into the record that is copied out or starts a new one with the event set again: no notification is lost. A queue whose event is created after a failure starts signaled (failure_count != 0). The mutex is separate from QueueWork, so a queue with no worker still reports (the worker_start test covers that).
  • Casts. Every queue is built by make(queue), which allocates a QueueObject; the only static_cast<QueueObject*> sites are in the queue vtable functions, release() for kind == queue, and count_failure, which is reached only with the queue pointer (or null, which returns before the cast). Files are FileObject through make(file).
  • Title pointers. The file name is copied only after readable(source, sizeof(FileObject)) and a kind == file check; the request name is read with probe_readable up to 63 bytes and stops at NUL; a memory-source request records source without dereferencing it.
  • Entries that could not be stored. Unrecorded now carries the 0x48 request bytes (zero-initialised by {}), so fail_unstarted records them with E_OUTOFMEMORY, the code the status entry gets.
  • Counts. failure_count saturates at UINT32_MAX; only the first failure fills the record.

Commands run locally on Linux

  • x86_64-w64-mingw32-g++ -std=c++17 -fsyntax-only -Isrc on src/startup_stubs/dstorage_error_record.h (all the static_asserts on sizes and offsets hold for the x64 Windows ABI) and on tests/startup_stub_consumer.cpp: no errors.
  • python3 -B tests/docs_links_check.py (18 files, 376 links), python3 -B tests/bidi_controls_check.py (1331 files): pass. git diff --check origin/main...HEAD: clean.
  • The stub, startup_stub_consumer dstorage-error-record, startup_stubs and startup_storage_worker_start need the MSVC build and a Windows run; there is no working Wine here. No mutations were possible for the same reason.

Findings

  1. P3, only read requests are recorded. CommandType STATUS and SIGNAL are never produced. That matches the documented event ("an error occurs for a read request") and the PR says so in the docs; it only means those two arms of the union stay unused.
  2. P3, noexcept and the lock. count_failure is noexcept and now takes a std::mutex; a failed lock would terminate. Practically unreachable, but fail_entry also calls it from the exception path of the worker.
  3. P3, tests. The consumer test pins the first-failure fields, the second retrieve, and the success-only queue. The case "failure #2 while the record is still unretrieved keeps the first failure's fields but still counts" is covered by failure_count == 2; nothing exercises the saturation at UINT32_MAX, the 63-byte name cut, or a Filename longer than MAX_PATH. One case with a 70-character name would pin the cut.

Not run: the Windows build, startup_stubs, startup_storage_worker_start, any mutation of the stub.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6046712242 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1873#pullrequestreview-6046712242). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T20:19:48Z. **Review:** COMMENTED --- Review of head `cf00afe3781ab56915c655c10fa99966192d690a` (`bd528414`, two merges of main, then `cf00afe3` "record CommandType"; `git merge-tree --write-tree origin/main HEAD` merges cleanly). **Verdict: no P1, no P2. Three P3 notes.** The stub and the tests that exercise it are Windows-only (MSVC `__try`/`__except` in `local_log.h`), so I could not run them here. **Layout and contract, checked against Microsoft's public documentation** - *Record.* I read the GDK reference page for `DSTORAGE_ERROR_RECORD` (gdk-2604): `FailureCount`, then `FirstFailure` with `HResult`, `CommandType`, and a union whose `Request` arm is `Options, Destination, DestinationSize, Filename[MAX_PATH], FileOffset, Source, SourceSize, CancellationTag, Name[64]`. With 8-byte alignment of `FirstFailure` that gives 0x008 `HResult`, 0x00c `CommandType`, 0x010 `Options`, 0x018 `Destination`, 0x020 `DestinationSize`, 0x024 `Filename`, 0x230 `FileOffset`, 0x238 `Source`, 0x240 `SourceSize`, 0x248 `CancellationTag`, 0x250 `Name`, 0x290 in all: the same numbers as `dstorage_error_record.h` and as the independent constants in the consumer test. The Win32 sample header (revision `1f44bdab`) has the same struct without `CommandType`, so the offsets after it are unchanged, as the header comment says. - *Enum.* `DSTORAGE_COMMAND_TYPE`: NONE = -1, REQUEST = 0, STATUS = 1, SIGNAL = 2, as in the header. The page says that with NONE "the remaining data is undefined", which is why an empty record is built with NONE rather than all zeros (zeros would read as REQUEST). - *Event.* The `GetErrorEvent` page: "When an error occurs for a read request in this queue, the event will be signalled", and "Call `CloseHandle` after the title no longer needs the event". The PR gives each call its own `DuplicateHandle` of the queue's event, which fits both. The overview page says the title waits on the event and then calls `RetrieveErrorRecord` for the first error since the last call; the PR resets the event in the same call that clears the record. **Reading of the code** - *Races.* `count_failure`, `queue_error_event`, `queue_retrieve_error_record` and the event close in `release()` all take the queue's own `error_mutex`. `SetEvent` (on the first failure) and `ResetEvent` (on retrieve) both happen under it, so a failure that lands while a retrieve is running either goes into the record that is copied out or starts a new one with the event set again: no notification is lost. A queue whose event is created after a failure starts signaled (`failure_count != 0`). The mutex is separate from `QueueWork`, so a queue with no worker still reports (the `worker_start` test covers that). - *Casts.* Every queue is built by `make(queue)`, which allocates a `QueueObject`; the only `static_cast<QueueObject*>` sites are in the queue vtable functions, `release()` for `kind == queue`, and `count_failure`, which is reached only with the queue pointer (or null, which returns before the cast). Files are `FileObject` through `make(file)`. - *Title pointers.* The file name is copied only after `readable(source, sizeof(FileObject))` and a `kind == file` check; the request name is read with `probe_readable` up to 63 bytes and stops at NUL; a memory-source request records `source` without dereferencing it. - *Entries that could not be stored.* `Unrecorded` now carries the 0x48 request bytes (zero-initialised by `{}`), so `fail_unstarted` records them with `E_OUTOFMEMORY`, the code the status entry gets. - *Counts.* `failure_count` saturates at `UINT32_MAX`; only the first failure fills the record. **Commands run locally on Linux** - `x86_64-w64-mingw32-g++ -std=c++17 -fsyntax-only -Isrc` on `src/startup_stubs/dstorage_error_record.h` (all the `static_assert`s on sizes and offsets hold for the x64 Windows ABI) and on `tests/startup_stub_consumer.cpp`: no errors. - `python3 -B tests/docs_links_check.py` (18 files, 376 links), `python3 -B tests/bidi_controls_check.py` (1331 files): pass. `git diff --check origin/main...HEAD`: clean. - The stub, `startup_stub_consumer dstorage-error-record`, `startup_stubs` and `startup_storage_worker_start` need the MSVC build and a Windows run; there is no working Wine here. No mutations were possible for the same reason. **Findings** 1. **P3, only read requests are recorded.** `CommandType` STATUS and SIGNAL are never produced. That matches the documented event ("an error occurs for a read request") and the PR says so in the docs; it only means those two arms of the union stay unused. 2. **P3, noexcept and the lock.** `count_failure` is `noexcept` and now takes a `std::mutex`; a failed lock would terminate. Practically unreachable, but `fail_entry` also calls it from the exception path of the worker. 3. **P3, tests.** The consumer test pins the first-failure fields, the second retrieve, and the success-only queue. The case "failure #2 while the record is still unretrieved keeps the first failure's fields but still counts" is covered by `failure_count == 2`; nothing exercises the saturation at `UINT32_MAX`, the 63-byte name cut, or a `Filename` longer than `MAX_PATH`. One case with a 70-character name would pin the cut. **Not run:** the Windows build, `startup_stubs`, `startup_storage_worker_start`, any mutation of the stub. AI-assisted; commands listed were executed locally.
R0Y00 commented 2026-11-24 21:01:02 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T20:37:36Z.

Review: APPROVED


Re-reviewed 5f2edd46. The record now writes the Xbox request command discriminator independently of the HRESULT and resets to NONE. The independent byte-offset consumer checks the record, its trailing sentinel and repeat event notifications. Windows Release passed the exact caller and worker-start test. The adjacent page-end and failure-cause counters passed on the preceding revision; they are unchanged by the test-only increment.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6047004363 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1873#pullrequestreview-6047004363). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T20:37:36Z. **Review:** APPROVED --- Re-reviewed 5f2edd46. The record now writes the Xbox request command discriminator independently of the HRESULT and resets to NONE. The independent byte-offset consumer checks the record, its trailing sentinel and repeat event notifications. Windows Release passed the exact caller and worker-start test. The adjacent page-end and failure-cause counters passed on the preceding revision; they are unchanged by the test-only increment.
ChazY11 commented 2026-11-24 21:01:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T20:13:14Z.


Build and tests on this machine

At the PR head, Windows 11 build 26300.9974, MSVC 19.44:

cmake --preset dev
cmake --build --preset dev
ctest --preset dev --no-tests=error -R '^startup_storage_worker_start$|^startup_stubs$'
1/2 Test #81:  startup_storage_worker_start ..... Passed 37.56 sec
2/2 Test #342: startup_stubs ....................  Passed  1.25 sec
100% tests passed, 0 tests failed out of 2

A note on getting there, because I first saw two failures that were mine, not the patch's: the full build stopped with

error: unable to create compilation: AccessDenied      (ziglang build-exe, archive_reader.exe)

because this shell had no ZIG_GLOBAL_CACHE_DIR; and with the build aborted early, startup_stubs ran against stale
stub DLLs and failed. Setting the cache variables and rebuilding turned both green with no change to the PR. Anyone
reviewing this on Windows should confirm the build completed before reading a startup_stubs failure.

The record half is pinned; the event half is not

The new test acquires the event after the failing submit:

// Acquire the event after the failure to exercise the queue's initial signal state without a worker.
HANDLE event = queue_error_event(q.queue);
const DWORD notified = WaitForSingleObject(event, 0);      // expects WAIT_OBJECT_0
...
const DWORD reset = WaitForSingleObject(event, 0);          // expects WAIT_TIMEOUT after retrieval

and queue_error_event creates the event with the failure count as its initial state:

object.error_event = CreateEventW(nullptr, TRUE, object.error_record.failure_count != 0, nullptr);

That means the assertion holds whether or not SetEvent is ever called for this failure. I confirmed it by mutation:
replacing the only if (object.error_event) SetEvent(object.error_event); with if (false) SetEvent(...) and rebuilding
startup_storage_worker_start leaves the test green (rebuilt=True, then Passed).

So the "signal the queue's slot 9 error event when the first read fails" half of the description is currently unobservable in
the fixture. A case that decides it: call queue_error_event before submitting the failing request, assert it is not
signalled, then submit and assert it becomes signalled. That distinguishes a missed SetEvent from "created already set".

The failure_count, first-failure fields and the reset-after-retrieval behaviour are all pinned — those are what the
assertions at line 319 actually compare.

Smaller points

  • The comment at line 311 is honest about what it exercises ("initial signal state without a worker"), which is why the gap is
    easy to point at rather than surprising.
  • record.first_failure.destination != destination.data() and the source-symbol comparisons are the right shape: they check
    the recorded pointers are the caller's, not a copy.

Verdict

Reviewed. The record path is verified and the tests pass; the event-signalling claim is not distinguished by the current
fixture, and one extra case would close it.

Notes

  • AI-assisted review.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7143208636 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1873#issuecomment-7143208636). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T20:13:14Z. --- ## Build and tests on this machine At the PR head, Windows 11 build 26300.9974, MSVC 19.44: ```powershell cmake --preset dev cmake --build --preset dev ctest --preset dev --no-tests=error -R '^startup_storage_worker_start$|^startup_stubs$' ``` ```text 1/2 Test #81: startup_storage_worker_start ..... Passed 37.56 sec 2/2 Test #342: startup_stubs .................... Passed 1.25 sec 100% tests passed, 0 tests failed out of 2 ``` **A note on getting there**, because I first saw two failures that were mine, not the patch's: the full build stopped with ```text error: unable to create compilation: AccessDenied (ziglang build-exe, archive_reader.exe) ``` because this shell had no `ZIG_GLOBAL_CACHE_DIR`; and with the build aborted early, `startup_stubs` ran against **stale** stub DLLs and failed. Setting the cache variables and rebuilding turned both green with no change to the PR. Anyone reviewing this on Windows should confirm the build completed before reading a `startup_stubs` failure. ## The record half is pinned; the event half is not The new test acquires the event **after** the failing submit: ```cpp // Acquire the event after the failure to exercise the queue's initial signal state without a worker. HANDLE event = queue_error_event(q.queue); const DWORD notified = WaitForSingleObject(event, 0); // expects WAIT_OBJECT_0 ... const DWORD reset = WaitForSingleObject(event, 0); // expects WAIT_TIMEOUT after retrieval ``` and `queue_error_event` creates the event with the failure count as its initial state: ```cpp object.error_event = CreateEventW(nullptr, TRUE, object.error_record.failure_count != 0, nullptr); ``` That means the assertion holds **whether or not `SetEvent` is ever called for this failure**. I confirmed it by mutation: replacing the only `if (object.error_event) SetEvent(object.error_event);` with `if (false) SetEvent(...)` and rebuilding `startup_storage_worker_start` leaves the test green (`rebuilt=True`, then `Passed`). So the "signal the queue's slot 9 error event when the first read fails" half of the description is currently unobservable in the fixture. A case that decides it: call `queue_error_event` **before** submitting the failing request, assert it is not signalled, then submit and assert it becomes signalled. That distinguishes a missed `SetEvent` from "created already set". The `failure_count`, first-failure fields and the reset-after-retrieval behaviour are all pinned — those are what the assertions at line 319 actually compare. ## Smaller points - The comment at line 311 is honest about what it exercises ("initial signal state without a worker"), which is why the gap is easy to point at rather than surprising. - `record.first_failure.destination != destination.data()` and the source-symbol comparisons are the right shape: they check the recorded pointers are the *caller's*, not a copy. ## Verdict Reviewed. The record path is verified and the tests pass; the event-signalling claim is not distinguished by the current fixture, and one extra case would close it. ## Notes - AI-assisted review.
Jess-Doit commented 2026-11-24 21:01:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-24T20:16:50Z.


Thanks, done in cf00afe3, plus a main merge in 4117f0c0:

  • CommandType: FirstFailure.CommandType is now at +0x0c, as in the published Xbox DSTORAGE_ERROR_RECORD, with the request arm from +0x10 and 0x290 bytes in all. A failed read records DSTORAGE_COMMAND_TYPE_REQUEST (0).
  • Empty record: it has a zero count and DSTORAGE_COMMAND_TYPE_NONE (-1). That covers a new queue, the state after a retrieve, and a success-only queue. The all-zero bytes the reset used to leave would have read as REQUEST.
  • Pinned: the stand-in header pins CommandType's offset with the others.
  • Independent read: the consumer reads the record through its own fixed-offset declaration (xbox_error_record), not the stand-in's struct. It checks REQUEST for both failures and NONE for every empty record.
  • Control: restoring the all-zero reset fails startup_stubs at the empty-record check.
  • Scope: still failed read requests only; the status and signal arms are not synthesized.
  • Merge: it keeps #1864's count_page_request calls at all three failure sites, next to the error-record calls, and #1847's status-array initial state.

Debug and Release now pass 16/16, including startup_storage_page_end_counts.

@tedin7, thanks for the review. The per-cause HRESULT is a fair extension; I've left it out of this slice to keep it to the layout fix.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7143296959 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1873#issuecomment-7143296959). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-24T20:16:50Z. --- Thanks, done in `cf00afe3`, plus a main merge in `4117f0c0`: - **CommandType:** `FirstFailure.CommandType` is now at +0x0c, as in the published Xbox `DSTORAGE_ERROR_RECORD`, with the request arm from +0x10 and 0x290 bytes in all. A failed read records `DSTORAGE_COMMAND_TYPE_REQUEST` (0). - **Empty record:** it has a zero count and `DSTORAGE_COMMAND_TYPE_NONE` (-1). That covers a new queue, the state after a retrieve, and a success-only queue. The all-zero bytes the reset used to leave would have read as `REQUEST`. - **Pinned:** the stand-in header pins CommandType's offset with the others. - **Independent read:** the consumer reads the record through its own fixed-offset declaration (`xbox_error_record`), not the stand-in's struct. It checks REQUEST for both failures and NONE for every empty record. - **Control:** restoring the all-zero reset fails `startup_stubs` at the empty-record check. - **Scope:** still failed read requests only; the status and signal arms are not synthesized. - **Merge:** it keeps #1864's `count_page_request` calls at all three failure sites, next to the error-record calls, and #1847's status-array initial state. Debug and Release now pass 16/16, including `startup_storage_page_end_counts`. @tedin7, thanks for the review. The per-cause HRESULT is a fair extension; I've left it out of this slice to keep it to the layout fix.
Jess-Doit commented 2026-11-24 21:01:22 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-24T20:24:27Z.


Thanks @ChazY11 and @tedin7. Both are in 5f2edd46.

  • Event signal (ChazY11): you're right that the worker-start case couldn't see a missing SetEvent, because its handle is created after the failure and starts signaled. That test now also takes a handle before the failure: it must be unsignaled then, signaled after the failing Submit, and reset by RetrieveErrorRecord. With your mutation (if (false) SetEvent(...)):
    • startup_storage_worker_start fails with the failure did not signal an event taken before it;
    • startup_stubs fails with failed request did not leave the error event signaled. That consumer test already took its handle before the failure.
  • Name cut (tedin7, P3 3): the memory failure now uses a 70-character name. The record must hold its first 63 characters, then a NUL at +0x250+63.

Debug and Release pass 16/16 on Windows 10 22H2 with the full stand-in targets rebuilt.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7143499200 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1873#issuecomment-7143499200). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-24T20:24:27Z. --- Thanks @ChazY11 and @tedin7. Both are in `5f2edd46`. - **Event signal (ChazY11):** you're right that the worker-start case couldn't see a missing `SetEvent`, because its handle is created after the failure and starts signaled. That test now also takes a handle before the failure: it must be unsignaled then, signaled after the failing Submit, and reset by `RetrieveErrorRecord`. With your mutation (`if (false) SetEvent(...)`): - `startup_storage_worker_start` fails with `the failure did not signal an event taken before it`; - `startup_stubs` fails with `failed request did not leave the error event signaled`. That consumer test already took its handle before the failure. - **Name cut (tedin7, P3 3):** the memory failure now uses a 70-character name. The record must hold its first 63 characters, then a NUL at +0x250+63. Debug and Release pass 16/16 on Windows 10 22H2 with the full stand-in targets rebuilt.
ChazY11 commented 2026-11-24 21:01:24 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T20:54:25Z.


Confirmed the gap I raised in my review above is closed by the early handle, and recording one measurement trap on
the way, because it cost me two wrong readings.

The fixture does not load XCRDAPI.dll: tests/startup_storage_worker_start.cpp line 94 is

#include "startup_stubs/xcrdapi.cpp"

so the implementation is compiled into the test executable. My first two attempts rebuilt startup_stub_xcrdapi (the DLL) and
reported "not caught" — with a fresh DLL timestamp and a green run, which looks exactly like a surviving mutant. Rebuilding
startup_storage_worker_start instead gives:

$ ctest --preset dev -R '^startup_storage_worker_start$' -V      # SetEvent(object.error_event) -> if (false)
1/1 Test #95: startup_storage_worker_start .....***Failed 0.15 sec
FAIL: the failure did not signal an event taken before it

$ git checkout -- src/startup_stubs/xcrdapi.cpp                  # reverted
100% tests passed, 0 tests failed out of 1

So the case at lines 301–326 does what it says: a handle taken before the failure can only become signaled through the
failure's SetEvent, and removing that call now fails the run. That is precisely the distinction my review asked for — the
previous fixture acquired the event after the failure, when CreateEventW(..., failure_count != 0, ...) already made it
signaled.

Anyone re-running this: build startup_storage_worker_start, not the DLL.

  • AI-assisted.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7144214659 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1873#issuecomment-7144214659). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T20:54:25Z. --- Confirmed the gap I raised in [my review above](#issuecomment-7143208636) is closed by the `early` handle, and recording one measurement trap on the way, because it cost me two wrong readings. The fixture does not load `XCRDAPI.dll`: `tests/startup_storage_worker_start.cpp` line 94 is ```cpp #include "startup_stubs/xcrdapi.cpp" ``` so the implementation is compiled **into the test executable**. My first two attempts rebuilt `startup_stub_xcrdapi` (the DLL) and reported "not caught" — with a fresh DLL timestamp and a green run, which looks exactly like a surviving mutant. Rebuilding `startup_storage_worker_start` instead gives: ```text $ ctest --preset dev -R '^startup_storage_worker_start$' -V # SetEvent(object.error_event) -> if (false) 1/1 Test #95: startup_storage_worker_start .....***Failed 0.15 sec FAIL: the failure did not signal an event taken before it $ git checkout -- src/startup_stubs/xcrdapi.cpp # reverted 100% tests passed, 0 tests failed out of 1 ``` So the case at lines 301–326 does what it says: a handle taken **before** the failure can only become signaled through the failure's `SetEvent`, and removing that call now fails the run. That is precisely the distinction my review asked for — the previous fixture acquired the event after the failure, when `CreateEventW(..., failure_count != 0, ...)` already made it signaled. Anyone re-running this: build `startup_storage_worker_start`, not the DLL. - AI-assisted.
Sign in to join this conversation.
No reviewers
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
R0Y00/Xbox2Windows!1866
No description provided.