Opened 8 years ago

Last modified 5 years 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@…> 8 years ago.
Simple sample that demonstrates the problem.

Download all attachments as: .zip

Change History (5)

by Christopher Moore <crmoore@…>, 8 years ago

Attachment: main.cpp added

Simple sample that demonstrates the problem.

comment:1 by repetier, 8 years ago

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 by repetier, 7 years ago

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 by falolabaker@…, 5 years ago

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 by anonymous, 5 years ago

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