Debugging vLLM crashes with enforce-eager and debug logging

A staged method for isolating vLLM engine crashes and illegal states: turn off CUDA graphs with enforce-eager, raise logging, run synchronous CUDA launches, file a reproducible upstream report, and restore production settings.

On this page

Debugging vLLM crashes with enforce-eager and debug logging: when your team needs it

Use this method when a self-hosted vLLM engine crashes or reports an illegal state under load and your team needs to find the fault before changing production. The approach has three moves: narrow the fault by running with --enforce-eager to take CUDA graph capture out of the picture, raise logging so the engine records what it was doing, and collect a complete evidence bundle before any setting is changed on the serving path. vLLM is open-source software licensed under Apache-2.0 and has no paid edition, so this work is done by your own platform engineers or by an implementation partner you hire. The cost is the engineering time, the GPU capacity used for reproduction, and the risk of a longer outage if the evidence is thin. Confirm with your operations lead who is authorized to restart the production engine and where the logs are retained.

Choose this page over the neighboring troubleshooting pages when the symptom is an engine-level failure rather than a known resource or setup error. If the logs show an out-of-memory failure at startup or under load, start with the memory troubleshooting page. If the failure is a collective communication error or a hang across GPUs or nodes, use the NCCL page. If the engine starts, serves a few requests and then fails with an illegal memory access, a CUDA error or an assertion in the scheduler or model runner, this method is the right starting point. A reproducible crash on a single known model and configuration is the strongest case for it, because the isolation steps depend on repeating the failure in a controlled environment. Before opening an upstream issue, the same evidence will also be needed, so plan for it now rather than after a second incident.

How the crash isolation path narrows the fault

The path starts when a crash is observed and first asks whether the same model, configuration and traffic reproduce it. Engineers then toggle enforce-eager to see whether the CUDA graph capture path is involved, and only if the fault is still unclear do they move to synchronous CUDA launches and a raised log level. Each branch ends either in an upstream report with the collected evidence or in a configuration fix, after which the debug settings are restored to their normal values.

The decision path from an observed crash to an upstream report or configuration fix.

Debug settings and when each one fits

This table compares the four settings used in the crash isolation method: enforce-eager, the log level, synchronous CUDA launches and the vLLM logging configuration. Each row gives the question the setting answers, what it costs in throughput or log volume, and when to switch it back off. Confirm option names and defaults against the docs and release notes for your installed vLLM version before changing a production configuration.

SettingQuestion it answersCost to throughput or log volumeWhen to leave it off
enforce-eagerDoes the crash depend on CUDA graph capture or replay, or does it happen in eager execution too?Lower throughput and higher latency, because CUDA graphs are not used for decoding. Confirm the exact flag name in the installed release docs.Once the crash is traced to a specific graph or kernel path, or the fix is verified, return to graph mode for normal serving.
Log level (debug)What did the engine, scheduler and model loader do in the steps before the failure?Large log volume that can fill disks and slow the process. Output can include request metadata, so check what your policy allows.Leave it off in steady state. Enable it for a bounded reproduction window and set it back to the default afterward.
CUDA_LAUNCH_BLOCKING=1Which CUDA call actually failed, instead of the later call where the error surfaced?Serializes kernel launches with the host, which can slow execution sharply. Behavior depends on the CUDA runtime version, so verify on your stack.Under load or for timing measurements. It is a diagnostic aid for one reproduction, not a production setting.
vLLM logging configurationWhich components should emit detail, and where should that output go?Adds files, handlers or stream volume that must be stored, rotated and secured. Confirm the configuration mechanism in the docs for your release.When the team has a standing logging pipeline with retention and access controls already set. Remove custom handlers after the investigation.
Fixed reproduction windowHow long can debug output run before it becomes a risk or a cost?Mostly staff time and storage. Recurs for every investigation that is not closed out.Keep it on only until the failing request is captured, then record the settings used in the incident ticket.

How to run the isolation sequence step by step

The sequence narrows a vLLM engine crash to a likely cause by changing one variable at a time, from CUDA graph capture to a single failing CUDA call, and leaves an evidence bundle ready for an upstream issue or internal review.

  1. Record the exact version and environment

    The engineer on call writes down the vLLM version from the installed package, the exact model identifier and revision, every serving flag, the GPU model and count, the driver version, the CUDA build the wheel or image targets, and the container image digest if one is used. Pull these from the running environment rather than from the deployment manifest, since the two can differ. The step is done when another engineer could rebuild the same environment from this record alone and the record is stored with the incident ticket. Confirm the release notes for the exact version in the vLLM GitHub releases page before assuming a known bug is or is not present.

  2. Reproduce with a fixed request set

    Build a small, saved set of requests that reliably triggers the crash, including the prompt length, output length, batch concurrency and any tool or chat template inputs involved. Replay it against the unchanged configuration until the failure appears in at least two consecutive runs. Save each request body, the timestamp and the response or connection error. The step is done when the failure is reproducible on demand, or when the team records that it is intermittent and notes the conditions under which it appeared. Without a reproducible request set, the later steps can only show that a change coincided with a different outcome.

  3. Run with enforce-eager to test CUDA graph involvement

    Restart the same model with the same flags plus the enforce-eager option, which skips CUDA graph capture, and replay the saved request set. Do not change anything else in the same run. If the crash disappears, CUDA graphs are a likely factor and the team should capture the graph-related log lines from the failing configuration for the upstream report. If the crash continues, graph capture is probably not the cause and the work moves to memory, kernels or the request pattern. Record the outcome either way. The step is done when the team has a clear result for the replay with and without the option, and both runs are logged with the same request set.

  4. Raise the log level for the failing configuration

    Restart with a more verbose log level, using the logging settings described in the vLLM documentation for the installed version, and keep the enforce-eager result from the previous step as the baseline. Capture the startup output, the scheduler and worker messages before the failure, and any warnings about memory, configuration or unsupported features. Write logs to a file with a timestamp rather than only to the console so they survive a container restart. The step is done when the failing replay produces a log file that covers startup through the crash, and the team has checked that the file contains no secrets such as API keys or tokens before sharing it.

  5. Run synchronous CUDA launches to find the failing call

    Set the environment variable that forces CUDA kernel launches to run synchronously, as documented by NVIDIA for CUDA debugging, and replay the request set once more. Synchronous launches make the error surface at the call that caused it rather than at a later, unrelated operation. Note the line in the stack trace that the error reports. This run is slower, so use it only for diagnosis and never in production. The step is done when the failing call is identified in the trace, or when the team records that the error still appears at a different point, which suggests an earlier fault.

  6. Capture stack traces and the evidence bundle

    Collect the full Python traceback, the CUDA error message with its error code, the GPU state at the time of the failure from the driver tools, and the relevant log excerpts from each earlier step. Package them with the environment record, the request set and the results table showing each configuration's outcome. Remove credentials and private prompt content, replacing them with placeholder text that keeps the structure intact. The step is done when the bundle is complete enough that a maintainer or an internal reviewer can read the failure without access to the original environment, and the team has confirmed the redactions.

  7. Confirm each step changed or did not change the failure

    Review the results table and state, for each configuration, whether the crash occurred, at what request, and with which error. Compare the outcomes against the hypothesis each step tested. If the enforce-eager run removed the crash, document the graph-related finding and decide whether to keep that setting while the root cause is investigated, with the performance cost recorded. If no step changed the failure, widen the request set or check hardware and driver versions before opening an upstream issue. The step is done when the team has a written conclusion that names the narrowest reproducible condition and lists what remains unknown.

  8. Restore production settings and log the change

    Remove the verbose logging, the synchronous launch variable and any temporary enforce-eager option from the serving configuration unless the team has decided to keep one of them deliberately. Restart the service, replay the request set to confirm the intended behavior, and record which debug settings were turned off and when. Keep the restored configuration in version control so the change can be reviewed. The step is done when the running configuration matches the approved baseline, the debug settings are confirmed off, and the incident record shows the restoration.

What evidence an upstream vLLM issue needs

Maintainers can act on a crash report only when it lets them reproduce the failure. Start by recording the exact vLLM version, taken from the release you run (the project publishes its tags on the vLLM GitHub releases page), along with the model identifier, the full vllm serve command including every flag, and whether the failure happened with --enforce-eager set. That last item matters most, because a crash that disappears under eager mode points toward CUDA graph capture, while one that persists points elsewhere. Before writing anything new, search the existing issues for the same error text and the same model, since a matching report may already contain the workaround or a fix.

Next, describe the hardware and software stack in enough detail to rebuild it. List the GPU model and count, the NVIDIA driver version, the CUDA runtime in the container or environment, the tensor and pipeline parallel sizes, and the container image or wheel source. Attach a minimal request that reproduces the crash, meaning the smallest prompt, endpoint and sampling settings that still trigger it, and state whether it fails on the first request or only under concurrent load. Confirm each of these values in your own environment rather than assuming them from a previous deployment, since a mismatch between the driver and the CUDA build is a common source of confusing reports.

Finally, include the log excerpt starting at the first error, not the last traceback line, because later exceptions are usually secondary. Keep the surrounding lines that show the engine state and the request that triggered it. Before posting, remove API keys, tokens, internal hostnames, IP addresses, private model paths and user prompt content, and check that nothing in the log reveals customer data. A report that is accurate, scrubbed and reproducible is far more likely to receive a useful response, and the same bundle becomes the starting point for any internal ticket or vendor escalation your team opens.

Security risks of leaving debug settings on

Debug settings make vLLM more useful during an investigation and more exposed afterward. The cards below cover the places where a verbose log, an open endpoint or an untracked flag can leak data or widen access once the crash is fixed.

Verbose logs can hold prompts and outputs

Raised log levels can write request content, generated text and sensitive fields from user prompts into container logs and log shippers. Once a log line leaves the host, it is copied into retention systems you may not have planned for. Before enabling debug logging, confirm which fields your log level emits, who can read the log store, and how long it is kept. Redact or limit capture where your data rules require it.

vLLM security docs

Keep debug endpoints behind access controls

The security docs describe the endpoints that must stay out of user reach. A debug session often adds routes or exposes the API server on a broader network interface than production uses. Confirm that the server listens only where intended, and that a reverse proxy allowlists only the endpoints meant for users. Re-run that check after any debug change, not only at initial deployment.

Security guidance

Unprotected operational endpoints

The --api-key option does not protect /metrics, /health, /pause, /resume, /abort_requests or /invocations. During a crash investigation, someone may query metrics or pause the engine from a host that can reach the port, and the key will not stop them. Confirm which of these paths are reachable from each network segment, and restrict them at the network or proxy layer rather than relying on the key alone.

Evidence bundles need data handling rules

Crash evidence usually includes logs, stack traces, configuration files, request samples and sometimes prompt text. Before attaching anything to an upstream issue or sending it to a vendor, check it against your organization's data classification and approval rules. Strip credentials, tokens, internal hostnames and customer content, and record who collected the bundle, when, and where it was sent.

Track debug flags in change control

Settings such as enforce-eager and raised log levels slow inference or add output, and they are easy to forget. Record each debug change in your change system with the owner, the reason, the expected end time, and the exact command or configuration key used. Review open debug changes at the end of each incident, and confirm the production configuration matches the approved baseline before closing the ticket.

How to turn debug settings back off safely

Rolling back debug settings is a change like any other, and the production startup command should be the first thing restored. Replace the diagnostic launch with the exact command, flags and model arguments your production service used before the investigation, taken from your deployment manifest or configuration management rather than from memory. Remove the synchronous CUDA launch variable (CUDA_LAUNCH_BLOCKING) from the container environment and any wrapper script, and set the log level back to the value your logging policy requires. Check the running process or pod spec afterward, because a value set in a shell session or a sidecar can survive a redeploy you thought had cleared it.

If the investigation ended with a valid fix, confirm that CUDA graphs are enabled again by removing --enforce-eager from the startup command. Startup logs should show graph capture completing without the eager fallback. If you chose eager mode as a workaround instead of a fix, keep it in place, record it as a known performance cost, and link it to the upstream issue or internal ticket so someone revisits it at the next vLLM upgrade. Do not assume a fix made under eager mode holds once graphs are back, because the failing path was never exercised with graphs active. Confirm the exact vLLM version you are running against the release notes before you decide.

Record the before and after configuration in change control, including the image tag, the full command line, environment variables, log level and the reason each debug setting was applied and removed. Then run a load test that resembles production traffic, with the same model, context lengths and concurrency, and compare errors, latency and memory use with your pre-incident baseline. Only return the service to production traffic once the load test passes and the crash signature has not reappeared. Keep the debug configuration and its logs attached to the change record so a future reviewer can see what was tested and what was not.

Questions teams ask before debugging vLLM crashes

How much effort does debugging a vLLM crash take?

Effort depends mostly on whether the crash reproduces on demand. A crash that appears once a day under mixed traffic can take far longer to pin down than one triggered by a fixed prompt set. The main drivers are how easily the failure can be reproduced, how much access the investigator has to the hosts that failed, how many models and vLLM versions are in use, and how many accelerator types the fleet mixes. Each additional model, image tag or GPU generation multiplies the cases to test. Ask any provider to scope the work by reproduction path first: a confirmed trigger with logs and a pinned environment is a much smaller job than an open-ended search across production traffic. Effort also rises when the team cannot change the serving configuration during business hours, because each experiment then waits for a maintenance window.

Can an internal team debug vLLM crashes without outside help?

Yes, many teams can, provided they have engineers who are comfortable with CUDA, PyTorch and Linux process behavior, and a non-production GPU host that matches production. The method is systematic: capture the exact command line, version and hardware, reproduce with a fixed request set, test with CUDA graphs disabled using --enforce-eager, raise log verbosity, and run with synchronous CUDA launches to locate the failing call. The harder part is the evidence package for an upstream issue, which needs a minimal reproducer and clean logs. Teams without GPU engineering experience often spend most of their time on setup rather than diagnosis. A partner can help where internal staff lack that depth or lack spare hardware, but the internal team still needs to own the outcome after handover.

What does a crash investigation need from our team?

Plan for four inputs. First, access to the hosts that crashed, including container runtime details, driver version, GPU model and the vllm serve command line with its flags. Second, logs from the failing period, including the engine output and the system kernel log where GPU resets appear. Third, a test environment with the same accelerator type and a copy of the same vLLM version, so experiments do not touch live traffic. Fourth, the model weights and tokenizer files, or the exact repository and revision used. Access to the model may need approval if it is gated or licensed. Teams should also name one owner who can approve configuration changes and restarts. Without these inputs, the investigation mostly becomes guesswork about the environment.

Does vLLM have a paid support tier for crashes?

The vLLM project has no paid edition. It is licensed under Apache-2.0, and the cost of running it comes from accelerator capacity, the surrounding infrastructure, implementation and the people who operate it. Support for crashes therefore comes from your own engineers, from the community project's public channels, or from a services provider you contract separately. Before you rely on any of these, confirm with the provider what response they commit to, who will look at a report, and whether they can work inside your network. The project's release cadence matters here too: new minor releases arrive about every two weeks, so a fix may already exist in a newer version, and upgrading is itself a change to validate.

How long does a vLLM crash investigation take?

No fixed duration applies to every crash, and any figure quoted without a reproduction path should be questioned. The duration is driven by how quickly the crash can be triggered, how many configurations must be compared, whether the failure is in the engine or in the model or driver, and whether the team can run experiments on matching hardware. A crash that reproduces with --enforce-eager disabled and clears when it is enabled narrows the search quickly. A crash tied to a driver mismatch or a specific GPU generation can take longer because it needs hardware access. Ask for milestones: reproduction confirmed, isolation to a flag or component, a minimal reproducer, and a validated fix or workaround.

When should we bring in a partner for vLLM crash debugging?

Bring in a partner when the crash affects production and your team lacks GPU debugging depth, spare matching hardware or time to run experiments safely. Other good reasons include a crash that spans several models or versions, a need for a formal evidence package for an upstream issue, or a requirement to document the work for a compliance review. DeployOpen implements and supports self-hosted open-source platforms in the client's own infrastructure, so work can stay inside your accounts, data centers or air-gapped networks. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. Ask any provider for the scope in writing, the access they will need, and how they will hand over the fix and the debug settings they turned on.

Can debug settings stay on in production after an investigation?

They should not. Settings such as --enforce-eager, raised log levels and synchronous CUDA launches all cost performance or add log volume, and synchronous launches exist to find failing calls, not to serve traffic. Record each change, the time it was made and the reason, then revert them in a controlled restart and confirm throughput and latency return to the baseline. Logs captured during debugging may contain prompts or user data, so handle them under your data retention rules and restrict who can read them. Keep the reverted configuration in version control so the production state is reproducible.

How DeployOpen works on this

DeployOpen starts with the crash evidence your team already has, then isolates whether CUDA graph capture, the engine configuration or the workload is involved. The work runs inside your own infrastructure, so logs, dumps and reproduction steps stay under your control while the fix is tested and handed back.

How we scope

  • Engagements are fixed-scope, with the crash signatures, vLLM version, hardware and environments agreed in writing before work starts.
  • The written scope names which reproduction runs, log levels and evidence bundles are in and which upstream fixes are out.
  • We confirm your current vLLM release, CUDA and driver versions, and whether production traffic can be replayed in a test environment.

How we build

  • We reproduce the crash with CUDA graphs on and off, using the same model, flags and request pattern as the failing run.
  • We enable debug logging and synchronous CUDA launches in a test environment, then record where the first illegal state appears.
  • We check each change against the scoped reproduction and document which setting, workload or version isolates the fault.

How we hand over

  • You receive a written report with the reproduction steps, the logs and traces collected, and the isolation results for each setting tested.
  • We prepare an upstream issue draft with the vLLM version, hardware details and sanitized logs, ready for your team to file.
  • We provide a runbook that restores production log levels, removes debug flags and confirms the server returns to its intended configuration.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, so recurring crashes after a vLLM release can be retested.
  • Your team can ask us to rerun the reproduction when you move to a newer vLLM release listed in the project's release notes.
  • Questions about the handover, the evidence bundle or the restored configuration are covered in the agreed scope during the engagement.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.