Bug 762382 (GLUSTER-650) - log message says "pthread_cond_timedout returned nonzero value" even when the return value is zero
Summary: log message says "pthread_cond_timedout returned nonzero value" even when the...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-650
Product: GlusterFS
Classification: Community
Component: logging
Version: mainline
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Raghavendra Bhat
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-20 10:16 UTC by Raghavendra Bhat
Modified: 2010-02-20 12:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Anand Avati 2010-02-20 09:04:47 UTC
PATCH: http://patches.gluster.com/patch/2783 in master (fuse: check the return value of pthread_cond_timedwait before logging in fuse_thread_proc)

Comment 1 Raghavendra Bhat 2010-02-20 10:16:26 UTC
pthread_mutex_lock (&priv->child_up_mutex);
        {
                gettimeofday (&now, NULL);
                timeout.tv_sec = now.tv_sec + MAX_FUSE_PROC_DELAY;
                timeout.tv_nsec = now.tv_usec * 1000;

                while (priv->child_up_value) {

                        ret = pthread_cond_timedwait (&priv->child_up_cond,
                                                &priv->child_up_mutex,
                                                &timeout);
                        if (ret != 0)
                                break;

                }
        }
        pthread_mutex_unlock (&priv->child_up_mutex);

        gf_log (this->name, GF_LOG_DEBUG,
                " pthread_cond_timedout returned non zero value"
                " ret: %d errno: %d", ret, errno);


In the above code even the return value of pthread_cond_timeout is zero, the log message will be displayed as "pthread_cond_timedout returned non zero value" as it will be always executed after the unlock.


Note You need to log in before you can comment on or make changes to this bug.