Skip to content

memcached.sess_persistent causes zend_mm_heap corrupted #327

Closed
@carlwgeorge

Description

@carlwgeorge

The IUS project received a bug report against our new php70u-pecl-memcached package for EL7 (PHP 7.0.15, libmemcached 1.0.16). I was able to reproduce it on Fedora 25 (PHP 7.0.15, libmemcached 1.0.18).

Basic reproducer script (thanks @ralfbecker):

<?php
ini_set('session.save_handler', 'memcached');
ini_set('session.save_path', 'localhost:11211');
ini_set('memcached.sess_persistent', true);
session_start();
$_SESSION['test']=true;
session_write_close();
session_start();
var_dump($_SESSION);
session_write_close();
?>
$ php test.php 
zend_mm_heap corrupted
$ gdb --eval-command run --eval-command backtrace --batch --args php test.php 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
zend_mm_heap corrupted
[Inferior 1 (process 19051) exited with code 01]
No stack.

Removing the ini_set('memcached.sess_persistent', true); line allows the script to execute successfully.

Here are the installed packages.

$ rpm -qa | grep -e php -e memcached | sort
libmemcached-libs-1.0.18-7.fc24.x86_64
memcached-1.4.33-1.fc25.x86_64
php-cli-7.0.15-1.fc25.x86_64
php-common-7.0.15-1.fc25.x86_64
php-json-7.0.15-1.fc25.x86_64
php-pecl-igbinary-2.0.1-1.fc25.x86_64
php-pecl-memcached-3.0.2-1.fc25.x86_64
php-pecl-msgpack-2.0.1-1.fc25.x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions