Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Memcached with persitent connections segfaults #27299

Copy link
Copy link
Closed
@palex-fpt

Description

@palex-fpt
Issue body actions

Symfony version(s) affected: 4.0.0

Description
Enabling persistent connections for memcached provider, call to Memcached::createConnection starts throw segfault.

How to reproduce

public function testPersistentConnectionCreation()
	{
		/** @var \Memcached $instance */
		$instance = MemcachedCache::createConnection("memcached://localhost", ['persistent_id' => 'persistent']);
		$this->assertCount(1, $instance->getServerList());

		$instance = MemcachedCache::createConnection("memcached://localhost", ['persistent_id' => 'persistent']);
		$this->assertCount(1, $instance->getServerList()); // fail here. 

		// disabling previous assert leads to segfault due libmemcached-1.0.18 bug
		$instance = MemcachedCache::createConnection("memcached://localhost", ['persistent_id' => 'persistent']);
		$this->assertCount(1, $instance->getServerList());
	}

Possible Solution
MemcachedTrait::createConnection should not add server to lists of servers when connection is not pristine and its servers list equals to configuration list

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.