Page MenuHomePhabricator

Navigation buttons on Special:Newsletter (when more than 60 newsletters) fatal
Closed, InvalidPublic

Description

Here is what I get on http://localhost/core/core/index.php?title=Special:Newsletters&offset=0

pasted_file (57×732 px, 5 KB)

-->

pasted_file (258×1 px, 33 KB)

[2a30d6ab75ea9a05ed938c37] 2017-05-13 22:44:25: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"
#0 /var/www/core/core/includes/libs/rdbms/TransactionProfiler.php(218): Wikimedia\Rdbms\TransactionProfiler->reportExpectationViolated('writes', 'query-m: REPLAC...')
#1 /var/www/core/core/includes/libs/rdbms/database/Database.php(995): Wikimedia\Rdbms\TransactionProfiler->recordQueryCompletion('query-m: REPLAC...', 1494770885.1094, true, 1)
#2 /var/www/core/core/includes/libs/rdbms/database/Database.php(906): Wikimedia\Rdbms\Database->doProfiledQuery('REPLACE INTO `o...', 'REPLACE /* SqlB...', true, 'SqlBagOStuff::s...')
#3 /var/www/core/core/includes/libs/rdbms/database/Database.php(2192): Wikimedia\Rdbms\Database->query('REPLACE INTO `o...', 'SqlBagOStuff::s...')
#4 /var/www/core/core/includes/libs/rdbms/database/DatabaseMysqlBase.php(494): Wikimedia\Rdbms\Database->nativeReplace('objectcache', Array, 'SqlBagOStuff::s...')
#5 /var/www/core/core/includes/objectcache/SqlBagOStuff.php(374): Wikimedia\Rdbms\DatabaseMysqlBase->replace('objectcache', Array, Array, 'SqlBagOStuff::s...')
#6 /var/www/core/core/includes/objectcache/SqlBagOStuff.php(388): SqlBagOStuff->setMulti(Array, 30)
#7 /var/www/core/core/includes/libs/objectcache/BagOStuff.php(545): SqlBagOStuff->set('my_wiki:message...', 1, 30)
#8 /var/www/core/core/includes/libs/objectcache/BagOStuff.php(418): BagOStuff->add('my_wiki:message...', 1, 30)
#9 [internal function]: BagOStuff->{closure}()
#10 /var/www/core/core/vendor/wikimedia/wait-condition-loop/src/WaitConditionLoop.php(92): call_user_func(Object(Closure))
#11 /var/www/core/core/includes/libs/objectcache/BagOStuff.php(429): Wikimedia\WaitConditionLoop->invoke()
#12 /var/www/core/core/includes/libs/objectcache/BagOStuff.php(472): BagOStuff->lock('my_wiki:message...', 0, 30, 'MessageCache::g...')
#13 /var/www/core/core/includes/cache/MessageCache.php(760): BagOStuff->getScopedLock('my_wiki:message...', 0, 30, 'MessageCache::g...')
#14 /var/www/core/core/includes/cache/MessageCache.php(420): MessageCache->getReentrantScopedLock('my_wiki:message...', 0)
#15 /var/www/core/core/includes/cache/MessageCache.php(350): MessageCache->loadFromDBWithLock('en', Array, NULL)
#16 /var/www/core/core/includes/cache/MessageCache.php(989): MessageCache->load('en')
#17 /var/www/core/core/includes/cache/MessageCache.php(919): MessageCache->getMsgFromNamespace('Newsletters', 'en')
#18 /var/www/core/core/includes/cache/MessageCache.php(886): MessageCache->getMessageForLang(Object(Language), 'newsletters', true, Array)
#19 /var/www/core/core/includes/cache/MessageCache.php(827): MessageCache->getMessageFromFallbackChain(Object(Language), 'newsletters', true)
#20 /var/www/core/core/includes/Message.php(1257): MessageCache->get('newsletters', true, Object(Language))
#21 /var/www/core/core/includes/Message.php(842): Message->fetchMessage()
#22 /var/www/core/core/includes/Message.php(934): Message->toString('text')
#23 /var/www/core/core/includes/specialpage/SpecialPage.php(607): Message->text()
#24 /var/www/core/core/includes/specialpage/SpecialPage.php(488): SpecialPage->getDescription()
#25 /var/www/core/core/extensions/Newsletter/includes/specials/SpecialNewsletters.php(21): SpecialPage->setHeaders()
#26 /var/www/core/core/includes/specialpage/SpecialPage.php(522): SpecialNewsletters->execute(NULL)
#27 /var/www/core/core/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
#28 /var/www/core/core/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#29 /var/www/core/core/includes/MediaWiki.php(862): MediaWiki->performRequest()
#30 /var/www/core/core/includes/MediaWiki.php(523): MediaWiki->main()
#31 /var/www/core/core/index.php(43): MediaWiki->run()
#32 {main}

Event Timeline

Aklapper renamed this task from Navigation buttons on Special:Nesletter (when more than 60 newsletters) fatal to Navigation buttons on Special:Newsletter (when more than 60 newsletters) fatal .May 14 2017, 12:20 PM

Change 353768 had a related patch set uploaded (by 01tonythomas; owner: 01tonythomas):
[mediawiki/extensions/Newsletter@master] Disable page navigations on Special:Newsletter

https://gerrit.wikimedia.org/r/353768

Change 353768 had a related patch set uploaded (by 01tonythomas; owner: 01tonythomas):
[mediawiki/extensions/Newsletter@master] Disable page navigations on Special:Newsletter

https://gerrit.wikimedia.org/r/353768

^^ kind of hacky way to fix it by not showing up the navigation bar. Offside, this should ideally parse the offest and limit and do the right thing.

Qgil triaged this task as Medium priority.May 15 2017, 1:02 PM

Just found that this happens only when the user is logged in. Probably we should not be hacking it with my previous patch then.

@Bawolff says it has something to do with my local install though.

Maybe its just localization cache screwing with the no-writes in read access requests, transaction profiler thingy

I can't for the life of me figure out how this could have happened

#0 /var/www/core/core/includes/libs/rdbms/TransactionProfiler.php(218): Wikimedia\Rdbms\TransactionProfiler->reportExpectationViolated('writes', 'query-m: REPLAC...')

But reportExpectationViolated does throw an exception?

In any case i'm very sure this is not Newsletter's fault.

Change 353768 abandoned by Brian Wolff:
Disable page navigations on Special:Newsletter

Reason:
No longer doing this

https://gerrit.wikimedia.org/r/353768

We have alternate code fixing things, and this is no more reproducible.