awslabs / aws-elasticache-cluster-client-memcached-for-php

Amazon ElastiCache Cluster Client is an enhanced PHP library to connect to ElastiCache clusters. This client library has been built upon libmemcached and is released under the Apache License.
Other
62 stars 33 forks source link

Segfault when using persistent connection on 5.6 #8

Open jamesrwhite opened 8 years ago

jamesrwhite commented 8 years ago

Hi,

We're seeing the elasticache extension segfault when we enable persistent connections using the $persistent_id param to Memcached::__construct(); as documented on http://php.net/manual/en/memcached.construct.php.

We're using PHP 5.6 on Ubuntu 14.04, via this ppa https://launchpad.net/~ondrej/+archive/ubuntu/php.

The actual message we see in /var/log/messages is:

Sep 14 13:07:15 some-internal-hostname.net kernel: [411876.710620] php-fpm5.6[7576]: segfault at 7f45bb79b358 ip 00007f45af326cb5 sp 00007ffc4cf92220 error 4 in amazon-elasticache-cluster-client.so[7f45af302000+52000]

Let me know if there's any additional info I can provide to help debug this.

Thanks!

QuChen88 commented 8 years ago

Interesting. I launched an instance with Ubuntu 14.04 and installed PHP5.5 and the cluster client. I did the following and it went fine.

php -a Interactive mode enabled

php > $m = new Memcached('persistence_pool'); php >

Are you still seeing this issue? I can try installing PHP 5.6 and try it out.

QuChen88 commented 8 years ago

Yes, worked for me on PHP 5.6 as well.

php -v PHP 5.6.23-1+deprecated+dontuse+deb.sury.org~trusty+1 (cli) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

php -a Interactive mode enabled

php > $m = new Memcached(); php > $m = new Memcached('persistence_pool'); php >

jamesrwhite commented 8 years ago

Interesting. The only differences I can see is that I saw this issue via FPM, I didn't try from the CLI but I'll give that a go tomorrow. Also I think you're using a slightly different install source for PHP, perhaps the issue lies there? https://launchpad.net/~ondrej/+archive/ubuntu/php5-5.6 (yours) vs https://launchpad.net/~ondrej/+archive/ubuntu/php (mine).

jamesrwhite commented 8 years ago

I can't reproduce it via the cli, our exact version is:

PHP 5.6.27-1+deb.sury.org~trusty+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
    with Suhosin v0.9.38, Copyright (c) 2007-2015, by SektionEins GmbH