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

fix leaks in SendWithCallbacks function #205

Merged
merged 2 commits into from
Dec 2, 2024
Merged

Conversation

shaazmik
Copy link
Contributor

@shaazmik shaazmik commented Dec 2, 2024

Greetings, came across a heavy CPU load for a constant time, saw a recent PR that goroutine leaks have been fixed. With perf analysed the situation and saw that there are indeed goroutine leaks in SendWithCallbacks. Unlike a simple leak, where we have dead goroutines and degrade the scheduler, these goroutines are still engaged in a perpetual check of the CallbacksPattern, which resulted in 100% CPU utilisation. I had my CPU running at 100% like that for a week, even though it should have been doing no work at all. I will also attach a screenshot with perf, that in the rest of the programme all the load is on the check.

As for backwards compatibility, I don't think I had any problems with the programme hanging, timeout worked fine

Screenshot 2024-12-01 at 01 15 00

@carlmontanari
Copy link
Contributor

😬 whoops haha, thanks @shaazmik LGTM!

@carlmontanari carlmontanari merged commit cb04adc into scrapli:main Dec 2, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants