liferea keeps waking up the cpu a lot

Bug #114356 reported by Chris Jones
4
Affects Status Importance Assigned to Milestone
Liferea
Unknown
Unknown
liferea (Fedora)
Fix Released
Medium
liferea (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: liferea

Description of problem:
        /* setup the processing of feed update results */
        g_timeout_add_full(G_PRIORITY_DEFAULT_IDLE,
                           100,
                           update_dequeue_results,
                           NULL,
                           NULL);

this code sets a.. 100 miliseconds timer to look at a queue which will be empty
most of the time.

timer should only be set if there's actually anything in the queue...

Related branches

Revision history for this message
In , Arjan (arjan-redhat-bugs) wrote :

Description of problem:
        /* setup the processing of feed update results */
        g_timeout_add_full(G_PRIORITY_DEFAULT_IDLE,
                           100,
                           update_dequeue_results,
                           NULL,
                           NULL);

this code sets a.. 100 miliseconds timer to look at a queue which will be empty
most of the time.

timer should only be set if there's actually anything in the queue...

Revision history for this message
In , Brian (brian-redhat-bugs) wrote :
Revision history for this message
In , Arjan (arjan-redhat-bugs) wrote :

Created attachment 154598
Patch to fix the 100ms timer

The patch attached fixes the 100ms timer. There's still at least one
once-per-second timer left that also wants fixing; but the 100ms one is a good
start to get fixed soon.

Revision history for this message
Chris Jones (cmsj) wrote :

upstream bug contains a patch by Arjan van de Ven, attached here.

Changed in liferea:
status: Unknown → Confirmed
Changed in liferea:
importance: Undecided → Low
status: Unconfirmed → Confirmed
Revision history for this message
In , Brian (brian-redhat-bugs) wrote :

Applied patch, and tagged for F7. liferea-1.2.10c-2.fc7

sent patch to upstream.

Thanks, Arjan!

Revision history for this message
In , Bastien (bastien-redhat-bugs) wrote :

(In reply to comment #2)
<snip>
> There's still at least one
> once-per-second timer left that also wants fixing; but the 100ms one is a good
> start to get fixed soon.

So not quite fixed yet, reopening.

Revision history for this message
In , Brian (brian-redhat-bugs) wrote :

(In reply to comment #4)
> (In reply to comment #2)
> <snip>
> > There's still at least one
> > once-per-second timer left that also wants fixing; but the 100ms one is a good
> > start to get fixed soon.
>
> So not quite fixed yet, reopening.

From upstream:
Patch merged against 1.2.x and 1.3.x sources. I agree with changing the
100ms timer, but I do not with the second 1000ms which is only called
rarely (after HTTP errors) to allow 3 retries per request. So it is not
continuous timer and should cause not much load.

Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

Fixed in the upstream source tree, will be fixed in Ubuntu with the next upstream release.

Changed in liferea:
status: Confirmed → Fix Committed
Revision history for this message
In , Arjan (arjan-redhat-bugs) wrote :

the 1 second timer is in feedlist.c, it's to call feedlist_auto_update() it
seems.... that's not the same as the 1 second http error timer, which is also
there but which is perfectly fine

Changed in liferea:
status: Confirmed → In Progress
Revision history for this message
In , Jeff (jeff-redhat-bugs) wrote :

While the last patch (applied in liferea-1.2.10c-2.fc7) helped a little. I think
there still needs to be much more done here. Before the patch liferea caused
about 170 wakeups a second according to powertop. Now it's down to around 160.
That still seems unreasonably high to me.

Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

Thanks for the sponsor Sebastian!

Accepted:
 OK: liferea_1.2.15-0ubuntu1.dsc
     -> Component: main Section: gnome
 OK: liferea_1.2.15.orig.tar.gz
 OK: liferea_1.2.15-0ubuntu1.diff.gz

********* *BEGIN ENCRYPTED or SIGNED PART* *********

Format: 1.7
Date: Thu, 17 May 2007 20:02:31 +0200
Source: liferea
Binary: liferea-mozilla liferea-gtkhtml liferea
Architecture: source
Version: 1.2.15-0ubuntu1
Distribution: gutsy
Urgency: low
Maintainer: Ubuntu Core Developers <email address hidden>
Changed-By: Emilio Pozuelo Monfort <email address hidden>
Description:
 liferea - feed aggregator for GNOME
 liferea-gtkhtml - transitional dummy package
 liferea-mozilla - transitional dummy package
Launchpad-Bugs-Fixed: 85650 114356
Changes:
 liferea (1.2.15-0ubuntu1) gutsy; urgency=low
 .
   * New upstream release (LP: #85650, #114356)
     - Better update result processing timer, should cause
       less CPU usage. (patch from Arjan van de Ven)
     - Increased security: disallowing clicking on file://
       links in the rendering widget, as well as preventing
       from opening such links using the context menu.
     - Fixes unresolved symbol in LUA binding.
       (SF #1720462, reported by Jonathan Cristoforetti)
     - Fixes broken base URL when selecting items in 3 pane
       mode from folders.
Files:
 75923bb0d6ddd7cb8653c73bf71f414e 955 gnome optional liferea_1.2.15-0ubuntu1.dsc
 23cb1c238f6806b53d8e340b830f1ff0 1429470 gnome optional liferea_1.2.15.orig.tar.gz
 d9a961e20c7b64411c562c13e6c669e7 12671 gnome optional liferea_1.2.15-0ubuntu1.diff.gz
Original-Maintainer: Franz Pletz <email address hidden>

********** *END ENCRYPTED or SIGNED PART* **********

Changed in liferea:
status: Fix Committed → Fix Released
Revision history for this message
In , Brian (brian-redhat-bugs) wrote :

*** Bug 246021 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

liferea-1.2.19-2.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Need (need-redhat-bugs) wrote :

WFM thanks!

Revision history for this message
In , Need (need-redhat-bugs) wrote :

liferea-1.2.19-2.fc7

Not sure if this is related, but liferea is stuck in a loop at the moment,
eating cpu. strace shows:
brk(0xdd35000) = 0xdd35000
brk(0xdd56000) = 0xdd56000
brk(0xdd77000) = 0xdd77000
brk(0xdd98000) = 0xdd98000
brk(0xddb9000) = 0xddb9000
brk(0xddda000) = 0xddda000
brk(0xddfb000) = 0xddfb000
brk(0xde1c000) = 0xde1c000
brk(0xde3d000) = 0xde3d000
brk(0xde5e000) = 0xde5e000
brk(0xde7f000) = 0xde7f000

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

liferea-1.2.19-2.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.

Changed in liferea:
status: In Progress → Fix Released
Changed in liferea (Fedora):
importance: Unknown → Medium
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.