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

high cpu usage after 916f9685fa42fc711f76a7f48d058e2656f7edf6 which changed Subscribe to nonblocking mode #959

Open
fortitudepub opened this issue Mar 22, 2024 · 1 comment

Comments

@fortitudepub
Copy link

fortitudepub commented Mar 22, 2024

in the following code snippets

		for {
			msgs, from, err := s.Receive()
			if err != nil {
				if err == syscall.EAGAIN {
					continue
				}
				if cberr != nil {
					cberr(fmt.Errorf("Receive failed: %v",
						err))

if the socket baking s is changed to non blocking mode as the commit 916f968 did, when there is no event in the socket, kernel will always return EAGAIN which cause the goroutine to a busy loop.

@fasaxc
Copy link
Contributor

fasaxc commented Jul 12, 2024

Looks like the bad commit was reverted here 1e68b27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants