THIS IS A TEST!

This is a test of the polling system. Please vote, especially if you are outside of beige.party. I'm trying to prove a theory that since v4.3.4 polls with more than 4 options only record votes from the local instance.

Who's your #1 muse?

Edit: Adding this here for visibility. This was not a bug in the Mastodon code, but rather the result of me increasing the max poll options on the web server but not on the server running the sidekiq processes.

More details here: https://github.com/mastodon/mastodon/issues/34662

Calliope
16.8%
Clio
6%
Polyhymnia
7.1%
Euterpe
4.3%
Terpsichore
12.5%
Erato
12.5%
Melpomene
9.2%
Thalia
18.5%
Urania
13%
Poll ended at .
Polls with more than four options only report votes from the local instance · Issue #34662 · mastodon/mastodon

Steps to reproduce the problem Increase the max number of poll options by modifying MAX_OPTIONS in app/validators/poll_options_validator.rb Post a poll with more than 4 options Wait for users from ...

GitHub

If any #mastoadmins want to test this out themselves, this is the query I used to find the messed up polls:

SELECT
polls.created_at
, polls.id
, polls.account_id
, polls.votes_count
, pv.total_votes
, polls.status_id
, ARRAY_LENGTH(polls.options, 1)
FROM polls
INNER JOIN users ON
users.account_id = polls.account_id
INNER JOIN (
SELECT
poll_id
, COUNT(*) AS total_votes
FROM poll_votes
GROUP BY poll_id
) AS pv ON
pv.poll_id = polls.id
WHERE pv.total_votes > polls.votes_count
ORDER BY polls.created_at ASC;

then this to find the polls that are not messed up within the same time period:

SELECT
polls.created_at
, polls.id
, polls.account_id
, polls.votes_count
, pv.total_votes
, polls.status_id
, ARRAY_LENGTH(polls.options, 1)
FROM polls
INNER JOIN users ON
users.account_id = polls.account_id
INNER JOIN (
SELECT
poll_id
, COUNT(*) AS total_votes
FROM poll_votes
GROUP BY poll_id
) AS pv ON
pv.poll_id = polls.id
WHERE
polls.created_at >= '2025-03-04 23:03:26'
AND pv.total_votes <= polls.votes_count
ORDER BY polls.created_at ASC;

The good ones all have options array length <= 4 and the bad ones all have options array length > 4

The way I increased the poll options was by modifying MAX_OPTIONS in app/validators/poll_options_validator.rb. This appeared to work prior to v4.3.4.

Edit: Adding this here for visibility. This was not a bug in the Mastodon code, but rather the result of me increasing the max poll options on the web server but not on the server running the sidekiq processes.

More details here: https://github.com/mastodon/mastodon/issues/34662

Polls with more than four options only report votes from the local instance · Issue #34662 · mastodon/mastodon

Steps to reproduce the problem Increase the max number of poll options by modifying MAX_OPTIONS in app/validators/poll_options_validator.rb Post a poll with more than 4 options Wait for users from ...

GitHub
@theropologist For some serious poll engagement ask about that query formatting and let the flame war ensue
@theropologist Trivia: these are all streets in New Orleans but the pronunciation is soooooo mangled.

@theropologist from mas.to (obviously) via Moshidon, which does sometimes act differently to the web version of Masto, I see all the options.

Which is cool. Preferential and/or approval voting next @Gargron? 😉

@DuncanMSussex @Gargron The bug that I've been seeing is that while all the poll options show up, the total votes recorded at the bottom only reflects users from the local instance if there are more than 4 poll options.

In the database they are recorded in the poll_votes table but not in the votes_count column of the polls table. (adding this part mostly just in case Eugen actually reads this!)

@theropologist @Gargron ah, yeah, that's a more subtle bug! Worth doing the test then. 🤞 it gets patched.
@theropologist
but then you maybe should have put Calliope last - as the most skilled of all muses she's probably best known... 🤔

@theropologist weird... yeah that def seems to be the case. (pics taken at same time, I picked Erato since it had no votes, it says 16 votes for your instance and no vote for it, and on mine it says 15 votes yet I voted for it (selected) and still showed 0.

I've since refreshed and both show 21 votes.. and still 0% for my choice. It's like it counted the vote # but didn't record it right.

@colinstu I'm seeing the same thing in the database. I can see your vote recorded in the poll_votes table, but it's not included in the aggregated votes_total or the cached_tallies columns of the polls table, which is what the web interface uses to display the vote totals.

@colinstu Can you try this one? I think this should record your vote since it is only 4 poll options:

https://beige.party/@theropologist/114491746427549091

Velocirooster adminensis :bc: (@[email protected])

THIS IS A TEST! This is a test of the polling system. Please vote, especially if you are outside of beige.party. I'm trying to prove a theory that since v4.3.4 polls with more than 4 options only record votes from the local instance. This poll is the control. What's your favorite temper? [ ] Woe [ ] Frolic [ ] Dread [ ] Malice

beige.party
@theropologist voted/tested/sent.
@colinstu Thanks! I can see your vote being recorded and displayed correctly on that poll. This appears to be a reproduceable error.
@theropologist gonna open a github issue on it with the findings? Looks pretty conclusive! I'd like to follow/subscribe to it if it's not already open.
@colinstu Yep, I'll send you the link once I do. I was pretty sure this was the issue from looking at historical data, but I wanted to make sure it was reproduceable.
Polls with more than four options only report votes from the local instance · Issue #34662 · mastodon/mastodon

Steps to reproduce the problem Increase the max number of poll options by modifying MAX_OPTIONS in app/validators/poll_options_validator.rb Post a poll with more than 4 options Wait for users from ...

GitHub
@theropologist @colinstu We run a custom-patched Masto 3 (with Glitch as a base), should we look for this bug on our own instance too y'think? I don't know when this might've gotten introduced.
@IceWolf @theropologist 3.x is ancient... it certainly wasn't an issue prior to 4.3.4.

@colinstu @theropologist Oh good/hah whoops for running such an ancient version!

Yeah, we'd be running 4 if Gargron didn't keep pulling more and more UI garbage.

@IceWolf well they've been doing a lot more security patches that 3.x branch has since stopped receiving so... not exactly wise to be susceptible to attacks/issues available in older releases.
@colinstu Yeahhh. I tried backporting one patch and it went okay. But I don't know what other security patches we might be missing.
@colinstu What'd be really nice is if we could get some other people together to help maintain a fork but /nobody seems to care/
@theropologist @colinstu i *tried* to vote in this one; instead of showing the poll in my feed, it was a link. i went to the page, but when i made my selection, the “vote” button was dimmed out and it asked me to log in to beige.party
@theropologist @colinstu i also voted for clio in the long poll.
@andrea_smandrea @theropologist you need to copy the URL of that post and paste it into your own instance's search field, and then open/search for that post, vote from there.
@theropologist Really seems to be the case. 26 vs. over 120 votes on the other one.
@Radgryd Yep, I'm seeing the same thing in the database as well. 154 total votes, but only 28 are being displayed. Those 28 are all local accounts.
@theropologist Single-user GoToSocial server here, and I see all the options (each of them has votes, from other servers obviously). Voted for Clio!
@theropologist I am one who delights in all manifestations of the Terpsichorean muse
@theropologist Voted for Terpsicore from outside beige using Ivory on iOS
@theropologist in case it's helpful, here's what I see after voting from mastodon.nz.
@theropologist Okay, I see what happened. I voted frolic in the 4 option and Melpomene in the >4
@theropologist I voted and the vote count did not change, so I think you are correct about it only accepting local instance votes.
@theropologist I’m assuming this poll has gotten considerably more than 40 votes? 
@theropologist Duly voted from Mastodon.social the only way someone who likes the Xanadu soundtrack would.
@theropologist ya te voté, ¿funciona?

@theropologist Negative result from over here. All looks consistent here with the votes showing on Old Mermaid Town matching what I see on beige.party's web UI. The eight vote counts do add up to 42 as expected.

Edit: I now understand that the bug is that a lot more than 42 people voted; the 42 is probably just the voters on beige.party.

@futzle @theropologist That isn't what is expected. Hundreds tried to vote in two polls that @theropologist posted at the same time, and the one that had four options recorded more than 8x the number of votes. You see an incorrect "42" in two places; other votes were simply dropped.
@not2b Gotcha! Hope they find the bug quickly.
@theropologist

OK seems to have registered my vote.
Closest to me I suppose.
I am seeing options for all 9 muses.

Sharkey fork of Misskey.
Polls here are 10 options, never seem to be issues further afield.
@theropologist For me, it says 0 people voted but I think that’s a problem with Akkoma, which is what I’m running.
@theropologist Tho I voted Euterpe, I have to say, Terpsichore goes hard.
@theropologist I am familiar with none of these names
@theropologist Voted for Terpsichore, from hachyderm.io.
@theropologist no idea what these names are so i just picked a random option (the last one)
@theropologist
Voted for Thalia from Ivory for MacOS.
@theropologist I voted for Urania and am not beige 😁
@theropologist isn't Mnemosyne, their mother, also considered a muse?
@theropologist Voted randomly from mstdn.social. Lets see if it registers.
@theropologist Just voted Erato. It looks like my vote was counted, I’m at the instance troet.cafe.