minvws / nl-kat-coordination

OpenKAT scans networks, finds vulnerabilities and creates accessible reports. It integrates the most widely used network tools and scanning software into a modular framework, accesses external databases such as shodan, and combines the information from all these sources into clear reports. It also includes lots of cat hair.
https://openkat.nl
European Union Public License 1.2
126 stars 58 forks source link

Boefje runner can't find the input object of a task in octopoes, possible race condition #2488

Open underdarknl opened 9 months ago

underdarknl commented 9 months ago
          Boefje runner can't find the input object of a task in octopoes, a number of the following exceptions:

I have been able to reproduce this Exception a couple of times. I've noticed a pattern where this Exception mostly occurs with near-empty queues. I have looked at the code and came to a possible reason. I think that the event of the new ooi triggers the scheduler to schedule the boefje before the new ooi actually exists in octopoes which triggers the ObjectNotFound.

Originally posted by @noamblitz in https://github.com/minvws/nl-kat-coordination/issues/2470#issuecomment-1936209162

noamblitz commented 8 months ago

I have been doing some testing:

Adding a sleep in mula/scheduler/schedulers/boefje.py line 202 seems to solve the issue which increases my suspicion of a race condition.