Bug 1391201

Summary: Unable to start when MAXCONN configured for > 1024
Product: [Fedora] Fedora Reporter: hguemar
Component: memcachedAssignee: Paul Lindner <lindner>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: jorton, lindner, matthias, mlichvar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: memcached-1.4.34-1.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-22 09:57:09 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:
Attachments:
Description Flags
Patch to spec file none

Description hguemar 2016-11-02 19:03:32 UTC
Created attachment 1216710 [details]
Patch to spec file

Description of problem:

While rebuilding memcached for RDO, we found out this issue in upstream CI.
Upstream ticket has been created: https://github.com/memcached/memcached/issues/218

Version-Release number of selected component (if applicable):
memcached-1.4.33-2.fc26

How reproducible:
Always

Steps to Reproduce:
1.  https://gist.github.com/dmsimard/174971182870d03394f3f2223cf59412
Alternatively
1. change limits in /etc/sysconfig/memcached
2. systemctl restart memcached

Actual results:
crashes

Expected results:
shoyuld run

Additional info:
We fixed it in RDO package, distgit patch is attached

Comment 1 Matthias Saou 2016-11-03 10:05:59 UTC
Note that in these systemd times, it would probably be best to use "User=memcached" from the unit file, as with the increased LimitNOFILE the process doesn't need to be started as root to be able to increase that system value itself.

The upside is that the CapabilityBoundingSet change is no longer relevant.

The downside is for people editing the sysconfig file to run memcached as a user different from "memcached"... I honestly think no one does that, and even then, it would be as easy to add a User=foo than it is to modify the sysconfig file.

I have been using User=memcached myself for a while, because I also add RuntimeDirectory=memcached in order to use UNIX sockets created inside /run/memcached/ instead of TCP. And I had needed to increase LimitNOFILE too.

Comment 2 Fedora End Of Life 2017-02-28 10:32:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 3 Miroslav Lichvar 2017-03-22 09:57:09 UTC
It seems this was addressed in 1.4.34 by adding the CAP_SYS_RESOURCE capatibility. Thanks!