Opened 4 years ago

Last modified 10 months ago

#10496 new Bugs

100% cpu usage when reading serial port on MacOSX

Reported by: Christopher Moore <crmoore@…> Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.58.0 Severity: Problem
Keywords: Cc: nknotts@…

Description

Simple test program is attached. All it does is setup a serial port and start waiting for data. It prints the first data it receives, and quits. It is using 100% cpu (according to activity monitor).

I've tried with the following serial ports: silab usb adapter, prolific usb adapter, and pty with master attached to socat.

The profiler puts most of the time in kevent called from boost::asio::detail::kqueue_reactor::run(bool, boost::asio::detail::op_queue<boost::asio::detail::task_io_service_operation>&)

Attachments (1)

main.cpp (1.2 KB) - added by Christopher Moore <crmoore@…> 4 years ago.
Simple sample that demonstrates the problem.

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by Christopher Moore <crmoore@…>

Attachment: main.cpp added

Simple sample that demonstrates the problem.

comment:1 Changed 4 years ago by repetier

I can confirm this on Mac OS X 10.9. I use it for communication with 3d printer. Going back to boost 1.53 solved the issue, but at some time I want to use the current version. Tried to see what causes it, but I'm not familiar enough to understand how all the classes are connected.

comment:2 Changed 3 years ago by repetier

Version: Boost 1.56.0Boost 1.57.0

Just a follow up for those finding this entry.

asio included in 1.57 has solved the problem.

comment:3 Changed 10 months ago by falolabaker@…

I am still having this issue on version 1.58.0 on ubuntu. Any workaround for now will be appreciated. Is this resolved in latter version of boost?

comment:4 Changed 10 months ago by anonymous

Version: Boost 1.57.0Boost 1.58.0
Note: See TracTickets for help on using tickets.