blacklanternsecurity / bbot

A recursive internet scanner for hackers.
https://www.blacklanternsecurity.com/bbot/
GNU General Public License v3.0
4k stars 366 forks source link

BBOT 2.0 multiprocessing oopsie #1511

Open TheTechromancer opened 4 days ago

TheTechromancer commented 4 days ago

image

somebody forgot to do if __name__ == "__main__"

TheTechromancer commented 7 hours ago

After merging a fix for this, python3.9 and 3.10 tests are suddenly timing out. The individual tests themselves are finishing properly, but the pytest process never exits.

I ran the tests in a docker container and what I discovered was that there is a "thread leak". It appears that threads are not being killed properly. As the scan continues, more and more threads are spawned, and the number keeps going up. By the end, there are hundreds.

This is a very strange issue. I'm actually not sure where the threads are being spawned, since we are making sure to kill the DNS/Web engine ones when we are finished with them.