Skip to content

Restore permanently fails after initial OOM — process stuck in CHECKPOINTED state #44

Description

@asayyah

When restore fails due to insufficient GPU memory (CUDA_ERROR_OUT_OF_MEMORY, code 2), all subsequent restore attempts fail with CUDA_ERROR_OPERATING_SYSTEM (304) — even after freeing GPU memory. The process is permanently stuck: restore returns 304, unlock returns CUDA_ERROR_ILLEGAL_STATE (401). The only option is to kill the process.

The failed restore appears to partially modify internal driver state that isn't rolled back on failure. We reproduced this by calling cuCheckpointProcessRestore directly via the driver API (not through the cuda-checkpoint binary), so this is a limitation in the underlying driver, not the CLI tool.

Environment

  • Driver 580.95.05, CUDA 13.0, Tesla T4 (15GB)

Reproduction

  1. Start a CUDA process that allocates ~4GB via cudaMalloc
  2. cuda-checkpoint --action lock --pid $PID → success
  3. cuda-checkpoint --action checkpoint --pid $PID → success
  4. Fill GPU memory with a second process (leave ~256MB free)
  5. cuda-checkpoint --action restore --pid $PIDout of memory (state stays CHECKPOINTED)
  6. Kill the memory-filling process (~8.4GB now free)
  7. cuda-checkpoint --action restore --pid $PIDOS call failed or operation not supported on this OS (304, permanently)

Without step 4-5, restore works fine every time.

Expected behavior

A failed restore due to OOM should leave the process in a clean CHECKPOINTED state so restore can be retried once memory is available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions