Skip to content

High CPU usage for dronecan_bridge #83

@Ryanf55

Description

@Ryanf55

Steps to reproduce

Expected behavior

With nothing connected, there is very little work to do

Actual behavior

dronecan_bridge eats 100% of a CPU core.

Image

Image

Versions

$ python3 -m pip list | grep dronecan
dronecan                             1.0.25
dronecan_gui_tool                    1.2.27

Logs

Connected to can0
Connected to mcast:0
Exception in thread d1->d2:
Traceback (most recent call last):
  File "/home/ryan/.local/bin/dronecan_bridge.py", line 45, in loop
    frame = self.d1.receive(timeout=0.1)
  File "/home/ryan/.local/lib/python3.10/site-packages/dronecan/driver/socketcan.py", line 286, in receive
    packet_raw, ancdata, _flags, _addr = self.socket.recvmsg(self.FDFRAME_SIZE,
OSError: [Errno 100] Network is down

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ryan/.local/bin/dronecan_bridge.py", line 46, in loop
    except dronecan.driver.common.TransferError:
AttributeError: module 'dronecan.driver.common' has no attribute 'TransferError'
0.000/0.000 pkts/sec
0.000/0.000 pkts/sec
0.000/0.000 pkts/sec
0.000/0.000 pkts/sec
0.000/0.000 pkts/sec
0.000/0.000 pkts/sec

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