server icon indicating copy to clipboard operation
server copied to clipboard

Tensorrt_backend does not close plugin handle.

Open monsterlyg opened this issue 1 year ago • 1 comments

I found that int the tensorrt.cc in the tensorrt_backend repo, the handle is opened but not closed explicitly.

  if (cmdline.Find("plugins", &value)) {
      RETURN_IF_ERROR(value.AsString(&value_str));
      size_t pos = 0;
      std::string plugin;
      // Load individual plugins
      while (value_str.length() > 0) {
        pos = value_str.find(";");
        plugin = value_str.substr(0, pos);
        void* handle = nullptr;
        auto err = OpenLibraryHandle(plugin, &handle);
        if (err != nullptr) {
          LOG_MESSAGE(TRITONSERVER_LOG_ERROR, TRITONSERVER_ErrorMessage(err));
          TRITONSERVER_ErrorDelete(err);
          err = nullptr;
        }

        if (pos != std::string::npos) {
          pos++;
        }
        value_str.erase(0, pos);
      }
    }

monsterlyg avatar Dec 27 '23 13:12 monsterlyg

Thanks for reporting this issue. I have filed a ticket for the team to investigate.

Tabrizian avatar Jan 12 '24 23:01 Tabrizian