KumarRobotics / ublox

A driver for ublox gps
BSD 3-Clause "New" or "Revised" License
438 stars 381 forks source link

Massive error logging on device disconnection ("input buffer read error: End of file, 0") #129

Open namiota opened 3 years ago

namiota commented 3 years ago

Hello,

I'm using:

After connecting to the device, when I unplug the USB cable from the device, massive error logging occurs (about 3000 logs per second):

[ERROR] [1619601474.127914324]: U-Blox ASIO input buffer read error: End of file, 0
[ERROR] [1619601474.127942722]: U-Blox ASIO input buffer read error: End of file, 0
[ERROR] [1619601474.127965220]: U-Blox ASIO input buffer read error: End of file, 0
[ERROR] [1619601474.127986818]: U-Blox ASIO input buffer read error: End of file, 0
[ERROR] [1619601474.128017641]: U-Blox ASIO input buffer read error: End of file, 0
[ERROR] [1619601474.128053359]: U-Blox ASIO input buffer read error: End of file, 0
[ERROR] [1619601474.128084668]: U-Blox ASIO input buffer read error: End of file, 0
[ERROR] [1619601474.128112069]: U-Blox ASIO input buffer read error: End of file, 0
[ERROR] [1619601474.128142295]: U-Blox ASIO input buffer read error: End of file, 0

A simple solution is to throttle log in that particular situation: https://github.com/KumarRobotics/ublox/blob/master/ublox_gps/include/ublox_gps/async_worker.h#L219

ROS_ERROR_THROTTLE(10, "U-Blox ASIO input buffer read error: %s, %li",
          error.message().c_str(),
          bytes_transfered);

But still process is trying to read continuously with error and one CPU core has 100% usage.

Could you recommend how to resolve this issue? Best regards, Jacek.

airuchen commented 2 years ago

Hi @namiota, have you found any workaround for the issue?