Page MenuHomePhabricator

Wikimedia\Rdbms\DBQueryError: Error 1146: Table 'stewardwiki.securepoll_voters' doesn't existFunction: MediaWiki\Extension\SecurePoll\User\Auth::getVoterQuery: SELECT * FROM `securepoll_voters` WHERE voter_name = 'JSuthe
Open, LowPublicPRODUCTION ERROR

Description

Error
  • mwversion: 1.45.0-wmf.22
  • timestamp: 2025-10-09T21:26:46.170Z
  • phpversion: 8.1.33
  • reqId: 36e519c6-c5de-4e8b-8f31-02883dacdfec
  • Find reqId in Logstash
normalized_message
[{reqId}] {exception_url}   Wikimedia\Rdbms\DBQueryError: Error 1146: Table 'stewardwiki.securepoll_voters' doesn't exist
Function: MediaWiki\Extension\SecurePoll\User\Auth::getVoter
Query: SELECT  *  FROM `securepoll_voters`    WHERE voter_name = 'JSuthe
FrameLocationCall
from/srv/mediawiki/php-1.45.0-wmf.22/includes/libs/rdbms/database/Database.php(1225)
#0/srv/mediawiki/php-1.45.0-wmf.22/includes/libs/rdbms/database/Database.php(1209)Wikimedia\Rdbms\Database->getQueryException(string, int, string, string)
#1/srv/mediawiki/php-1.45.0-wmf.22/includes/libs/rdbms/database/Database.php(1183)Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, int, string, string)
#2/srv/mediawiki/php-1.45.0-wmf.22/includes/libs/rdbms/database/Database.php(640)Wikimedia\Rdbms\Database->reportQueryError(string, int, string, string, bool)
#3/srv/mediawiki/php-1.45.0-wmf.22/includes/libs/rdbms/database/Database.php(1363)Wikimedia\Rdbms\Database->query(Wikimedia\Rdbms\Query, string)
#4/srv/mediawiki/php-1.45.0-wmf.22/includes/libs/rdbms/database/Database.php(1373)Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
#5/srv/mediawiki/php-1.45.0-wmf.22/includes/libs/rdbms/database/DBConnRef.php(127)Wikimedia\Rdbms\Database->selectRow(array, array, array, string, array, array)
#6/srv/mediawiki/php-1.45.0-wmf.22/includes/libs/rdbms/database/DBConnRef.php(405)Wikimedia\Rdbms\DBConnRef->__call(string, array)
#7/srv/mediawiki/php-1.45.0-wmf.22/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(810)Wikimedia\Rdbms\DBConnRef->selectRow(array, array, array, string, array, array)
#8/srv/mediawiki/php-1.45.0-wmf.22/extensions/SecurePoll/includes/User/Auth.php(143)Wikimedia\Rdbms\SelectQueryBuilder->fetchRow()
#9/srv/mediawiki/php-1.45.0-wmf.22/extensions/SecurePoll/includes/User/LocalAuth.php(56)MediaWiki\Extension\SecurePoll\User\Auth->getVoter(array)
#10/srv/mediawiki/php-1.45.0-wmf.22/extensions/SecurePoll/includes/User/Auth.php(160)MediaWiki\Extension\SecurePoll\User\LocalAuth->autoLogin(MediaWiki\Extension\SecurePoll\Entities\Election)
#11/srv/mediawiki/php-1.45.0-wmf.22/extensions/SecurePoll/includes/Pages/VotePage.php(108)MediaWiki\Extension\SecurePoll\User\Auth->newAutoSession(MediaWiki\Extension\SecurePoll\Entities\Election)
#12/srv/mediawiki/php-1.45.0-wmf.22/extensions/SecurePoll/includes/SpecialSecurePoll.php(61)MediaWiki\Extension\SecurePoll\Pages\VotePage->execute(array)
#13/srv/mediawiki/php-1.45.0-wmf.22/includes/specialpage/SpecialPage.php(711)MediaWiki\Extension\SecurePoll\SpecialSecurePoll->execute(string)
#14/srv/mediawiki/php-1.45.0-wmf.22/includes/specialpage/SpecialPageFactory.php(1730)MediaWiki\SpecialPage\SpecialPage->run(string)
#15/srv/mediawiki/php-1.45.0-wmf.22/includes/actions/ActionEntryPoint.php(499)MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#16/srv/mediawiki/php-1.45.0-wmf.22/includes/actions/ActionEntryPoint.php(143)MediaWiki\Actions\ActionEntryPoint->performRequest()
#17/srv/mediawiki/php-1.45.0-wmf.22/includes/MediaWikiEntryPoint.php(184)MediaWiki\Actions\ActionEntryPoint->execute()
#18/srv/mediawiki/php-1.45.0-wmf.22/index.php(44)MediaWiki\MediaWikiEntryPoint->run()
#19/srv/mediawiki/w/index.php(3)require(string)
#20{main}
Impact
Notes

Details

Request URL
https://steward.wikimedia.org/wiki/Special:SecurePoll/vote/390

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Hi @Reedy ,

Thank you for filing this. Could you add a little more information about the steps you followed and how to reproduce it?

I think Reedy just goes into logstash every week and looks for production errors not in phab yet, then adds them to phab.

Someone with access to stewardwiki might be able to reproduce this by visiting https://steward.wikimedia.org/wiki/Special:SecurePoll/vote/390 while logged in

Cc @SD0001. Looks possibly related to T395928: Delete non-essential SecurePoll tables. Maybe we can look at this stack trace and figure out more code to refactor to work with the deleted tables being absent?

Indeed I apparently triggered the first log and get a similar error now:

A database query error has occurred. This may indicate a bug in the software.

[ed65c365-3a8c-4f12-bad7-89868ecedf2a] 2025-10-10 18:02:46: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

I would suspect the wiki is missing a few other tables (if SecurePoll is supposed to be enabled there):

| securepoll_bv2025_edits        |
| securepoll_elections           |
| securepoll_entity              |
| securepoll_lists               |
| securepoll_msgs                |
| securepoll_properties          |
| securepoll_u4c2025_edits       |

vs enwiki

| securepoll_bv2025_edits        |
| securepoll_cookie_match        |
| securepoll_elections           |
| securepoll_entity              |
| securepoll_lists               |
| securepoll_log                 |
| securepoll_msgs                |
| securepoll_options             |
| securepoll_properties          |
| securepoll_questions           |
| securepoll_strike              |
| securepoll_u4c2025_edits       |
| securepoll_voters              |
| securepoll_votes               |

Securepoll_voters is supposed to be missing. It was deleted as part of T395928: Delete non-essential SecurePoll tables

In T395928: Delete non-essential SecurePoll tables, our assumption is the following: a wiki with only redirect polls should never need to access the 7 tables we deleted (including securepoll_voters, which is the missing table generating the error in this ticket).

I poked around the stewardwiki database and verified that poll 390 is indeed a redirect poll. SELECT * FROM securepoll_properties WHERE pr_entity = 390; displays redirect poll stuff like jump-id, jump-url, main-wiki, and mobile-jump-url.

My conclusion is that there is still some SecurePoll code that we need to fix to make sure it doesn't call securepoll_voters for redirect polls. The stack trace and SQL query above should be helpful for tracking this down.

If stewardwiki is the only wiki where this is showing up in logstash, we should ask ourselves if there's anything special about stewardwiki. For example, maybe it's not a CentralAuth wiki?

Error 1146 from MediaWiki\Extension\SecurePoll\User\Auth::getVoter, {error} {sql1line} {db_server} only finds this one entry in the logs (still) in logstash.

Reedy triaged this task as Low priority.Nov 12 2025, 9:39 PM

Maybe relevant: JSutherland (WMF) was set as one of the poll admins for that redirect poll. So maybe being logged in as a poll admin is one of the steps to reproduce.