Browse Source

update session manage

tags/v1.1.0
taoxiangdong 3 years ago
parent
commit
149aa07034
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      ge/common/debug/memory_dumper.cc
  2. +1
    -1
      ge/session/session_manager.cc

+ 1
- 1
ge/common/debug/memory_dumper.cc View File

@@ -154,7 +154,7 @@ int MemoryDumper::OpenFile(const char *filename) {
// Using the O_EXCL, if the file already exists,return failed to avoid privilege escalation vulnerability.
mmMode_t mode = M_IRUSR | M_IWUSR;

int32_t fd = mmOpen2(real_path.c_str(), M_WRONLY | M_CREAT | O_TRUNC, mode);
int32_t fd = mmOpen2(real_path.c_str(), M_RDWR | M_CREAT | O_TRUNC, mode);
if (fd == EN_ERROR || fd == EN_INVALID_PARAM) {
GELOGE(kInvalidFd, "open file failed. errno = %d, %s", fd, strerror(errno));
return kInvalidFd;


+ 1
- 1
ge/session/session_manager.cc View File

@@ -173,7 +173,7 @@ Status SessionManager::AddGraph(SessionId session_id, uint32_t graph_id, const G
Status SessionManager::AddGraphWithCopy(SessionId session_id, uint32_t graph_id, const Graph &graph,
const std::map<std::string, std::string> &options) {
if (!init_flag_) {
GELOGE(GE_SESSION_MANAGER_NOT_INIT);
GELOGE(GE_SESSION_MANAGER_NOT_INIT, "Session manager is not initialized.");
return GE_SESSION_MANAGER_NOT_INIT;
}
SessionPtr innerSession = nullptr;


Loading…
Cancel
Save