Skip to content

Graph thread always at 100% CPU #1440

@icetan

Description

@icetan

I'm having this issue where just running any mach program spawns a thread that is constantly at 100% CPU.

See the first process in this screenshot of htop:

I traced it to the Graph.processThread function that seems to be busy waiting on operations from the queue.

I made a naive patch that uses a Futex.wait that latches after each time the queue has been emptied and any time something pushes to the queue it wakes to start emptying the queue again.

This is how htop looks after applying the patch:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions