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

panic: sync: WaitGroup is reused before previous Wait has returned #3140

Closed
khalilwtf00 opened this issue Jan 3, 2023 · 21 comments · Fixed by #3213
Closed

panic: sync: WaitGroup is reused before previous Wait has returned #3140

khalilwtf00 opened this issue Jan 3, 2023 · 21 comments · Fixed by #3213
Assignees
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Milestone

Comments

@khalilwtf00
Copy link

Hello team hope you are good,
I have an issue where nuclei just stop working with this message
Killed
image
I tried to locate the location and the source I didn't find anything,
Keep in mind please that this happen only in the latest version
Best wishes

@khalilwtf00 khalilwtf00 added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Jan 3, 2023
@ehsandeep
Copy link
Member

@khalilwtf00 yesterday we released new version of nuclei that includes a fix for this issue, can you confirm if you were the latest version of nuclei? i.e v2.8.4?

@khalilwtf00
Copy link
Author

@khalilwtf00 yesterday we released new version of nuclei that includes a fix for this issue, can you confirm if you were the latest version of nuclei? i.e v2.8.4?

@ehsandeep Thanks for the reply,
Yes latest version v2.8.4 is used.

@ehsandeep
Copy link
Member

@khalilwtf00 please share all the details then, cmd/system config/ target/ template number and anything that can be used to recreate the issue.

@geeknik
Copy link
Contributor

geeknik commented Jan 3, 2023

I can confirm this behavior is happening with 2.8.4, but in my case, this only happens when using the fuzzing-templates. My work around is to set -c 1 to limit the RAM usage. I am using go1.18.3 on Ubuntu 20.04.5 LTS.

Workflow:
echo "domain.tld" | subfinder -all | httpx | katana -f qurl | nuclei -t fuzzing-templates -stats

My list of domains is only 8,621. However, there is a huge spike in RAM usage 2-3 minutes after starting which results in the Killed message thanks to the Linux kernel unless the machine has 8+ GB of RAM.

@ehsandeep
Copy link
Member

@geeknik @khalilwtf00 using -ss host-spray should resolve the memory issue, reference - https://nuclei.projectdiscovery.io/nuclei/get-started/#which-scan-strategy-to-use

we have follow up issue for doing this automatic - #3076

@khalilwtf00
Copy link
Author

@ehsandeep Thanks for the reply,
I'm using a VPS, I will try again and I will share the result next !
Best Wishes

@khalilwtf00
Copy link
Author

I got this error after 15 mins of working
image

@tarunKoyalwar
Copy link
Member

@khalilwtf00 , this only seems to happen with host-spray can you verify if it also happens with template-spray strategy and -c 10 -bs 200

@khalilwtf00
Copy link
Author

@tarunKoyalwar Thanks for help,
in the same way I get killed again
image

@tarunKoyalwar tarunKoyalwar self-assigned this Jan 5, 2023
@marcelo321
Copy link

Same happening to me. When using 1gb linodes. I was doing ss host-spray -concurrency 150 -bulk-size 10 as per recommended in the wiki, and lowering it more to see if that resolves the issue.

Does lowering concurrency fix the issue? or what can we try? @khalilwtf00

@ehsandeep ehsandeep changed the title "Killed" issue panic: sync: WaitGroup is reused before previous Wait has returned Jan 10, 2023
@khalilwtf00
Copy link
Author

@marcelo321 I tried with 16Gb RAM, with -rl 10 and still crash,

@tarunKoyalwar
Copy link
Member

tarunKoyalwar commented Jan 10, 2023

@khalilwtf00 , It looks like a memory issue , we are currently in process of fixing this soon for the time being you can also use previous version from releases

@tarunKoyalwar tarunKoyalwar added the Status: In Progress This issue is being worked on, and has someone assigned. label Jan 11, 2023
@tarunKoyalwar tarunKoyalwar linked a pull request Jan 16, 2023 that will close this issue
4 tasks
@tarunKoyalwar tarunKoyalwar linked a pull request Jan 18, 2023 that will close this issue
4 tasks
@tarunKoyalwar tarunKoyalwar removed a link to a pull request Jan 18, 2023
4 tasks
@tarunKoyalwar
Copy link
Member

@khalilwtf00 , @geeknik the waitgroup issue with host-spray should be fixed with attached PR and v2.8.8 .

about memory killed issue we are currently working on something #3203
can you share if you are facing killed issue with below nuclei

go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@85b45e8

this version of nuclei is linearly scaled so feel free to try it with -c 5000 or even more

Note
-rl i.e ratelimit flag limits max concurrency per sec so if we use -rl 10 then nuclei sends 10 req/s (default is 150 req/s) . so either keep -rl default or increase it depending on target

@marcelo321 I tried with 16Gb RAM, with -rl 10 and still crash,

@khalilwtf00
Copy link
Author

@tarunKoyalwar Hello,
No killed issue this time with the same target list.

@tarunKoyalwar
Copy link
Member

@khalilwtf00

  • just to confirm you installed nuclei using below command
go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@85b45e8

also how many targets are in target list ??

@khalilwtf00
Copy link
Author

Yes.
And the targets list was more than 6500

@tarunKoyalwar
Copy link
Member

@khalilwtf00 , can you share if you are facing killed issue with attached PR . you can install using

go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@c2a4fd1

@khalilwtf00
Copy link
Author

@tarunKoyalwar Yes, the same targets list, with killed issue after 11 hours of running

@tarunKoyalwar
Copy link
Member

@khalilwtf00 , thanks for sharing we will look into . In meanwhile since there are no issues with linear:concurrency PR #3140 (comment) . It is experimental but stable so feel free to use it for mass scanning

@ehsandeep ehsandeep added Status: Completed Nothing further to be done with this issue. Awaiting to be closed. and removed Status: In Progress This issue is being worked on, and has someone assigned. labels Jan 20, 2023
@ehsandeep ehsandeep added this to the nuclei v2.8.8 milestone Jan 24, 2023
@rxerium
Copy link

rxerium commented May 8, 2024

Hey team, I'm receiving these wait group errors in v3.2.6. Should I create a new issue?

image

@tarunKoyalwar
Copy link
Member

@rxerium , yes that seems to be a new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants