|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59664 Issues with session_redundancy
Submitted: 2011-03-11 08:42 UTC Modified: 2021-03-25 16:43 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: ezequiel dot lara at mpt dot es Assigned: cmb (profile)
Status: Closed Package: memcache (PECL)
PHP Version: 5.3.5 OS: Fedora 14 x86_64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
16 - 9 = ?
Subscribe to this entry?

 [2011-03-11 08:42 UTC] ezequiel dot lara at mpt dot es
I have found several issues with session redundancy: 

- With three servers configured in session.save_path , and session_redundancy set to 3, the session gets only stored in two of them. 

I have verified this by starting three servers on localhost verbosely on different ports (with /etc/hosts aliases); I only see traffic in two of them. 

- Afterwards, when at least one of the two servers in use is stopped or cannot be resolved, I always get a crash. Possibly related to 13623 . 

Currently I have APC active but it crashes with and without it.Crash is also independent of the handler, it crashes similarly with both apache 2.0 handler , apache zts handler and fcgid + php-cgi. 

Therefore with session redundancy I get lowered availability instead of the opposite !! :) 

php 5.3.5 (cgi and apache) from Fedora 14 x86_64 with updates repo, extension version 3.0.5 , memcached 1.4 . I can reproduce this with hand-compiled php and rhel 5.4 , I just did it on Fedora for being easier to test and debug. 

Expected result:
Same session stored in the three servers. 

Actual result:
gdb backtrace of php-cgi: 
2018		if (ZEND_MM_IS_FREE_BLOCK(next_block)) {
(gdb) bt
#0  _zend_mm_free_int (heap=0x29d5320, p=0x2bcf0f0)
    at /usr/src/debug/php-5.3.5/Zend/zend_alloc.c:2018
#1  0x00007f73714290fb in mmc_buffer_free (request=0x2bcf100)
    at /usr/src/debug/php-pecl-memcache-3.0.5/memcache-3.0.5/memcache_pool.c:50
#2  mmc_request_free (request=0x2bcf100)
    at /usr/src/debug/php-pecl-memcache-3.0.5/memcache-3.0.5/memcache_pool.c:169
#3  0x00007f737142a6ca in mmc_pool_free (pool=0x2bcabd0)
    at /usr/src/debug/php-pecl-memcache-3.0.5/memcache-3.0.5/memcache_pool.c:928
#4  0x00007f73714316b1 in ps_close_memcache (mod_data=0x93cce0)
    at /usr/src/debug/php-pecl-memcache-3.0.5/memcache-3.0.5/memcache_session.c:185
#5  0x00000000004b99e5 in php_session_save_current_state ()
    at /usr/src/debug/php-5.3.5/ext/session/session.c:624
#6  php_session_flush () at /usr/src/debug/php-5.3.5/ext/session/session.c:1516
#7  0x00000000004b9cb7 in zm_deactivate_session (type=<value optimized out>, 
    module_number=<value optimized out>)
    at /usr/src/debug/php-5.3.5/ext/session/session.c:2170
#8  0x00000000005b5b2c in module_registry_cleanup (module=<value optimized out>)
    at /usr/src/debug/php-5.3.5/Zend/zend_API.c:2150
#9  0x00000000005bc78c in zend_hash_reverse_apply (ht=0x941620, 
    apply_func=0x5b5b10 <module_registry_cleanup>)
    at /usr/src/debug/php-5.3.5/Zend/zend_hash.c:758
#10 0x00000000005af25d in zend_deactivate_modules ()
    at /usr/src/debug/php-5.3.5/Zend/zend.c:866
#11 0x000000000055d2a5 in php_request_shutdown (dummy=<value optimized out>)
    at /usr/src/debug/php-5.3.5/main/main.c:1607
#12 0x00000000006437cd in main (argc=1, argv=0x7fff39fb01a8)
    at /usr/src/debug/php-5.3.5/sapi/cgi/cgi_main.c:2159


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-15 05:10 UTC] ezequiel dot lara at mpt dot es
First issue related to bug 16061.
 [2013-04-04 13:39 UTC] giacomo at boticca dot com
It looks like the bugs have been renumbered, bug 16061 referred above is now 
 [2021-03-25 16:43 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-03-25 16:43 UTC]
The official bug tracker for PECL/memcache is now at

So, if this is still an issue with either of the current memcache
versions (4 or 8), please file an issue there.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat May 15 03:01:23 2021 UTC