PHP Warning: Memcached::getMulti(): Memcached constructor was not called
Also:
PHP Warning: Memcached::add(): Memcached constructor was not called
from /srv/mediawiki/php-1.36.0-wmf.31/includes/libs/objectcache/MemcachedPeclBagOStuff.php(342) #0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array) #1 /srv/mediawiki/php-1.36.0-wmf.31/includes/libs/objectcache/MemcachedPeclBagOStuff.php(342): Memcached->getMulti(array) #2 /srv/mediawiki/php-1.36.0-wmf.31/includes/libs/objectcache/MediumSpecificBagOStuff.php(566): MemcachedPeclBagOStuff->doGetMulti(array, integer) #3 /srv/mediawiki/php-1.36.0-wmf.31/includes/libs/objectcache/wancache/WANObjectCache.php(508): MediumSpecificBagOStuff->getMulti(array) #4 /srv/mediawiki/php-1.36.0-wmf.31/includes/libs/objectcache/wancache/WANObjectCache.php(428): WANObjectCache->getMulti(array, array, array, integer) #5 /srv/mediawiki/php-1.36.0-wmf.31/includes/libs/objectcache/wancache/WANObjectCache.php(1447): WANObjectCache->get(string, integer, array, integer) #6 /srv/mediawiki/php-1.36.0-wmf.31/includes/libs/objectcache/wancache/WANObjectCache.php(1392): WANObjectCache->fetchOrRegenerate(string, integer, Closure, array, array) #7 /srv/mediawiki/php-1.36.0-wmf.31/includes/resourceloader/ResourceLoaderWikiModule.php(508): WANObjectCache->getWithSetCallback(string, integer, Closure, array) #8 /srv/mediawiki/php-1.36.0-wmf.31/includes/OutputPage.php(3014): ResourceLoaderWikiModule::preloadTitleInfo(ResourceLoaderContext, Wikimedia\Rdbms\MaintainableDBConnRef, array) #9 /srv/mediawiki/php-1.36.0-wmf.31/includes/OutputPage.php(3072): OutputPage->getRlClient() #10 /srv/mediawiki/php-1.36.0-wmf.31/includes/skins/SkinMustache.php(141): OutputPage->headElement(SkinVector) #11 /srv/mediawiki/php-1.36.0-wmf.31/includes/skins/SkinTemplate.php(146): SkinMustache->generateHTML() #12 /srv/mediawiki/php-1.36.0-wmf.31/includes/OutputPage.php(2631): SkinTemplate->outputPage() #13 /srv/mediawiki/php-1.36.0-wmf.31/includes/exception/MWExceptionRenderer.php(147): OutputPage->output() #14 /srv/mediawiki/php-1.36.0-wmf.31/includes/exception/MWExceptionRenderer.php(66): MWExceptionRenderer::reportHTML(WMFTimeoutException) #15 /srv/mediawiki/php-1.36.0-wmf.31/includes/exception/MWExceptionHandler.php(106): MWExceptionRenderer::output(WMFTimeoutException, integer) #16 /srv/mediawiki/php-1.36.0-wmf.31/includes/exception/MWExceptionHandler.php(185): MWExceptionHandler::report(WMFTimeoutException) #17 /srv/mediawiki/php-1.36.0-wmf.31/includes/exception/MWExceptionHandler.php(156): MWExceptionHandler::handleException(WMFTimeoutException, string) #18 [internal function]: MWExceptionHandler::handleUncaughtException(WMFTimeoutException) #19 {main}
Impact
Unclear. Not seen this before.
Notes
The warning comes from memcached-pecl internals.
- The stack trace is lacking an entry point, so I'm guessing this might be shutdown or post-send?
- Or maybe this is how rest.php errors are always reported? (I've not seen many of those).
- Also, given it's rest.php, why is this triggering a Skin response?
From a very brief look at internals it seems some internal state is lost and/or skipped.
- It could be that our code regressed and we're actually no longer calling the constructor when we should, but I'm gonna say that's very unlikely or the warning would be more common.
- It could be that it's a new bug or race condition introduced by upstream php and memcached-pecl that run on Debian Buster since we recently upgraded.
- It could be that the WMFTimeoutException might be happening in a destructor call during gargage collection and maybe the state was there but already lost?
- It could be that somehow WMFTimeoutException disrupted an assumed-atomic section in memcached-pecl and then later on during another getMulti call it assumed the setup was done when it wasn't actually?