Activity log for bug #795673

Date Who What changed Old value New value Message
2011-06-10 18:29:32 trent strong bug added bug
2011-06-10 20:47:55 Clint Byrum memcached (Ubuntu): status New Confirmed
2011-06-10 20:48:27 Clint Byrum memcached (Ubuntu): importance Undecided Medium
2011-06-10 20:48:34 Clint Byrum bug added subscriber Clint Byrum
2012-02-09 22:05:22 Clint Byrum memcached (Ubuntu): status Confirmed In Progress
2012-02-09 22:05:24 Clint Byrum memcached (Ubuntu): assignee Clint Byrum (clint-fewbar)
2012-02-09 22:55:34 Clint Byrum description Binary package hint: memcached I have noticed that sometimes on a production memcached service the restart command is not always reliable. If the memcached process has allocated a lot of memory, it sometimes take a little while to shut down. The init.d script seems to approach this by inserting a "sleep 1" between the stop and start operations, but that's not always enough. When the memcached service is started again it will fail to start with the error "failed to listen on TCP port XXXXX: Address already in use" since the dying process still owns the port. Release: Ubuntu 10.10 memcached: Installed: 1.4.5-1ubuntu1 Candidate: 1.4.5-1ubuntu1 Version table: *** 1.4.5-1ubuntu1 0 500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ maverick/main amd64 Packages 100 /var/lib/dpkg/status TEST CASE: 1. install memcached and python-memcache 2. edit /etc/memcached.conf and change -m 64 to -m 640 3. sudo service memcached restart 4. Run the following test script with '300000' as an argument #!/usr/bin/python import memcache import sys mc = memcache.Client(['127.0.0.1:11211'], debug=1) i=0 while i < int(sys.argv[1]): mc.set("key_%09d" % i, "A" * 1024) i += 1 5. Run the script again, with 1000000 with & to background it 6. sudo service memcached restart 7. verify that memcached is running (pidof memcached). If it is not, then this bug exists. As this is a race condition, you may have to repeat steps 4 through 7 a few times before you reproduce the issue. On precise, it took about 15 tries. If you have the older version of /etc/init.d/memcached which does 'sleep 1' in it, then you can make it more likely by removing the sleep 1. ---- Binary package hint: memcached I have noticed that sometimes on a production memcached service the restart command is not always reliable. If the memcached process has allocated a lot of memory, it sometimes take a little while to shut down. The init.d script seems to approach this by inserting a "sleep 1" between the stop and start operations, but that's not always enough. When the memcached service is started again it will fail to start with the error "failed to listen on TCP port XXXXX: Address already in use" since the dying process still owns the port. Release: Ubuntu 10.10 memcached:   Installed: 1.4.5-1ubuntu1   Candidate: 1.4.5-1ubuntu1   Version table:  *** 1.4.5-1ubuntu1 0         500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ maverick/main amd64 Packages         100 /var/lib/dpkg/status
2012-02-09 23:40:13 Launchpad Janitor memcached (Ubuntu): status In Progress Fix Released
2012-02-09 23:41:53 Launchpad Janitor branch linked lp:ubuntu/memcached
2012-02-09 23:42:30 Clint Byrum nominated for series Ubuntu Lucid
2012-02-09 23:42:30 Clint Byrum bug task added memcached (Ubuntu Lucid)
2012-02-09 23:51:08 Clint Byrum memcached (Ubuntu Lucid): status New Triaged
2012-02-09 23:51:11 Clint Byrum memcached (Ubuntu Lucid): importance Undecided Medium
2012-02-10 01:20:34 Clint Byrum bug watch added http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=659300
2012-02-10 01:20:34 Clint Byrum bug task added memcached (Debian)
2012-02-10 04:44:14 Bug Watch Updater memcached (Debian): status Unknown New
2012-05-09 13:48:24 Bug Watch Updater memcached (Debian): status New Fix Committed
2012-05-19 17:59:02 Bug Watch Updater memcached (Debian): status Fix Committed Fix Released
2015-06-17 11:28:26 Rolf Leggewie memcached (Ubuntu Lucid): status Triaged Won't Fix