[jira] [Commented] (TRAFODION-1865) uninitialized buffer cause Monitor abort in CentOS 7

2016-03-09 Thread liu ming (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-1865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15188594#comment-15188594
 ] 

liu ming commented on TRAFODION-1865:
-

The root cause is incompatibility of glibc from CentOS 6 to CentOS 7. 
It has no relationship with uninitialized buffer.
The right solution is to build trafodion binary using gcc 4.8 under centOS 7 to 
run it on CentOS 7.
So close this jira now.

> uninitialized buffer cause Monitor abort in CentOS 7
> 
>
> Key: TRAFODION-1865
> URL: https://issues.apache.org/jira/browse/TRAFODION-1865
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: foundation
>Reporter: liu ming
>Assignee: liu ming
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TRAFODION-1865) uninitialized buffer cause Monitor abort in CentOS 7

2016-03-03 Thread liu ming (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-1865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15179225#comment-15179225
 ] 

liu ming commented on TRAFODION-1865:
-

the problem is not caused by 'uninitialized buffer, the title is not proper. 
Will continue to work on this.

> uninitialized buffer cause Monitor abort in CentOS 7
> 
>
> Key: TRAFODION-1865
> URL: https://issues.apache.org/jira/browse/TRAFODION-1865
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: foundation
>Reporter: liu ming
>Assignee: liu ming
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TRAFODION-1865) uninitialized buffer cause Monitor abort in CentOS 7

2016-03-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-1865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15179223#comment-15179223
 ] 

ASF GitHub Bot commented on TRAFODION-1865:
---

Github user traflm closed the pull request at:

https://github.com/apache/incubator-trafodion/pull/353


> uninitialized buffer cause Monitor abort in CentOS 7
> 
>
> Key: TRAFODION-1865
> URL: https://issues.apache.org/jira/browse/TRAFODION-1865
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: foundation
>Reporter: liu ming
>Assignee: liu ming
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TRAFODION-1865) uninitialized buffer cause Monitor abort in CentOS 7

2016-03-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-1865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15175729#comment-15175729
 ] 

ASF GitHub Bot commented on TRAFODION-1865:
---

GitHub user traflm opened a pull request:

https://github.com/apache/incubator-trafodion/pull/353

[TRAFODION-1865] uninitialized buffer cause Monitor abort in CentOS 7

We tested on CentOS 7.2, by applying this change, sqstart success.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/traflm/incubator-trafodion TRAFODION-1865

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/353.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #353


commit dce27e574839c7f5f3f7fada71e0f10db4a6dff3
Author: Liu Ming 
Date:   2016-03-02T14:49:23Z

[TRAFODION-1865] uninitialized buffer cause Monitor abort in CentOS 7




> uninitialized buffer cause Monitor abort in CentOS 7
> 
>
> Key: TRAFODION-1865
> URL: https://issues.apache.org/jira/browse/TRAFODION-1865
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: foundation
>Reporter: liu ming
>Assignee: liu ming
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)