offlineimap constantly goes for a spin consuming 100% cpu

Bug #364481 reported by Amit Kucheria
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
offlineimap (Debian)
Fix Released
Unknown
offlineimap (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Binary package hint: offlineimap

Since upgrading to Jaunty, offlineimap (to my google accounts) pegs the CPU at 100% several times a day.

The only option left to cool down my CPU then is to kill offlineimap. A quick strace revealed the following. So it does feel like it is in a loop. I'll attach more info as I debug the problem, but could this be related to a new version of python or other dependencies?

strace -p 13888
Process 13888 attached - interrupt to quit
select(0, NULL, NULL, NULL, {0, 643342}) = 0 (Timeout)
futex(0x8450878, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x8450878, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x8450878, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x8450878, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x8450878, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x8450878, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8450878, FUTEX_WAKE_PRIVATE, 1) = 1
select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
futex(0x8450878, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x8450878, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8450878, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8450878, FUTEX_WAKE_PRIVATE, 1) = 1
select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
futex(0x8450878, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8450878, FUTEX_WAKE_PRIVATE, 1) = 1
select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
futex(0x8450878, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x8450878, FUTEX_WAKE_PRIVATE, 1) = 1

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: offlineimap 6.0.3ubuntu1
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
 LC_PAPER=a4
SourcePackage: offlineimap
Uname: Linux 2.6.28-11-generic i686

Revision history for this message
Amit Kucheria (amitk) wrote :
Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

Do you run offlineimap with any kind of front-end; or does do you have it running as a daemon?

Changed in offlineimap (Ubuntu):
assignee: nobody → andreas-wenning
status: New → Incomplete
Revision history for this message
Amit Kucheria (amitk) wrote : Re: [Bug 364481] Re: offlineimap constantly goes for a spin consuming 100% cpu

> Do you run offlineimap with any kind of front-end; or does do you have
> it running as a daemon?

Through cron. My crontab entry is:

# fetch email every 10mins - less causes gmail problems
*/10 * * * * $HOME/bin/cron-run-offlineimap.sh

And cron-run-offlineimap.sh is:

#!/bin/sh

# Run offlineimap through cron to fetch email periodically

ps aux | grep "\/usr\/bin\/offlineimap"

if [ $? -eq "0" ]; then
 logger -i -t offlineimap "Another instance of offlineimap running. Exiting."
 exit 0;
else
 logger -i -t offlineimap "Starting offlineimap..."
 offlineimap -u Noninteractive.Basic
 logger -i -t offlineimap "Done offlineimap..."
fi

Revision history for this message
Amit Kucheria (amitk) wrote :

Bug still exists. I have upgrade to Karmic though.

Changed in offlineimap (Ubuntu):
status: Incomplete → New
Revision history for this message
centyx (centyx-centyx) wrote :

I am also experiencing this issue - and I run offlineimap in a similar way: launched from a shell script via cron every five minutes.

My shell script sleeps for 10 and then kills the child offlineimap process if it is still running. This is because of another bug where offlineimap will hang indefinitely if it is unable to reach one of the IMAP servers ( or if my internet connection terminates temporarily ).

Amit Kucheria (amitk)
Changed in offlineimap (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Reuben Thomas (rrt) wrote :

See also Debian bug #525007 (inconclusive, but the symptoms I was having seem to be the same).

Revision history for this message
Amit Kucheria (amitk) wrote : Re: [Bug 364481] Re: offlineimap constantly goes for a spin consuming 100% cpu

On 09 Jun 30, Reuben Thomas wrote:
> See also Debian bug #525007 (inconclusive, but the symptoms I was having
> seem to be the same).

The common thing in between your report and mine, now that you've
brought it to my attention, is that I too have a flaky ADSL link.
Although it is 10/1Mbit, ping times to google.com go from 40ms to 8000ms
once or twice a day.

I will watch out for a correlation between huge network latencies and
the CPU spike from now on.

Changed in offlineimap (Debian):
status: Unknown → New
Revision history for this message
Pär Lindfors (paran) wrote :

Do you still see this problem with 6.2.0ubuntu2 in karmic? 6.2.0 is
supposed to fix several connection issues according to the changelog.

The commit 30344587d9a62a92d921f6643bdf1384cd6b5a9f (not in 6.2.0)
also looks like it might be relevant.

Revision history for this message
Amit Kucheria (amitk) wrote :

On 09 Oct 03, Pär Andersson wrote:
> Do you still see this problem with 6.2.0ubuntu2 in karmic? 6.2.0 is
> supposed to fix several connection issues according to the changelog.
>
> The commit 30344587d9a62a92d921f6643bdf1384cd6b5a9f (not in 6.2.0)
> also looks like it might be relevant.

This problem still exists. Every other day I have to kill the offlineimap cron
job that is stuck since the night before.

Changed in offlineimap (Ubuntu):
assignee: Andreas Wenning (andreas-wenning) → nobody
Revision history for this message
Ha-Duong Nguyen (cmpitg) wrote :

This problem still insists in Ubuntu Lucid Lynx. According to Debian's closed <a href="http://<email address hidden>/msg132917.html">bug #265088</a>, this has been fixed. I wonder if it has been included into the downstream.

Revision history for this message
Adam Bolte (boltronics) wrote :

bug #265088 (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=265088) relates to a memory leak - not CPU. I don't have significant memory issues, but always have one core/thread maxed out on my i7 due to this.

By now I'm running Natty. :(

Changed in offlineimap (Debian):
status: New → Fix Released
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.