Skip to content

Crash when 2 files are analyzed simultaneously .../src/cuda/common.c:166: vmaf_cuda_buffer_alloc: Assertion `0' failed. #1420

@provalinf

Description

@provalinf

Driver Version: 535.230.02 CUDA Version: 12.2.2 RTX A2000/Image 12.2.2-devel-ubuntu22.04
Same result on last driver/cuda version.

How to reproduce the problem? Run a VMAF cuda analysis, then while it's running, run a second analysis. The second will crash immediately, while the first will not be affected.

Is there a fix for this crash?
ffmpeg: ../src/cuda/common.c:166: vmaf_cuda_buffer_alloc: Assertion 0' failed.`

int vmaf_cuda_buffer_alloc(VmafCudaState *cu_state, VmafCudaBuffer **p_buf,
                           size_t size)
{
    if (is_cudastate_empty(cu_state)) return -EINVAL;
    if (!p_buf) return -EINVAL;

    VmafCudaBuffer *buf = (VmafCudaBuffer *)calloc(1, sizeof(*buf));
    if (!buf) return -ENOMEM;

    *p_buf = buf;
    buf->size = size;

    CHECK_CUDA(cuCtxPushCurrent(cu_state->ctx));
    CHECK_CUDA(cuMemAlloc(&buf->data, buf->size));

    CHECK_CUDA(cuCtxPopCurrent(NULL));
    return CUDA_SUCCESS;
}

The origin seems to be due to a lack of resources, so the idea would be either to wait for the release or to share it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions