If I run the core Block tests without memcache configured all tests pass, but with memcache configured, the following tests fail:

Block cache clear removes stale cache data. Other block.test 547 BlockCacheTestCase->testCachePerRole() Fail
Fresh block content is displayed after clearing the cache. Other block.test 548 BlockCacheTestCase->testCachePerRole() Fail
User with the same roles sees per-role cached content. Other block.test 560 BlockCacheTestCase->testCachePerRole() Fail
Block is served from the per-role cache. Other block.test 568 BlockCacheTestCase->testCachePerRole() Fail

Comments

markpavlitski’s picture

@lambic Can you re-test this using the latest 7.x dev release?

If the issue still occurs, please can you post the following details:

- Your memcache configuration from settings.php
- Which PECL library and version you use
- Your PHP version

lambic’s picture

Yes I get the same issues with the dev release.

Config:

'memcache_servers' => array('localhost:11211' => 'default'),
'memcache_bins' => array(
'cache' => 'default',
'cache_form' => 'database'
),
'cache_backends' => array('sites/all/modules/contrib/memcache/memcache.inc'),
'cache_default_class' => 'MemCacheDrupal',
'cache_class_cache_form' => 'DrupalDatabaseCache',
'memcache_prefix' => 'q7testing',

PHP version 5.4.15, memcache library 3.0.8, memcached 1.4.5

markpavlitski’s picture

Version: 7.x-1.0 » 7.x-1.x-dev

Confirmed in latest 7.x dev

jeremy’s picture

Version: 7.x-1.x-dev » 7.x-1.1-beta3
Priority: Normal » Major
Issue summary: View changes

I'm still seeing 5 failures in the block tests with 7.x-1.1-beta3 memcache enabled, versus 0 failures with memcache disabled.

markpavlitski’s picture

Assigned: Unassigned » markpavlitski

I'm trying to trace the root cause of this. It's possibly a cross-page/session issue in the cache_clear_all() implementation.

markpavlitski’s picture

Version: 7.x-1.1-beta3 » 7.x-1.x-dev
Assigned: markpavlitski » Unassigned

I've not yet been able to recreate it outside of simpletest.

The issue still occurs when only cache_block is mapped to Memcache.

I'll have to come back to this next week.

Confirmed in 1.1-beta4 and latest dev.

basic’s picture

jeremy’s picture

@basic are we using 7.x-1.0, or the latest 7.x-1.x-dev, or another version atm on d.o?

basic’s picture

Looks like we're running

; Information added by drupal.org packaging script on 2013-10-01
version = "7.x-1.0+22-dev"
jeremy’s picture

Is it possible for you to test 7.x-1.1-beta5 and see if the problem persists? (The block test still fails in this -beta, so upgrading may not fix anything, bot LOTS of other fixes have gone in since the version you're running with, and it would be nice to confirm that this is in fact the problem, to properly set the priority of this issue.)

basic’s picture

I'm working on memcache for Drupal.org staging and dev, we'll need to test there and deploy Wednesday or Thursday when drumm is back.

basic’s picture

7.x-1.1-beta5+1-dev is deployed in production now, but issue #2147745: Updating book page does not invalidate book nav block Assigned to: basic persists. Any ideas?

jeremy’s picture

I'm trying to carve some time to fix this issue, and then hopefully you can retest.

basic’s picture

@Jeremy

Would it be helpful to get you a drupal.org dev site to test on? I still need to pin down ways to reproduce on dev which may help narrow down the issue. It seems like it may be related to using multiple servers for memcache bins.

jeremy’s picture

We'll see first if tracking down and fixing this Simpletest failure solves your problem (in my queue). If not, a dev site may help.

jeremy’s picture

Priority: Major » Normal

I've confirmed this failure is not caused by memcache, but the block.test / simpletest. When block.test testCachePerRole() invokes cache_clear_all() core's built-in database cache handler is being called, and thus it's clearing the (already empty) database table not memcache.

More time could be spent making the core block.test compatible with memcache, so I won't close this, but it's no longer a release blocker.

@basic, this is therefor unrelated to your bug, perhaps you can show me here in DrupalCon Austin how to duplicate your issue?

jeremy’s picture

Title: Memcache causes core block tests to fail » Core block test fails as it's not properly flushing memcache
japerry’s picture

Status: Active » Closed (outdated)

Closing as Drupal 7 is no longer supported.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.