hybserv needlessly wakes up every 200 microseconds

Bug #821950 reported by Malcolm Scott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hybserv (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hybserv (src/sock.c) calls select() with a 200μs timeout in a loop which effectively just repeats the call if no activity was detected. This is a problem for CPU power management (the CPU can't go to sleep even if hybserv appears idle).

This behaviour is present in at least 1.9.2-4.1, i.e. at least in lucid, maverick, natty and oneiric.

Tags: patch
Revision history for this message
Malcolm Scott (malcscott) wrote :

Here's my simple solution. I've been running with this patch for several months with no problems whatsoever.

Revision history for this message
Quyse Lert (quyse) wrote :

Similar bug on Debian tracker:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614928

That submitter's patch looks a bit more accurate than provided above.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "debdiff" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

Hi,

hybserv has been removed from Debian and thus will not be part of Precise, so I'm not sure this makes sense to fix it.
It you feel that this is worth a SRU (Stable Release Update. You can find a description there: https://wiki.ubuntu.com/StableReleaseUpdates ), please follow the process described at the previous link.

I'm unsubscribing sponsors for the moment: please subscribe sponsors again as soon as you get the SRU part sorted out.

Thanks,
Fabrice

Revision history for this message
Malcolm Scott (malcscott) wrote :

For what it's worth, I've improved my patch -- the previous one, with no timeout whatsoever, caused periodic checks (the calls to DoTimer()) which are intended to be run once per second to be delayed on quiet servers. The new one uses a 1-second timeout.

It's a shame hybserv has been dropped -- I still actively use it and intend to continue to do so. If it helps, I would be happy to lend a hand with the maintenance of this package.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.