evolution (e-calendar-factory) memory leak

Bug #648618 reported by Corneil du Plessis
226
This bug affects 43 people
Affects Status Importance Assigned to Milestone
Evolution
Fix Released
Medium
evolution (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Sometimes when I browse my caldav or google calendars the memory usage on evolution exchange data server increases rapidly to consume all available memory on the machine. I am going to install bug buddy as soon as I am connected to ADSL network to reproduce.

Revision history for this message
actionparsnip (andrew-woodhead666) wrote :

Can you give the output of:

dpkg -l | grep evolu; uname -a; lsb_release -a

Thanks

Revision history for this message
Corneil du Plessis (corneil-wbs) wrote :

ii evolution 2.28.3-0ubuntu10 groupware suite with mail client and organiz
ii evolution-common 2.28.3-0ubuntu10 architecture independent files for Evolution
ii evolution-couchdb 0.4.5-0ubuntu1 Evolution support for CouchDB databases
ii evolution-data-server 2.28.3.1-0ubuntu5 evolution database backend server
ii evolution-data-server-common 2.28.3.1-0ubuntu5 architecture independent files for Evolution
ii evolution-data-server-dbg 2.28.3.1-0ubuntu5 evolution database backend server with debug
ii evolution-dbg 2.28.3-0ubuntu10 debugging symbols for Evolution
ii evolution-exchange 2.28.3-0ubuntu1 Exchange plugin for the Evolution groupware
ii evolution-indicator 0.2.8-0ubuntu1 GNOME panel indicator applet for Evolution
ii evolution-plugins 2.28.3-0ubuntu10 standard plugins for Evolution
ii evolution-webcal 2.28.0-1 webcal: URL handler for GNOME and Evolution
ii libebackend1.2-0 2.28.3.1-0ubuntu5 Utility library for evolution data servers
ii libebook1.2-9 2.28.3.1-0ubuntu5 Client library for evolution address books
ii libecal1.2-7 2.28.3.1-0ubuntu5 Client library for evolution calendars
ii libedata-book1.2-2 2.28.3.1-0ubuntu5 Backend library for evolution address books
ii libedata-cal1.2-6 2.28.3.1-0ubuntu5 Backend library for evolution calendars
ii libedataserver1.2-11 2.28.3.1-0ubuntu5 Utility library for evolution data servers
ii libedataserverui1.2-8 2.28.3.1-0ubuntu5 GUI utility library for evolution data serve
Linux tscdev3 2.6.32-24-preempt #43-Ubuntu SMP PREEMPT Thu Sep 16 17:13:25 UTC 2010 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid

Revision history for this message
Corneil du Plessis (corneil-wbs) wrote :

How do I update to 2.30

Revision history for this message
Corneil du Plessis (corneil-wbs) wrote :
Revision history for this message
Corneil du Plessis (corneil-wbs) wrote :

Now a process named e-calendar-factory has a memory leak and grows to 2.5G usage in a few seconds and CPU at 98%.
The only functionality I can link it to is my Google Calendar. I have removed my CalDAV calendar. The memory jump as soon as I start viewing my Google Calendar and then the machine becomes pretty useless.

This bug has been reported against a lot of evolution versions. I can't see why it is still around.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please try to obtain a valgrind log following the instructions at https://wiki.ubuntu.com/Valgrind and attach the file to the bug report. This will greatly help us in tracking down your problem.

Changed in evolution (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Corneil du Plessis (corneil-wbs) wrote : Re: [Bug 648618] Re: evolution memory leak

Will valgrind check the processes launch by a program as well?
evolution launches e-calendar-factory and the leak is in e-calendar-factory?

On Thu, Sep 30, 2010 at 4:08 PM, Pedro Villavicencio <email address hidden> wrote:
> Thank you for taking the time to report this bug and helping to make
> Ubuntu better.  Please try to obtain a valgrind log following the
> instructions at https://wiki.ubuntu.com/Valgrind and attach the file to
> the bug report. This will greatly help us in tracking down your problem.
>
> ** Changed in: evolution (Ubuntu)
>   Importance: Undecided => Medium
>
> ** Changed in: evolution (Ubuntu)
>       Status: New => Incomplete
>
> --
> evolution memory leak
> https://bugs.launchpad.net/bugs/648618
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “evolution” package in Ubuntu: Incomplete
>
> Bug description:
> Sometimes when I browse my caldav or google calendars the memory usage on evolution exchange data server increases rapidly to consume all available memory on the machine. I am going to install bug buddy as soon as I am connected to ADSL network to reproduce.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/648618/+subscribe
>

Revision history for this message
Corneil du Plessis (corneil-wbs) wrote : Re: evolution memory leak

I hope these logs helps, I used vaalgrind to launch e-calendar-factory the launched evolution and browsed my GoogleCalendar and the memcheck process ran up to available memory. After a while I stopped evolution and waited to see if e-calendar-factory will shutdown when it did not I sent a kill to the process.
The log file attached.

Revision history for this message
Corneil du Plessis (corneil-wbs) wrote :

Just to make sure you have the right packages:

ii evolution 2.30.3-0ubuntu1~ppa0 groupware suite with mail client and organiz
ii evolution-common 2.30.3-0ubuntu1~ppa0 architecture independent files for Evolution
ii evolution-couchdb 0.4.93-0ubuntu2~ppa0 Evolution support for CouchDB databases
ii evolution-data-server 2.30.3-0ubuntu1~ppa0 evolution database backend server
ii evolution-data-server-common 2.30.3-0ubuntu1~ppa0 architecture independent files for Evolution
ii evolution-data-server-dbg 2.30.3-0ubuntu1~ppa0 evolution database backend server with debug
ii evolution-dbg 2.30.3-0ubuntu1~ppa0 debugging symbols for Evolution
ii evolution-exchange 2.30.3-0ubuntu1~ppa1 Exchange plugin for the Evolution groupware
ii evolution-indicator 0.2.10-0ubuntu1~ppa0 GNOME panel indicator applet for Evolution
ii evolution-plugins 2.30.3-0ubuntu1~ppa0 standard plugins for Evolution
ii libebackend1.2-0 2.30.3-0ubuntu1~ppa0 Utility library for evolution data servers
ii libebook1.2-9 2.30.3-0ubuntu1~ppa0 Client library for evolution address books
ii libecal1.2-7 2.30.3-0ubuntu1~ppa0 Client library for evolution calendars
ii libedata-book1.2-2 2.30.3-0ubuntu1~ppa0 Backend library for evolution address books
ii libedata-cal1.2-6 2.28.3.1-0ubuntu5 Backend library for evolution calendars
ii libedata-cal1.2-7 2.30.3-0ubuntu1~ppa0 Backend library for evolution calendars
ii libedataserver1.2-11 2.28.3.1-0ubuntu5 Utility library for evolution data servers
ii libedataserver1.2-13 2.30.3-0ubuntu1~ppa0 Utility library for evolution data servers
ii libedataserverui1.2-8 2.30.3-0ubuntu1~ppa0 GUI utility library for evolution data serve
ii libevolution 2.30.3-0ubuntu1~ppa0 evolution libraries
Linux tscdev3 2.6.32-25-preempt #44-Ubuntu SMP PREEMPT Fri Sep 17 22:21:55 UTC 2010 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid

Revision history for this message
Dilton McGowan II (diltonm) wrote :

This bug affects me and seems to be a morph of the problem I reported here in Ubuntu 10.04:

https://bugzilla.gnome.org/show_bug.cgi?id=615371#add_comment
https://bugs.launchpad.net/evolution-data-server/+bug/569818?comments=all

Revision history for this message
Corneil du Plessis (corneil-wbs) wrote :

Just upgraded to 10.10 running Evolution 2.30.3
The leak still exists when creating a Calendar to a Google Calendar.

Revision history for this message
Corneil du Plessis (corneil-wbs) wrote :

Noticed an update to evolution on ubuntu 10.10.
I applied the update and tested google calendar once again.
The memory leak occured again as soon as the calendar is being loaded.

Revision history for this message
Harold Liebregs (h-liebregs) wrote :

Same massive memory leak here, however without the high CPU usage. I am also using 10.10 64 bit. I think the problem started after a recent update (using the proposed repository). I am not sure if it is related, but I also noticed that the calendar in the side panel no longer indicates if there are items on a specific day by making that day bold. The numbers of the days are now all italic. This is only the case if google-calendar is selected. If I select local calendars, everything is ok.

Revision history for this message
Willem Pieterson (wpieterson) wrote :

I Also have this problem.. The process eats up around 1GiB of memory. It happens most of the time when creating entries in a Google Calender

Revision history for this message
Luke Plant (spookylukey) wrote :

Moved form incomplete to confirmed, as the requested valgrind logs have been attached, and enough people (including myself) seem to seeing this.

Changed in evolution (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Hi,

Could someone seeing this issue try doing the same operations that see to trigger leaks but on a Live CD session of the development release of Ubuntu, Natty Narwhal? You can find out more about the development release at http://www.ubuntu.com/testing/ . Thanks again and we appreciate your help.

Revision history for this message
Corneil du Plessis (corneil-wbs) wrote :

I just tested with Natty LiveCD on my USB stick.

The e-calendar-factory memory increased again until all available was consumed. This time it ended in a crash report which I submitted.

Revision history for this message
Bryan Zimmerman (codeabit) wrote :

I Also have this problem. The e-calendar-factory process eats up over 1GiB of memory. It doesn't seem to start until I view my evolution calendar for the first time, which has entries that are synchronised with Google calendar. I'm running Maverick.

Revision history for this message
Dilton McGowan II (diltonm) wrote :

About a year ago I updated our systems to run a cron job once a day which runs the following script (and updated it a few months ago to kill the calendar factory too) as long as the evolution UI isn't running:

### cron job
0 2 * * * /home/diltonm/bin/stopEvolution.sh 1>/dev/null 2>&1

### evolution kill script
#!/bin/sh

# exit if evolution client is running
#EVO=`ps -ef|grep -i "evolution --component=mail"|grep -v grep|awk {'print $2'}`
EVO=`ps -ef|grep -i "evolution --component=mail"|grep -v grep`
if [ -n "$EVO" ]; then
  exit
else
  # kill existing evolution to workaround memory leak
  evolution --force-shutdown
  pkill e-calendar-fac
fi

Revision history for this message
eric (obrowny06) wrote :

I have the same problem. It eats all my memory within few minutes. Every time I swicth my computer on, I have to kill the process.
Before on Ubuntu 10.04 it was "evolution-data-server" and now it is with "e-calendar-factory"

One interesting thing is :

If I am connected to the internet on startup, the memory leak happens.
If I am not connected to the internet, this memory leak does not happen.
If I am not connected to the internet on startup but connect it after boot is complete, memory leak does not occur.

thanks

Revision history for this message
Corneil du Plessis (corneil-wbs) wrote :

The comment from @obrowny makes me think that the problem might occur where one process is connecting to calendar and waiting process tries the same and then overwrites a pointer when it creates a connection.

Revision history for this message
produnis (schlarmann-uni-wh) wrote :

same problem here, using Lucid64bit and Evolution with GoogleCalendar...
:(

Revision history for this message
Chris Hubick (hubick) wrote :
Changed in evolution:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

The fix in the upstream bug is already in Natty, marking this bug Fix Released.

Changed in evolution (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
corneil (corneil) wrote :

I downloaded Natty Beta 1 and configured my Google Account with IMAP and then after sync was complete I configured my Google Calendar.
Memory usage on e-calendar factory climbs until out of physical memory and then crashed with no AppPort dialog.

If you can't reproduce I think it may be a timing thing because I am in South Africa and ping to google is around 250ms.

Revision history for this message
John Clemens (clemej) wrote :

Saw this today at work, running latest natty. I configured my work calendar (through caldav) then configured my google calendars. went to a meeting and came back to discover e-calendar-factory consuming 2.5G RSS and climbing. I'll try disabling my google calendars and see if that's the issue. Note, I had 1 caldav and 2 google calendars configured.

Revision history for this message
Matt Clarkson (drmattoclarkson) wrote :

This seems to still be present on Natty. I am connecting to a davical server.

Revision history for this message
Unkraut (unkraut2) wrote :

This problem is still present in natty! Please reopen. On my PC e-calendar-factory currently uses 4,7GB !!! I'm using google calendar

Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

I confirm that this bug i definitely not fixed as of natty's evolution-data-server (2.32.2-0ubuntu2). I still observe the same problem with e-calendar-factory that I've seen since (at least) maverick's release...

As many have reported, the process e-calendar-factory leaks memory without bound, even with a quite simple calendar configuration (e.g. just a couple of lightly used google calendars). Since e-calendar-factory runs continuously -- even if Evolution is closed -- eventually it eats all of system memory and kills the whole system. The only work-around is to manually kill the e-calendar-factory process.

Today, I determined that I can easily demonstrate the problem. These steps make my e-calendar-factory grow by many megabytes (given my configuration (just a couple of google calendars):

1. run 'top' and locate the e-calendar-factory process (press 'O' then 'n' to sort top's display by memory by amount of memory used)
2. observe the VIRT and RES (memory usage) columns associated with e-calendar-factory
3. now click the date/time indicator in the unity or gnome-shell panel to bring up the popup calendar/agenda
4. now click the desktop to make the popup calendar/agenda go away
5. observe the memory usage of e-calendar-factory in 'top' -- in my case it jumps by 1 to 2 MB
6. repeat from step 3 ... observe that every time you bring up the calendar popup and then close it, e-calendar-factory jumps by 1 to 2 MB.
(This might not be the only thing that makes e-calendar-factory leak, but it does always cause such a leak for me.

Others experiencing the problem, please advise: Can you also force this easily observable leak using the sequence above?

I will continue to investigate the problem.

Changed in evolution (Ubuntu):
assignee: nobody → Kamal Mostafa (kamalmostafa)
importance: Medium → High
status: Fix Released → Confirmed
summary: - evolution memory leak
+ evolution (e-calendar-factory) memory leak
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

Attached valgrind log 'valgrind-natty-e-calendar-factory.log.gz' was generated with -dbg packages and a "-g -O0" build of e-calendar-factory. Popping up and then dismissing the panel calendar popup (as described in my previous post) causes valgrind to yield an ever-increasing number of memory blocks "still reachable" each time I do that. I believe these blocks are effectively lost and won't ever be freed, and that they are the major source of the e-calendar-factory memory leak problem (several test runs suggest so).

I hope this helps the Evolution developers to track down and squash the bug.

The big leaks all seem to come from a stack stemming from send_and_handle_redirection()'s call to the libsoup send_message() routine, at e-cal-backend-caldav.c:933 as shown in the last three valgrind error blocks, e.g.:

==30646== 17,809,408 bytes in 1,087 blocks are still reachable in loss record 4,182 of 4,182
==30646== at 0x4C28FAC: malloc (vg_replace_malloc.c:236)
==30646== by 0x4C29026: realloc (vg_replace_malloc.c:525)
==30646== by 0x114710FF: _gnutls_recv_int (gnutls_record.c:813)
==30646== by 0x15A9F40E: ??? (in /usr/lib/x86_64-linux-gnu/gio/modules/libgiognutls.so)
==30646== by 0x793E1CE: g_input_stream_read (ginputstream.c:204)
==30646== by 0x73741D2: read_from_network (soup-socket.c:1157)
==30646== by 0x73763F4: soup_socket_read_until (soup-socket.c:1329)
==30646== by 0x7365C3F: read_metadata (soup-message-io.c:285)
==30646== by 0x7366C14: io_read (soup-message-io.c:848)
==30646== by 0x73738F0: process_queue_item (soup-session-sync.c:287)
==30646== by 0x7373CF2: send_message (soup-session-sync.c:366)
==30646== by 0x1377C202: send_and_handle_redirection (e-cal-backend-caldav.c:933)
==30646== by 0x1377C3EA: caldav_server_open_calendar (e-cal-backend-caldav.c:988)
==30646== by 0x1377FECB: caldav_do_open (e-cal-backend-caldav.c:2374)
==30646== [.... more stack trace; see attached file ....]

Changed in evolution (Ubuntu):
assignee: Kamal Mostafa (kamalmostafa) → nobody
status: Confirmed → Triaged
Revision history for this message
JazZ (misterj-home) wrote :

I confirm this bug on Natty. I need to restart my computer/kill the calendar process after 2 days of working (2Gb of memory).

Revision history for this message
Yann Dupont (yann-dupont) wrote :

Also suffering of this Bug in Natty. Accessing to zimbra calendars using caldav. Need to restart every 2/3 days.

Revision history for this message
Darren Davison (darren-davisononline) wrote :

likewise with Google calendars. Utterly unusable.. switching away from Evolution (again). Maybe one day it will work but I've tried it now in eleven successive releases of Ubuntu and I'm still waiting for that to happen. Microsoft may write an awful lot of bloatware, but this pile of garbage beats anything ever to come out of Redmond. :(

Revision history for this message
Keith David Tyler (ubuntu-keithtyler) wrote :

FWIW I did not have this problem prior to fresh-installing Natty x64.

My previous install started as a Lucid i686 UNE install (with the netbook meta-package removed). I upgraded to Maverick, and then Natty using Software Update tool.

When Gnome Classic session became too unstable, I trashed /usr, /, and /var partitions, and installed Natty fresh from LiveCD. This time I used x64 instead of i686 as I discovered my box was 64-bit.

I don't know if it was the fresh install, or the switch to a 64-bit version, that led to the issue. But I recently found my computer lagging heavily, memory pegged, CPU pegged, tons of it IOWAIT. System Monitor showed e-calendar-factory as using 1.7 GiB of memory! Nuking it brought it back to normal -- but it restarts automatically, so this is inevitable.

BTW I do have a Google Calendar hooked into Evolution Calendar. But I did before, too.

Revision history for this message
Phil Ayres (ayres-phil) wrote :

I've been struggling with this bug since upgrading from 10.04 to 10.10 then 11.04. I'm on 32 bit Intel, kernel 2.6.38-11-generic
Evolution is whatever version is current right now. I have two Google calendars configured and I've stopped using the Evolution UI in the hope that I can avoid this issue (its better without the UI, but the calendar panel must be killing this).

Let me know if there is anything I can do to help.

Revision history for this message
Phil Ayres (ayres-phil) wrote :

Continuing my previous thought, if it would help the developers directly identify the problem, I'm happy to set up a couple of Google calendars in my corporate Google account, so they can play with this directly. Just let me know.

Revision history for this message
Phil Ayres (ayres-phil) wrote :

I finally updated to Ubuntu 11.10 and scrapped Evolution because of this, and some other annoyances. Completely scrapped it. Unfortunately that meant I had no clock on my panel, as the Evolution data server is a dependency (hmm, poor segregation of duties there). I wanted a clock, so I uninstalled evolution (sudo apt-get remove evolution*) and wrote my own clock applet (first time developing an appindicator or Python). So if anybody else suffers from this, moves to Thunderbird and Lightning and wants to purge everything Evo, you can do so, and still know what day of the week it is. If anybody is interested, see: http://softwarestupidstuff.blogspot.com/2011/10/unity-on-ubuntu-1110-and-no-clock-date.html

Revision history for this message
Jörg Frings-Fürst (jff-de) wrote :

Lucid Desktop longer supported
please change status to Won't Fix or Fixed release (see gnome-bug)

Revision history for this message
Jörg Frings-Fürst (jff-de) wrote :

done

Changed in evolution (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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