Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-1865

uninitialized buffer cause Monitor abort in CentOS 7

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • 2.0-incubating
    • foundation
    • None

    Description

      sqstart failed on CentOS.
      The Monitor process abort in CProcessContainer::CProcessContainer() due to failed to create semaphore.

      //create & initialize existing semaphore
      char sem_name[MAX_PROCESS_PATH];
      snprintf(sem_name,sizeof(sem_name), "/monitor.sem.%s", getenv("USER"));
      Mutex = sem_open(sem_name,O_CREAT,0644,0);
      if(Mutex == SEM_FAILED)

      { char buf[MON_STRING_BUF_SIZE]; snprintf(buf, sizeof(buf), "[%s], Can't create semaphore %s!\n", method_name, sem_name); mon_log_write(MON_PROCESSCONT_PROCESSCONT_3, SQ_LOG_ERR, buf); sem_unlink(sem_name); abort(); }

      sem_name is not initialized and snprintf will not add \0 after copy required bytes.

      Attachments

        Issue Links

          Activity

            People

              ovis_poly liu ming
              ovis_poly liu ming
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment