Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DBus backend high CPU usage and it grows over time #500

@devbis

Description

@devbis
  • bleak version: 0.11.0
  • Python version: 3.7.9
  • Operating System: OpenWrt 19.07
  • BlueZ version (bluetoothctl -v) in case of Linux: 5.50

Description

I'm using bleak to run scanning devices and connect to some other devices.
When I start my application it consumes high CPU percent but it is affordable.
About 30-60% of the 800MHz device.
And my application is responsive at the start so it is affordable.

After working for 10-20 hours CPU usage raising and it could take 95-100% all the time.
The problem It that it leads to timeout exceptions while tasks don't get their CPU time.

What I Did

  1. I restarted bluetoothd to flush caches or so, it didn't help
  2. I tried to investigate the source and monitored the number of tasks that are running. But the number of tasks is constant in general. (Some tasks appeared for connected devices and then they are stopped).

Actually, I'm empty of ideas how I can stop this growing CPU usage. What else can I check to find out the root of the problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Backend: BlueZIssues and PRs relating to the BlueZ backendbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions