NVIDIA / NVIDIA/TensorRT

Destroying a runtime before destroying deserialized engines created by the runtime leads to undefined behavior

Open
#4,436 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

internal-bug-tracked Module:Documentation triaged
Dominant language
C++
Stars
13.4k
Forks
2.4k
Avg merge
5d 3h
Merged PRs (30d)
2

Description

TRT: 3: [runtime.cpp::~Runtime::346] Error Code 3: API Usage Error (Parameter check failed at: runtime/rt/runtime.cpp::~Runtime::346, condition: mEngineCounter.use_count() == 1. Destroying a runtime before destroying deserialized engines created by the runtime leads to undefined behavior.
)

The log message is clear enough...if you have logging enabled. But I wasn't able to find this restriction anywhere in the C++ API documentation. It should be documented.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No documentation file or test is named. Start by locating the C++ API documentation for runtime creation and engine deserialization, then document that deserialized engines must be destroyed before their runtime; done when the lifecycle restriction is clearly stated where users learn these APIs.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.