Page MenuHomePhabricator

SecurePoll: PHP Notice: unserialize(): Error at offset 0 of 249 bytes
Open, LowPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Notice: unserialize(): Error at offset 0 of 249 bytes
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.18/extensions/SecurePoll/includes/User/RemoteMWAuth.php(105)
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.37.0-wmf.18/extensions/SecurePoll/includes/User/RemoteMWAuth.php(105): unserialize(string)
#2 /srv/mediawiki/php-1.37.0-wmf.18/extensions/SecurePoll/includes/User/Auth.php(176): MediaWiki\Extensions\SecurePoll\User\RemoteMWAuth->requestLogin(MediaWiki\Extensions\SecurePoll\Entities\Election)
#3 /srv/mediawiki/php-1.37.0-wmf.18/extensions/SecurePoll/includes/Pages/LoginPage.php(30): MediaWiki\Extensions\SecurePoll\User\Auth->newRequestedSession(MediaWiki\Extensions\SecurePoll\Entities\Election)
#4 /srv/mediawiki/php-1.37.0-wmf.18/extensions/SecurePoll/includes/SpecialSecurePoll.php(70): MediaWiki\Extensions\SecurePoll\Pages\LoginPage->execute(array)
#5 /srv/mediawiki/php-1.37.0-wmf.18/includes/specialpage/SpecialPage.php(646): MediaWiki\Extensions\SecurePoll\SpecialSecurePoll->execute(string)
#6 /srv/mediawiki/php-1.37.0-wmf.18/includes/specialpage/SpecialPageFactory.php(1365): SpecialPage->run(string)
#7 /srv/mediawiki/php-1.37.0-wmf.18/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#8 /srv/mediawiki/php-1.37.0-wmf.18/includes/MediaWiki.php(925): MediaWiki->performRequest()
#9 /srv/mediawiki/php-1.37.0-wmf.18/includes/MediaWiki.php(559): MediaWiki->main()
#10 /srv/mediawiki/php-1.37.0-wmf.18/index.php(53): MediaWiki->run()
#11 /srv/mediawiki/php-1.37.0-wmf.18/index.php(46): wfIndexMain()
#12 /srv/mediawiki/w/index.php(3): require(string)
#13 {main}
Impact

Unclear, but there's an election underway.

Notes

Roughly 1 per hour.

Details

Request URL
https://vote.wikimedia.org/wiki/Special:SecurePoll/login/[nnn]?site=*&lang=*

Event Timeline

Same requests are leading to:

normalized_message
[{reqId}] {exception_url}   PHP Warning: Creating default object from empty value
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.18/extensions/SecurePoll/includes/User/RemoteMWAuth.php(106)
#0 /srv/mediawiki/php-1.37.0-wmf.18/extensions/SecurePoll/includes/User/RemoteMWAuth.php(106): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.37.0-wmf.18/extensions/SecurePoll/includes/User/Auth.php(176): MediaWiki\Extensions\SecurePoll\User\RemoteMWAuth->requestLogin(MediaWiki\Extensions\SecurePoll\Entities\Election)
#2 /srv/mediawiki/php-1.37.0-wmf.18/extensions/SecurePoll/includes/Pages/LoginPage.php(30): MediaWiki\Extensions\SecurePoll\User\Auth->newRequestedSession(MediaWiki\Extensions\SecurePoll\Entities\Election)
#3 /srv/mediawiki/php-1.37.0-wmf.18/extensions/SecurePoll/includes/SpecialSecurePoll.php(70): MediaWiki\Extensions\SecurePoll\Pages\LoginPage->execute(array)
#4 /srv/mediawiki/php-1.37.0-wmf.18/includes/specialpage/SpecialPage.php(646): MediaWiki\Extensions\SecurePoll\SpecialSecurePoll->execute(string)
#5 /srv/mediawiki/php-1.37.0-wmf.18/includes/specialpage/SpecialPageFactory.php(1365): SpecialPage->run(string)
#6 /srv/mediawiki/php-1.37.0-wmf.18/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#7 /srv/mediawiki/php-1.37.0-wmf.18/includes/MediaWiki.php(925): MediaWiki->performRequest()
#8 /srv/mediawiki/php-1.37.0-wmf.18/includes/MediaWiki.php(559): MediaWiki->main()
#9 /srv/mediawiki/php-1.37.0-wmf.18/index.php(53): MediaWiki->run()
#10 /srv/mediawiki/php-1.37.0-wmf.18/index.php(46): wfIndexMain()
#11 /srv/mediawiki/w/index.php(3): require(string)
#12 {main}
tstarling lowered the priority of this task from High to Low.Aug 30 2021, 11:58 PM

It should fail with securepoll-remote-parse-error without generating a PHP warning. Maybe it should log something anyway, it shouldn't be failing on 1 in every 1000 requests, but that's probably a subject for another bug.

jrbs raised the priority of this task from Low to High.Sep 23 2022, 11:10 PM
jrbs lowered the priority of this task from High to Low.Sep 29 2022, 3:58 PM
jrbs moved this task from Needs evaluation to Evaluated on the MediaWiki-extensions-SecurePoll board.

Evaluation:

Obscure issue. We should add a logging that provides more information about the root cause. Best guess it that the auth-api.php script crashes and returns an unexpected output