crashes with zend_mm_heap corrupted #1
Description
To test I used a Kubernetes cluster running two memcached servers and the following image:
https://quay.io/repository/egroupware/php_ius/image/0a841b570d7cdd5be81dc83dea8552e26291a670d08aaeb6feae2c14a8d13470
I run the following test with memcached session-handler and default files:
bash-3.2$ kubectl run test --image=quay.io/egroupware/php_ius:7.0.15 -it --restart=Never
Waiting for pod default/test to be running, status is Pending, pod ready: false
If you don't see a command prompt, try pressing enter.
[root@test /]# php -a
Interactive shell
php > var_dump(ini_get('session.save_handler'));
string(9) "memcached"
php > var_dump(ini_get('session.save_path'));
string(33) "memcached1:11211,memcached2:11211"
php > var_dump(session_start());
PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at php shell code:1) in php shell code on line 1
PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at php shell code:1) in php shell code on line 1
bool(true)
# The 2 Warnings are expected running the test on cli!
php > $_SESSION['test'] = true;
php > var_dump($_SESSION['test']);
bool(true)
php > var_dump($id = session_id());
string(26) "16qkk8kn469288365p2egg7bk6"
php > session_write_close();
# now reopening the session
php > session_id($id); var_dump(session_start());
PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at php shell code:1) in php shell code on line 1
zend_mm_heap corrupted
[root@test /]#
Reopening the session fails and crashes php. As a test I run the same code with default session-handler files:
[root@test /]# php -a
Interactive shell
php > ini_set('session.save_handler', 'files');
php > ini_set('session.save_path', '/tmp');
php > var_dump(session_start());
bool(true)
php > var_dump($id=session_id());
string(26) "i31fegutibh77478jhrb92paj3"
php > $_SESSION['test']=true;
php > session_write_close();
# reopening the session
php > var_dump(session_id($id));
string(26) "i31fegutibh77478jhrb92paj3"
php > var_dump(session_start());
PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at php shell code:1) in php shell code on line 1
PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at php shell code:1) in php shell code on line 1
bool(true)
php > var_dump($_SESSION['test']);
bool(true)
With default session-handler files, sessions work as expected.
I got the same result with a single memcached server, if php-memcached would be - in contrary what it's developer says - affected by the php-memcache (no d!) bug with multiple servers allocating 4GB of ram.
Could it be that lowering/easing the libmemcached dependency caused that?
0f1cf6d
I remember someone mentioned the new libmemcached version was required and that was also what Remi required.
I believe you wanted to build a newer version, thought I could not find it and used the stock one coming with current CentOS7 (1.0.16).
I'm happy to test with a current libmemcached, if you build it.
Or do you have any other idea what I could test or what's going wrong.
Ralf