robertdavidgraham / masscan

TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.
GNU Affero General Public License v3.0
23k stars 3.02k forks source link

Segmentation fault on exit when run via notebook #692

Open llamasoft opened 1 year ago

llamasoft commented 1 year ago

When run via notebook, masscan segfaults on exit even though everything seems to otherwise run correctly.

Demo: https://gist.github.com/llamasoft/e67a62f501993a0e85de6cd9ce07ca38

mzpqnxow commented 1 year ago

Can you build with symbols?

Is this reproducible outside of notebook (using the same invocation, with "timeout")?

I notice that libc is using libtcmalloc in place of malloc/free, is that deliberate

llamasoft commented 1 year ago

It was built with debug symbols. They're enabled by default in the makefile (https://github.com/robertdavidgraham/masscan/blob/144c527ed55275ee9fbb80bb14fbb5e3fcff3b7e/Makefile#L94)

As for reproduction, nope! Using timeout in a notebook still triggers the issue.

Regarding TCmalloc, no, it was not intentional. I'm guessing it's preinstalled in the Colab environment. It might be the root cause. I'll do some additional testing to see if uninstall it fixes the issue.