[Bug 637114] Re: Large multiget requests randomly broken

Clint Byrum clint at fewbar.com
Wed Nov 30 07:06:50 UTC 2011


Uploaded fix to lucid-proposed.

** Changed in: memcached (Ubuntu Lucid)
       Status: Triaged => Fix Committed

** Description changed:

+ == SRU REPORT ==
+ 
+ IMPACT: users who try to use memcached with large multi-gets will get a
+ cache miss every time.
+ 
+ TEST CASE:
+ 
+ * install php5-cli and php5-memcached
+ * run this code using 'php':
+ 
+ $m = new Memcached();
+ $m->addServer('localhost', 11211);
+ $keys = array();
+ for ($i=0; $i<50000; $i++) {
+   $key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx::foo::' . $i;
+   $keys[] = $key;
+ }
+ $result = $m->getMulti($keys, $cas);
+ var_dump($result, $cas);
+ var_dump($m->getResultCode());
+ 
+ * Result if affected by bug will be:
+ bool(false)
+ NULL
+ int(19)
+ 
+ * Result if fixed will be:
+ 
+ array(0) {
+ }
+ array(0) {
+ }
+ int(0)
+ 
+ REGRESSION POTENTIAL: This change makes the patch *more* like the
+ upstream fix, which has been in every version of memcached since Ubuntu
+ 10.10, and has not caused regressions.
+ 
+ ======
+ 
+ 
  Binary package hint: memcached
  
  * Ubuntu release.
  
-   Description:    Ubuntu 10.04 LTS
-   Release:        10.04
+   Description:    Ubuntu 10.04 LTS
+   Release:        10.04
  
  * How to reproduce the bug?
  
  Send several large multiget requests to a Ubuntu 1.4.2 Memcached server,
  and you'll notice that some of them will break, and other will return
  only a subset of the requested keys. You can use the following PHP test
  code:
  
  $m = new Memcached();
  $m->addServer('localhost', 11211);
  $keys = array();
  for ($i=0; $i<50000; $i++) {
-   $key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx::foo::' . $i;
-   $keys[] = $key;
+   $key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx::foo::' . $i;
+   $keys[] = $key;
  }
  $result = $m->getMulti($keys, $cas);
  var_dump($result, $cas);
  var_dump($m->getResultCode());
  
- 
  * How to fix de bug?
  
  Rebuilding the server without the  fix-issue-102-segfault & fix-ubuntu-
  ftbfs patches fixes that bug for us.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to memcached in Ubuntu.
https://bugs.launchpad.net/bugs/637114

Title:
  Large multiget requests randomly broken

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/memcached/+bug/637114/+subscriptions



More information about the Ubuntu-server-bugs mailing list