Skip to content

Conversation

@rafaelfranca
Copy link
Member

The code was modifying the excluded array while iterating over it with .each. In Ruby, .each continues to process newly added elements, which can cause excessive iterations or infinite loops when circular dependencies are present in the gem graph.

This caused 100% CPU usage in some environments.

Fixes #3912

The code was modifying the `excluded` array while iterating over it
with `.each`. In Ruby, `.each` continues to process newly added
elements, which can cause excessive iterations or infinite loops when
circular dependencies are present in the gem graph.

This caused 100% CPU usage in some environments.

Fixes #3912
@rafaelfranca rafaelfranca requested a review from a team as a code owner January 21, 2026 23:11
@rafaelfranca rafaelfranca added bugfix This PR will fix an existing bug server This pull request should be included in the server gem's release notes labels Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This PR will fix an existing bug server This pull request should be included in the server gem's release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

100% CPU usage, circular dependency on indexer

1 participant