Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibly concurrent issue impacting score of participants #326

Open
thamara opened this issue Jan 2, 2024 · 8 comments
Open

Possibly concurrent issue impacting score of participants #326

thamara opened this issue Jan 2, 2024 · 8 comments
Labels
bug Something isn't working complexity:3 needs investigation More details are needed or have to found out prio:2 Medium priority

Comments

@thamara
Copy link

thamara commented Jan 2, 2024

Which component is affected?

The Game as a whole

Did the issue occur at ClassQuiz.de, or on a self-hosted instance?

On ClassQuiz.de

How can the issue be reproduced?

(This is an hypothesis) Probably with many participants at a time, considering a conection/route that have a bit more delay compared to the server.

Describe the bug (with screenshots if possible)

At the end of December, I hosted a game with ~130 people from Brazil. (Game page for reference if accessible by admin, is here)

During the game, we had some reports of users not being able to participate smoothly. A few participants would report that their score was not correctly computed or displayed or that the questions weren't showing up. One has also mentioned that he was "kicked off" the game - although this last part I'm not 100% sure if it's related to maybe refreshing the page by mistake.

When looking at the results after the game, they do not add up. In the attached file, you can see this data: QuizResults.xlsx

Here's what we noticed:

  • Considering the results page where the player's name and score are shown, we see that the scores for the top 3 winners are all 10k+ points. This is a list of 3 users A, B, and C.
  • If we were to take each answer and capture the individual score for each user listed, and sum this, we see that the top 3 winners have around 5k points and are users X, Y, and Z. At the end of the quiz, these were the winning participants.
  • Although we had around 132 users, with 3 with a score of 0 (the one that got kicked off is in this list), we can see that the other 129 got some amount of points on the results page. But this does not match the individual answer's page.
    • Take, for example, the user "phsantos", he has a results score of 641, but the answers registered were only one, where he got an answer wrong, score 0 (question 2 name "Pergunta 2").
  • A generally low ratio of users answering each question. Although the time was set to 15s per question, we se upmost 63% of the people answering each question (regardless of right or wrong), and an average of only 37%.

So, a few questions/hypotheses:

  • Is there any reason why the final score and the "results" score would be different?
  • Could it be a concurrent issue due to many participants?
  • Is the ping a factor here? When measuring the ping between the local network and the site today, I got around 211ms using https://check-host.net/check-ping.
  • Could this be caused by the way each individual score is stored to the database?

Other information that might be relevant:

  • The quiz was hosted directly on https://classquiz.de/results and managed in a laptop
  • Most (if not all) participants joined using smartphones
  • The quiz was held on 2023-12-22.

Device

Smartphone

Operating System

Many.

Browser

Many.

@thamara thamara added the bug Something isn't working label Jan 2, 2024
@thamara
Copy link
Author

thamara commented Jan 2, 2024

Let me also take the opportunity to say thanks for this project! <3

@mawoka-myblock
Copy link
Owner

Hmmm. When i search the usernames with 0 points in your spreadsheet, it yields no (one) result. This could happen in theory, but then it would have to happen at at the exact time, accurate to like 0.001 seconds, which is (if you ask me) unlikely. Imma try to simulate the quiz with some latency. Btw: How did you get ths pretty looking spreadsheet? And: Could you please not update the quiz you've played for now? That would be really helpful. And: Thank you for reporting this issue.

@mawoka-myblock mawoka-myblock added needs investigation More details are needed or have to found out prio:2 Medium priority complexity:3 labels Jan 2, 2024
@mawoka-myblock
Copy link
Owner

Oh: When a player gets kicked: Recommend him to reload the page again.

@mawoka-myblock
Copy link
Owner

Looking through your spreadsheet again, I noticed negative scores, which should be impossible.

@thamara
Copy link
Author

thamara commented Jan 2, 2024

When i search the usernames with 0 points in your spreadsheet, it yields no (one) result. This could happen in theory, but then it would have to happen at at the exact time, accurate to like 0.001 seconds, which is (if you ask me) unlikely.

Actually, this user (phsantos) in question got a 0 because he got the question wrong (within time), but still on the results board (in this case, I'm referring to the table of all users and their scores), we can see him with some points
The row that shows his wrong answer (the only answer from the user in any question: phsantos 0 5.432s 331-355 ❌
(line 631, although the filtering/sort might make this a different line).

Could you please not update the quiz you've played for now?

Sure. I won't need the same quiz, so I'll keep that as is.

Btw: How did you get ths pretty looking spreadsheet?

Oh! Thanks! It's some formatting techniques that automatically colors some stuff. It's nothing fancy, just helps visualize data better. Mostly is done through selecting a range of values and going on "Conditional Formatting > Color Scales".

Looking through your spreadsheet again, I noticed negative scores, which should be impossible.

I was going to mention that as well, but ended up forgetting. This happens especially for one user name "mano". He, and a handful of other users somehow got the register an answer going beyond the 15s (reaching 25.391s in one case).

Also, let me clarify something:

A generally low ratio of users answering each question. Although the time was set to 15s per question, we se upmost 63% of the people answering each question (regardless of right or wrong), and an average of only 37%.

When playing the game and watching on the admin page, I could see a count of answers computed (like how many users had already selected an option). While watching this, I saw numbers closing to the total, ~100+ answers. But when getting each answer result afterward, or even when displaying the results between questions, the total of answers shown was always low, ranging from about 30 to 60 (summing up each alternative number).

@mawoka-myblock
Copy link
Owner

That's all really strange.I'm gonna measure how long the server is blocked (in sense of "Would mess the data up") and see if that is even possible, but that's for tomorrow's Mawoka.

@thamara
Copy link
Author

thamara commented Jan 2, 2024

Thanks! Let me know if you need any further information or help to test from other places. :D

@mawoka-myblock
Copy link
Owner

To break it, the player would have to answer within 5 milliseconds (or the server has to receive those within 5 milliseconds) which is unlikely. I now got this down to 1 millisecond. I still don't think that this is the cause of the error, but that's all I can think of at the moment. It'll probably a bit more on the actual server, but it's still really unlikely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working complexity:3 needs investigation More details are needed or have to found out prio:2 Medium priority
Projects
None yet
Development

No branches or pull requests

2 participants