We are seeing increasing GPU memory usage and eventual invalid kernel timestamps with CUPTI Activity tracing on H20 GPUs. This reproduces with a small independent Activity collector, without our production profiler, stack collection, USDT, or eBPF pipeline. Delaying our collector’s first CUPTI API call until the inference service is ready avoids the growth in the tested workload.
Environment
- Linux x86_64, kernel 5.10.134-16.3.al8.x86_64, glibc 2.32
- 2 NVIDIA H20-3e GPUs, 143771 MiB reported per GPU
- Driver 580.105.08
- PyTorch 2.13.0, vLLM 0.29.0, NCCL 2.29.7
- Installed CUDA Runtime package 13.0.96; original CUPTI 13.0.85
- Retested with CUPTI 13.4.58 extracted separately, without upgrading the driver or other CUDA libraries. Each worker’s
/proc/PID/mapswas checked to confirm only the selected new CUPTI library was loaded.
The workload is a locally stored 27B Qwen-family model served under the local alias Qwen3.8-27B (not a verified public download identifier). vLLM resolves its architecture as Qwen3_5ForConditionalGeneration.
Collector and reproduction
The collector uses CUPTI 13.4.58 Activity headers and CUpti_ActivityKernel13. It is injected through CUDA_INJECTION64_PATH. Its early initialization sequence is:
- Set
CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_SIZEto 3,200,000 bytes. - Read the attribute and CUPTI API version.
- Register host-buffer callbacks with
cuptiActivityRegisterCallbacks. - Set
cuptiActivityFlushPeriod(1000). - Enable only
CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL. - Read the device-buffer pool limit: 250.
There is no cuptiSubscribe call in this particular Activity-only collector and no Driver/Runtime API callback tracing. MEMCPY/MEMCPY2/MEMSET are not enabled. We mention the exact sequence in case it matters on this CUPTI/driver combination.
Host buffers are 1 MiB, allocated with posix_memalign(..., 8, ...). The completion callback initializes CUpti_Activity *record = nullptr, iterates cuptiActivityGetNextRecord until CUPTI_ERROR_MAX_LIMIT_REACHED, counts original start/end values, queries dropped records, and frees the host buffer. No timestamp rewriting, sampling filter, or forced flush is used. This is our small diagnostic collector around a real workload, not an NVIDIA sample or a standalone CUDA-only reproducer of the full failure.
Relevant server command:
CUDA_VISIBLE_DEVICES=0,1 \
CUDA_INJECTION64_PATH=/path/to/kernel-only.so \
LD_PRELOAD=/path/to/cupti-13.4.58/libcupti.so.13 \
TEST_DEVICE_BUFFER_SIZE=3200000 \
vllm serve /path/to/model \
--served-model-name Qwen3.8-27B \
--host 0.0.0.0 --port 8000 \
--tensor-parallel-size 2 --max-model-len 65536 \
--gpu-memory-utilization 0.95 \
--enable-auto-tool-choice --tool-call-parser qwen3_coder \
--reasoning-parser qwen3 --mm-encoder-tp-mode data
TEST_DEVICE_BUFFER_SIZE is read by our collector, not a standard CUPTI variable. An isolated Python package path also ensured PyTorch selected the same CUPTI; actual mappings were verified. After /health succeeds, we send 32 concurrent streaming /v1/chat/completions requests, synthetic text input, 256 output tokens/request, ignore_eos=true.
Early initialization: normal vLLM Graph configuration
With CUPTI 13.4.58 and explicit 3,200,000-byte / 250-buffer settings:
- Memory grew by 988 MiB per worker/GPU relative to service readiness, then plateaued.
- Both workers ended with 25,203,108 kernel records, including 203,109 double-zero records (
start == end == 0). - Non-double-zero records stopped increasing at exactly 24,999,999 for both workers. Each worker also had one reverse-timestamp record (
end < start), so this is not a count of all valid durations. - In a settled approximately 38-second post-failure window, each worker returned another 118,384 records, all double-zero, with no new nonzero records.
- No unexpected parsing errors; dropped-record count 0; inference requests continued.
Smaller-buffer tests with the same CUPTI version and pool limit showed matching capacity-related boundaries:
| Buffer bytes | Pool limit | Non-double-zero kernel count before it stopped increasing |
|---|---|---|
| 65,536 | 250 | 511,999 |
| 98,304 | 250 | 767,999 |
| 3,200,000 | 250 | 24,999,999 |
These match buffer_size * pool_limit / 32 - 1. This is an observation, not proof of an internal record layout or leak location. The 98,304-byte test also included one reverse-timestamp record.
Separately, when buffer size was left unset, the pre-context attribute readback was 0, and timestamps were double-zero from the first kernel (807,548 records/worker). Explicitly setting 3,200,000 bytes restored initially valid timestamps but not sustained collection.
--enforce-eager: early vs. late initialization
We verified vLLM logged enforce_eager=True, compilation mode NONE, and CUDA Graph mode NONE.
| Measurement | First CUPTI call during startup | First CUPTI call after readiness |
|---|---|---|
| Kernel records per worker | approximately 19.25 million | 32,373,796 |
| Peak memory increase from readiness | 764 / 762 MiB | 16 / 14 MiB |
| Last 120 seconds memory | still increasing | constant on both GPUs |
| Double-zero / reverse timestamps | 0 / 0 before stopping | 0 / 0 |
| Completed saved requests | 768 | 1,408 |
The early eager test was intentionally stopped after approximately 530 seconds, before establishing any zero-timestamp threshold. Its saved complete load rounds cover approximately 482 seconds. The late eager test completed 893 seconds (14.9 minutes) of load plus 45 seconds of draining, without request errors.
For late initialization, the injection entry only started a thread waiting on a gate file. Our collector made no CUPTI calls before the controller opened the gate after /health succeeded. Worker initialization began about 0.10 seconds after readiness. All buffer settings and load settings were unchanged. The CUPTI library was already mapped to prevent loading a different version; the delayed event was the first CUPTI API call, not library mapping.
We have not traced every Graph API used by underlying libraries during startup, so --enforce-eager is not proof that no library ever instantiated a CUDA Graph.
Questions
The 13.3 release notes describe a Graph memcpy/memset memory-leak fix. An earlier small memset + GEMM Graph test improved with 13.3.75, but the real vLLM workload still exhibited the issue with 13.3.75 and 13.4.58.
The late-attach documentation notes possible memcpy/memset-to-kernel activity classification. We are not claiming this proves the buffer-reuse mechanism or fully explains the eager result.
- Could this be related to the 13.3 fix, and does that fix require a newer driver than 580.105.08 despite general CUDA 13.x minor-version compatibility?
- Is this Activity-only initialization sequence supported, or is an explicit subscription/another step required?
- What can cause timestamp collection to stop at these capacity-related counts while dropped records remain 0? Are there diagnostics for device-buffer reuse/incomplete records?
- Why does the unset device-buffer-size attribute read back as 0 here?
- Is there a supported long-running tracing workaround that does not require application-specific readiness gating?
We can provide sanitized collector source and additional diagnostics. These results do not yet distinguish a CUPTI defect from a CUPTI/driver interaction.