﻿# Retired-page collection: handle insufficient array size without losing evidence

Retired-page collection: handle insufficient array size without losing evidence. A focused hardware-lifecycle guide covering the documented mechanism, an acceptance fixture, evidence and operational limits.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/hw-nvml-retired-pages-sized-array-retry/
Language: en

A collector allocates a fixed array for retired-page addresses and treats insufficient space as no useful result. As the reported set grows, the monitoring history loses evidence precisely when new entries matter. Collection capacity must not become an undocumented limit on hardware observations.

## The hardware contract

NVML retired-page retrieval uses an in/out pageCount and returns NVML_ERROR_INSUFFICIENT_SIZE when the provided array cannot hold the matching entries, setting the needed size. The v2 interface additionally returns retirement timestamps through a corresponding array.

Preserve this size-negotiation result as a collection condition, not a zero-page health reading. Keep the selected retirement cause with the query. Addresses, timestamps and counts belong to the same successfully collected result; combining positions from separate mismatched arrays can create a false event history.

## Implementation details

Use the documented sizing contract and validate the count actually returned before reading entries. If the required size changes between attempts, apply a bounded retry policy and report unresolved collection when it cannot complete. Do not assume a preliminary size observation freezes device state for a later call.

Keep device identity, driver context, cause and query outcome with the collected set. A partial attempt should not silently replace a previously complete snapshot or be merged into it as though all entries were observed at one instant. Retain compact diagnostic metadata for failed collection without manufacturing timestamps or addresses. This is an API collection procedure, not an instruction to provoke retirement events or reset a GPU.

## A constructed acceptance test

Create an API fixture whose required entry count exceeds the initial array capacity. Verify reallocation under the supported contract, correct address-to-timestamp pairing and rejection of uninitialized trailing slots. Add a second growth between sizing and retrieval to exercise the bounded retry path.

Include unsupported and failed-query controls alongside a valid empty result. The exporter must distinguish all of them. Compare complete entry identities rather than merely an unchanged total, since replacement or mispaired entries can preserve the count. Retain the expected result and the attempt sequence as the acceptance artifact. No real memory errors are needed: a controlled interface fixture can test the collector without disturbing the board.

## Recovery and limits

Correctly retrieved retired-page data still requires the product-specific interpretation of retirement and pending blacklisting. It does not establish row-remapping semantics or a universal replacement threshold. Keep collection correctness separate from physical-health conclusions. If a bounded collection fails, expose the evidence gap and use the supported investigation path. A collector should neither hide new observations because its array was small nor treat a larger returned set as proof that a particular application caused the hardware condition.

## Primary references

[Nvml Queries](https://docs.nvidia.com/deploy/nvml-api/latest/api/group__nvmlDeviceQueries.html); [NVIDIA page-retirement visibility](https://docs.nvidia.com/deploy/dynamic-page-retirement/visibility.html).

This is a proposed acceptance procedure, not an executed Retrivium test. Preserve the observed implementation version and unresolved outcomes; the documentation does not certify a particular device or establish its remaining service life.

## Related reading

[GPU row remapping: pending state, remapped rows and spares](/journal/gpu-row-remapping-state/); [GPU ECC: volatile and aggregate error counters](/journal/gpu-ecc-volatile-aggregate/).
