Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 892406

Summary: select() sys call times out on rhel6.1 and rhel6.3
Product: Red Hat Enterprise Linux 6 Reporter: mjin <mjin>
Component: kernelAssignee: Red Hat Kernel Manager <kernel-mgr>
Status: CLOSED NOTABUG QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: wili
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-11 15:01:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
test source none

Description mjin 2013-01-07 02:24:55 UTC
Created attachment 673664 [details]
test source

Description of problem:


Version-Release number of selected component (if applicable):

select() sys call times out. customer made a test scription(attached sctp_test_source.tar.gz), and tested it on rhel5.5/rhel6.1/rhel6.2/rhel6.3.

Issue only happens on rhel6.1,

How reproducible:

always

Steps to Reproduce:
test it with uploaded script
  
Actual results:

select() sys cal times out.

Expected results:

select() syscal shouldn't times out.
Additional info:

Comment 3 Petr Pisar 2013-01-07 12:49:51 UTC
First, this has nothing to do with `time' package. Reassigning to kernel.

Second, the function with select() reads:

{
    fd_set rfds;
    struct timeval tv;
    int nRtn;

    //m_plsMutexLock->Lock();

    FD_ZERO(&rfds);
    FD_SET(m_nSock, &rfds);

    /* Wait up to five seconds. */
    //tv.tv_sec = 40;
    tv.tv_sec = 1;
    tv.tv_usec = 0;

    nRtn = select(m_nSock+1, &rfds, NULL, NULL, &tv);
    //m_plsMutexLock->UnLock();
    if(nRtn>0)
    {
      ...
    }
    else
    {
        printf("[%20s:%20s:%5d] select timeout[%d:%d]\n",__FILE__,__func__,__LINE__,nRtn,m_nSock);
    }
...
}

The else-branch is wrong because it captures negative select() return value too. You can get -1 if select() is interrupted by signal or if other error occurs. Only `0' return value represents time-out.

Comment 4 Prarit Bhargava 2013-01-11 15:01:56 UTC
> Issue only happens on rhel6.1

Please upgrade to (at least) rhel6.2.

P.