beam.smp uses lots of CPU on desktopcouch contacts lookup

Bug #458453 reported by Matt Price
216
This bug affects 48 people
Affects Status Importance Assigned to Milestone
Gwibber
Won't Fix
Undecided
Unassigned
desktopcouch
Expired
High
Unassigned
evolution-couchdb
Fix Released
Undecided
Ubuntu One Client Engineering team
Baltix
New
Undecided
Unassigned
desktopcouch (Ubuntu)
Incomplete
High
Ubuntu One Client Engineering team
Lucid
Won't Fix
High
Ubuntu One Client Engineering team
erlang (Ubuntu)
Invalid
Undecided
Unassigned
Lucid
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: erlang

i'm having very slow automatic contacts lookup under karmic using evolution 2.28.1-oubuntu1, erlang-base 1:13.b.1-dfsg-2ubuntu1, and desktopcouch 0.4.4-0ubuntu1. CPU usage by beam.smp spikes up to about 80% and stays there for multiple seconds -- i'd say as long 20-30 -- before allowing input to continue. it renders the automatic contact lookup actually counterproductive, not helpful.

would love to help squash thisbug, please advice where i should look to try and help.

matt

ProblemType: Bug
Architecture: i386
Date: Thu Oct 22 15:02:41 2009
DistroRelease: Ubuntu 9.10
Package: erlang-base 1:13.b.1-dfsg-2ubuntu1
ProcEnviron:
 LANGUAGE=en_CA.UTF-8
 PATH=(custom, no user)
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: erlang
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
Matt Price (matt-price) wrote :
Elliot Murphy (statik)
Changed in desktopcouch:
assignee: nobody → Chad Miller (cmiller)
Revision history for this message
Chad Miller (cmiller) wrote :

I think there are two different problems here:

1) UI is synchronous.

2) retrieving records takes a long time. It could be the view is not written well, or that there is a lot of data to sort through in the database.

Revision history for this message
Ciccio (franapoli) wrote :

I got here googling beam.smp because 1 minute ago my Evolution was stuck trying to send an email. I looked at the active processes and that beam.smp was using half my CPU. It took about 30 seconds to get back in control. This happens to me from time to time but I still can't figure out how to reproduce the problem.
GNOME evolution 2.28.1, Ubuntu 9.10, 2.6.31-16-generic.

Rick McBride (rmcbride)
Changed in desktopcouch:
status: New → Confirmed
Changed in desktopcouch:
assignee: Chad Miller (cmiller) → Ubuntu One Desktop+ team (uone-desktop)
tags: added: desktop+
Changed in erlang (Ubuntu):
status: New → Invalid
Changed in evolution-couchdb:
status: New → Confirmed
assignee: nobody → Ubuntu One Desktop+ team (uone-desktop)
John Lenton (chipaca)
tags: added: u1-lucid
tags: added: package
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

UI is not synchonous, it does search asynchronously, so the problem seems to be on CouchDB itself, as Chad says

Changed in evolution-couchdb:
status: Confirmed → Invalid
Chad Miller (cmiller)
summary: - beam.smp uses 80% CPU on desktopcouch contacts lookup
+ beam.smp uses lots of CPU on desktopcouch contacts lookup
Revision history for this message
Jose Manuel Velasco Martínez (amimusa) wrote :

love Greetings and happy moment :)

As (Ciccio wrote on 2009-12-24:) I googled looking for bean.smp because I didn't know what process it is about and I realized maybe it is related with a problem I am experiencing this morning.

I try to start evolution, but it hangs starting although "evolution --component=mail" appears in my processes tasks (ps aux)

I am thinking to remove
erlang
evolution-couchdb, and couchdb related packages from my system

will be it a good idea?

if I want to stay with the most stable but new ubuntu distro... what I should use? I see the last one (9.10) maybe is not the best choice if I can't have hangs problems.

This is my problem of today... before I haven't that problem.

Thank you very much for any kind of comment about this issue.

Have a good time,
·_- manou

May all beings be happy
May all beings Love

Changed in desktopcouch:
importance: Undecided → High
Changed in desktopcouch:
milestone: none → lucid-final
Changed in desktopcouch (Ubuntu):
status: New → Triaged
assignee: nobody → Ubuntu One Desktop+ team (ubuntuone-desktop+)
importance: Undecided → High
milestone: none → ubuntu-10.04
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

So, people seeing this bug, how many contacts do you have in Ubuntu One?

Revision history for this message
Chad Miller (cmiller) wrote :

Also needed are lines from ~/.cache/desktop-couch/desktop-couchdb.log (or similar file) of around the time when this bug happens. Ten minutes before and after would suffice.

Changed in desktopcouch:
status: Confirmed → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote :

not going to make it in for 10.04; marking for SRU.

Changed in desktopcouch (Ubuntu Lucid):
milestone: ubuntu-10.04 → lucid-updates
status: Triaged → Incomplete
Revision history for this message
Petr Kubánek (petr-kubanek) wrote :

700+ (contacts). Log around lookup, when beam.smp eats CPU, is attached. It looks to me that there are a lot of requests for that lookup - perharps lowering those to one request will solve the problem?

tags: added: u1-lucid-sru
removed: u1-lucid
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

pkubanek (and others seeing this problem): I've done a few changes to evolution-couchdb (adding a cache and getting all documents in just one HTTP request) and couchdb-glib in the unstable branches, and I've uploaded packages to our beta PPA:

https://launchpad.net/~ubuntuone/+archive/beta

Versions are: couchdb-glib 0.6.90 and evolution-couchdb 0.4.90

amd64 packages are already in, but i386 is still building after a few hours since I uploaded them (LP being overloaded today it seems), so please check tomorrow and, if possible, check with those packages if the problem goes away for you. They are big changes for Lucid, so I doubt we'll be able to submit them for Lucid, but I'll try to keep those packages up-to-date if they solve the problems for people experiencing this bug. So please let me know how it works for you

Revision history for this message
Petr Kubánek (petr-kubanek) wrote :

Confirmed fixed. I just needed to make sure to kill old beam.smp and all evolution processes (evolution-data etc.. - one listed in ps -A|grep evolution) and it worked then. I do not know how to make this requirement for the user - put dialog please exit Evolution and then kill them all? Evolution will start them on next run, and they will be the correct version. If you kill them when evolution is running, you will not get Ubuntu One access unless you restart evolution. And I am not sure if Evolution will reconnect to new processes.

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Petr, best thing to kill evolution and all its processes is by running:

$ evolution --force-shutdown

then, restarting it gets the new installed version. Glad that the packages fix it for you! Anyone else can test the packages, please?

Changed in evolution-couchdb:
status: Invalid → Fix Committed
Revision history for this message
Huygens (huygens-25) wrote :

I am right now testing your patch... I will keep you posted if I see any problem.

Revision history for this message
Huygens (huygens-25) wrote :

So far so good... I did not reproduce it yet, though I did not have the opportunity as much as I wanted to work under Linux. So I did not shake it much. I will keep on trying...

Revision history for this message
Omer Akram (om26er) wrote :

beam.smp is constantly using 7% cpu on my netbook in Maverick. should I report a new bug?

Revision history for this message
orey (rey-olivier) wrote :

After the yesterday upgrade of Ubuntu, at each startup of my laptop, beam.smp is launched and uses 80% of CPU. I am bound to kill it without really knowing what this process does exactly. Up to now, there is no visible consequence for the desktop.

I am running kernel 2.6.32-24-generic and the last upgrade was concerning some applications (but not the kernel itself) but I don't remember which ones. The upgrade was done using Ubuntu standard automatic procedure. My version is 10.04.

Revision history for this message
Amatriain (geralt) wrote :

I think I may be seeing the same problem, only it's not ubuntu one related. I'm using Ubuntu 10.04 but I don't use ubuntu one (I don't even have an account). Periodically beam.smp CPU usage spikes for several minutes, then goes back to normal. I've looked at $HOME/.cache/desktop-couch/desktop-couchdb.log.1 and there's lot of messages like these:

[Sat, 31 Jul 2010 08:42:01 GMT] [info] [<0.8130.3>] 127.0.0.1 - - 'HEAD' /gwibber_accounts 401^M
^M
[Sat, 31 Jul 2010 08:42:01 GMT] [info] [<0.8130.3>] 127.0.0.1 - - 'HEAD' /gwibber_accounts 200^M
^M
[Sat, 31 Jul 2010 08:42:02 GMT] [info] [<0.8130.3>] 127.0.0.1 - - 'HEAD' /gwibber_accounts 200^M
^M
[Sat, 31 Jul 2010 08:42:02 GMT] [info] [<0.8130.3>] 127.0.0.1 - - 'GET' /gwibber_accounts 200^M
^M
[Sat, 31 Jul 2010 08:42:02 GMT] [info] [<0.8134.3>] 127.0.0.1 - - 'HEAD' /gwibber_messages 401^M
^M
[Sat, 31 Jul 2010 08:42:02 GMT] [info] [<0.8134.3>] 127.0.0.1 - - 'HEAD' /gwibber_messages 200^M
^M
[Sat, 31 Jul 2010 08:42:02 GMT] [info] [<0.8134.3>] 127.0.0.1 - - 'HEAD' /gwibber_messages 200^M
^M
[Sat, 31 Jul 2010 08:42:02 GMT] [info] [<0.8134.3>] 127.0.0.1 - - 'GET' /gwibber_messages 200^M
^M
[Sat, 31 Jul 2010 08:42:02 GMT] [info] [<0.8130.3>] 127.0.0.1 - - 'GET' /gwibber_accounts/twitter-amatriain 200^M

It seems to me this is Gwibber related, specifically the way gwibber handles twitter. I do use gwibber for my twitter and facebook accounts.

Changed in evolution-couchdb:
status: Fix Committed → Fix Released
Revision history for this message
Alan Robertson (alanr-unix) wrote :

Just so you know... you don't have to be running evolution, or have gwibber active or anything else. It just consumes CPU - as do a number of the python modules as well. If there is no activity, they should consume practically zero CPU all the time. I see I have a bug fix install pending for this. I'll install it and see if all is better.

Omer Akram (om26er)
Changed in gwibber:
status: New → Won't Fix
Revision history for this message
Amatriain (geralt) wrote :

Can we have some explanation why this has been marked as "won't fix", please? It seems a very real performance problem to me.

Revision history for this message
Omer Akram (om26er) wrote :

gwibber no longer uses desktopcouch(in ubuntu 10.10) and if desktopcouch is using 100cpu then the problem is somewhere else. lucid users can use gwibber 2.32.2 from here https://launchpad.net/~gwibber-team/+archive/ppa

Revision history for this message
Thomas Sibley (thomas-sibley) wrote : Re: [Bug 458453] Re: beam.smp uses lots of CPU on desktopcouch contacts lookup

Why does 2.32.2 in the gwibber-team ppa for Lucid still require
desktopcouch as a dependency then?

Revision history for this message
Huygens (huygens-25) wrote :

It just state that this bug won't be fix by the Gwibber team. It's not stating that this bug won't be fixed at all :-)

Revision history for this message
Thomas Sibley (thomas-sibley) wrote :

I understand that, but that doesn't actually answer my question. Omer Akram implied gwibber 2.32.2 from the gwibber-team PPA for Lucid didn't use desktopcouch, but yet it still requires it as a dep. I just wanted to know why.

Revision history for this message
Andrew Frank (frank-geoinfo) wrote :

i just installed 10.10 - and it seems unusable. intermittently beam.smp comes up and the system is completely unresponsiv. cpu load is not visibly high, but interaction is essentially stopped.
gui behaviour is changed - clicking does result in 'attached document to pointer' (with +, means copying?),

it seems a serious problem - in the sense that it is a SHOW STOPPER for anybody installing a fresh system (possibly having a large collection of contacts or many files on ubuntu one, which is my case)

Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :

at my beam.smp uses a lot of CPU and causes that fan is running at higher level

Revision history for this message
Tim Somers (tim-somers) wrote :

My PC gets sloppy, using for example Evolution or Firefox.
All I do to get around this is kill beam, and 'till now this seems to work totally fine.
Using a Ubuntu 10.10 system, completely up to date.

Revision history for this message
GuyR (guy-rouger) wrote :

Hello all,
Same problem with erlang/beamsmp which are using 100% of my cpu.
Once I uninstall Ubuntu One, Gwibber and weather-indicator packages, it is much more better. I think weather-indicator is the worst one

Revision history for this message
John Gilmore (gnu-gilmore) wrote :

I upgraded my Ubuntu 10.04 system to 11.04 recently. I do not use Evolution, Ubuntu One, or Gwibber or Weather. Yet I still find this beam.smp process has burned 979 minutes of CPU since the last reboot 18 days ago -- apparently for no reason at all.

First, why is it getting started at all? ps ax --forest shows it's run from /usr/bin/couchdb but there's no indication about why "Apache CouchDB" is running at all. dpkg -S shows it's from the "couchdb-bin" package. When I try to remove that package with "apt-get remove", it also wants to remove desktopcouch and evolution-couchdb. I don't use any of those things.

Aha, a clue: "apt-cache show evolution-couchdb" reports that "This package provides support for the Evolution mail and calendar program
 to access CouchDB databases (http://couchdb.apache.org), a replication and
 synchronization database of JSON documents, used by online services like
 UbuntuOne at http://ubuntuone.com".

Great, so in Canonical's haste to use its Ubuntu distribution funnel to drive revenues to its unrelated server cluster business, they stuck everyone with this package that burns up CPU even when nobody uses it. Clever.

Even more clever is that after I removed those three packages (couchdb-bin, desktopcouch, evolution-couchdb), the damn beam.smp process IS STILL RUNNING, burning up CPU! That's a packaging problem for sure.

Revision history for this message
Chad Miller (cmiller) wrote :

John, I'm sorry it annoyed you. The per-user couchdb server is only started on demand from some already-running program (evolution asked for it, perhaps?), and thereafter it should (and indeed does for most people) use almost no CPU except for deep DB searches.

I'm sorry to say, when it does happen, we don't know the cause of the erlang runtime process eating so much CPU, still. It's not easily reproducible or debuggable, and we thought the problem had gone away in the 11.04 released version.

If I can find steps to reproduce the problem, I'll update 11.04.

Revision history for this message
John Gilmore (gnu-gilmore) wrote :

It was apparently started by gwibber (perhaps because I briefly opened the menu in the upper right corner of the Ubuntu Natty screen, which seems to be a gwibber thing; I do not use social networking).

One possible problem is that the Erlang runtime is started with the -heart option, so it burns time whether or not any demands are placed on it. Is there a reason that the "desktop couchdb" instance needs a heartbeat? The heart process wakes up every 5
seconds, forever. And it demands that the main process wake up as frequently, too. This means that the CPU can never stop running for more than 5 seconds, even when the machine is "completely idle".

The main process seems to wake up every 10 minutes and write a few lines to the logfiles. There is no apparent reason for this activity. I have attached my logfile.

Revision history for this message
SabreWolfy (sabrewolfy) wrote :

Gwibber does not open and beam.smp uses 100% of CPU on a fully-updated Lucid 32-bit installation. What's the solution to this two-year-old bug?

Revision history for this message
Al Stone (ahs3) wrote :

This is still a problem on Oneiric, where gwibber is installed by default with ubuntu-desktop. I do not use it, nor do I use evolution. However, on every reboot of my system, and a few moments after I log in, I still see beam.smp pop up and use 60-80% of my available RAM, and 5-10% of CPU (as seen by top). Unfortunately, this seems to force all of my other desktop applications into swap and the system is basically unusable for up to 10 minutes (it will respond to the keyboard, just very, very slowly). Whatever this is, it is also absolutely dead consistent; it now happens every time after reboot (I end up using suspend and hibernate a lot).

Is there any resolution yet? Pretty please?

Revision history for this message
Robert "DocSalvager" Watson (robertcwatson) wrote :

I may have a workaround -- go to Synaptic and install the 'couchdb' package.

It seems that only the 'couchdb-bin' pkg is installed by default in the upgrade. The Symantic description on 'couchdb-bin' says to install 'couchdb' for the "init files". Perhaps there is some initialization setting in these couchdb init files that is different from the default used when couchdb-bin alone is installed.

Relevent Versions...

Toshiba A15-S129 laptop

Upgraded Ubuntu 8.04 LTS to 10.04

Had to install newer kernel to resolve a different problem...

apt-get install linux-image-generic-lts-backport-oneiric linux-headers-generic-lts-backport-oneiric

Revision history for this message
Robert "DocSalvager" Watson (robertcwatson) wrote :

Forgot to add mention my results...

Have now had Gwibber, Firefox, Terminal and OpenOffice 3.2 running for a couple of hours with no high CPU problems. Before installing 'couchdb' pkg, 'beam' would have started using a lot of CPU, causing Xorg and other things to use high cpu thus saturating it (single CPU system).

dobey (dobey)
Changed in desktopcouch:
assignee: Ubuntu One Desktop+ team (ubuntuone-desktop+) → nobody
status: Incomplete → Expired
Revision history for this message
Rolf Leggewie (r0lf) wrote :

lucid has seen the end of its life and is no longer receiving any updates. Marking the lucid task for this ticket as "Won't Fix".

Changed in desktopcouch (Ubuntu Lucid):
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

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