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 902432

Summary: Exceeding nofile resource-limit corrupts event-loop
Product: Red Hat Enterprise Linux 6 Reporter: Jeremy Sowden <jeremy>
Component: memcachedAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3CC: lpol, ovasik, thozza
Target Milestone: rcKeywords: FastFix
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: memcached-1.4.4-4.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-21 09:23:14 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:
Bug Depends On:    
Bug Blocks: 947775, 1070830, 1159820, 1373253    

Description Jeremy Sowden 2013-01-21 16:39:13 UTC
Description of problem:

If memcached reaches the nofile resource-limit and accept(2) fails with EMFILE, it stops listening until an existing connexion is closed.  However, the code that calls listen again is run in a separate thread from the one that accepts new connexions, which leads to a race-condition and the possible corruption of the event-loop.

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


How reproducible:

Start memcached and then open and close enough simultaneous connexions to cause it repeatedly to stop and start listening.

Steps to Reproduce:
1. Run memcached: memcached -p 2300 -v 2>&1 | tee memcached.log
2. Run a client that repeatedly opens and closes lots of connexions: for i in {1..32} ; do ./test dev01:2300 & done
  
Actual results:

Eventually memcached will exit.  For example:
$ tail -16 memcached.log
Too many open connections
Failed to write, and not due to blocking: Broken pipe
Too many open connections
Too many open connections
Too many open connections
Too many open connections
Too many open connections
Too many open connections
Too many open connections
Too many open connections
Too many open connections
Too many open connections
Too many open connections
Too many open connections
Too many open connections
[err] event_queue_remove: 0x1d7b1b8(fd 26) not on queue 8

Expected results:

memcached should continue running.

Additional info:

Upstream have a fix:

https://github.com/memcached/memcached/commit/ac939723874f1ebe1f0738af3855e81c026e9bc4

Comment 1 RHEL Program Management 2013-10-14 00:04:01 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 7 errata-xmlrpc 2017-03-21 09:23:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0595.html