[cups.bugs] [MOD] STR #2721: Busy loop in backendRunLoop (usb backend process hogs cpu)

Jan Darmochwal jdarmochwal at gmx.de
Wed Feb 27 09:58:37 PST 2008


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

I am using a Canon Pixma iP4300 with a proprietary driver and Cups 1.3.2 on
a Linux PC.
When I start a print Job, a "gs" process (started by the printer driver)
and a "usb" process each use about 50% of the cpu. The "usb" process
obviously is in a busy loop, since there is no data ready to be sent to
the printer.

That busy loop is the for-loop in backendRunLoop (backend/runloop.c)
In my case print_bytes is 0, side_cb is true, use_bc is false. The select
call returns immediately, because output is ready. But since no data is
available the loop just goes round and round.
I guess doing a select call just on the input file descriptors before the
current select call would help.

Link: http://www.cups.org/str.php?L2721
Version: 1.3.2





More information about the cups-devel mailing list