Shotokhan / ad_kihon

Easy A/D framework for team local training
GNU General Public License v3.0
5 stars 0 forks source link

Possible hang of checkers scheduling #1

Open Shotokhan opened 2 years ago

Shotokhan commented 2 years ago

I came across a bug in a specific MongoDB version (5.0.8), in which if the flag_data field of flag collection is indexed like it is done by create_index function (see mongo_utils.py), then it raises DuplicateKeyError, even if the flag body is different. Maybe it performs some special check on flag characters. An immediate solution is to leave create_index as stub, or to set the index as not unique (anyway, probability of collision is very very low). The impact of this bug is that this loop: https://github.com/Shotokhan/ad_kihon/blob/4bec3c89bdcc9bc055882b1be9dfc6e75557564f/src/check_scheduler.py#L100-L107 is run forever, so the checkers' system completely hangs.

Shotokhan commented 2 years ago

Version should be 5.0.1