cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Corona (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-2845) Cassandra uses 100% system CPU on Ubuntu Natty (11.04)
Date Fri, 01 Jul 2011 16:00:28 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-2845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13058613#comment-13058613
] 

Steve Corona commented on CASSANDRA-2845:
-----------------------------------------

I actually figured this out- it's more of a cassandra packaging issue than an issue with the
actual code.

I extracted the cassandra-0.8.1.deb file and diff'ed all of the files with apache-cassandra-0.8.1-bin.tar.gz.
I noticed that apache-cassandra-0.8.1.jar was off by a few bytes. I extracted the jar and
determined that the deb file was using a different version of the following classes:

cli/CliLexer.class
cli/CliParser.class
cql/CqlLexer.class
cql/CqlParser.class

I repackaged the .deb using apache-cassandra-0.8.1.jar from the bin.tar.gz (will post instructions
below) and it installed on Ubuntu 11.04 without a hitch. I'm not sure if the .jar/.class files
used to package the deb were corrupted or just are a different/incomplete/broken version.

Poor mans .deb repackaging until it's officially fixed:

cd /tmp
mkdir work && cd work
wget http://www.fightrice.com/mirrors/apache/cassandra/0.8.1/apache-cassandra-0.8.1-bin.tar.gz
tar -zxvf apache-cassandra-0.8.1-bin.tar.gz 

mkdir deb && cd deb
wget http://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/cassandra_0.8.1_all.deb

# need bintools to get ar utility
sudo apt-get install binutils

ar vx cassandra_0.8.1_all.deb
tar -zxvf data.tar.gz
rm data.tar.gz
cd ./usr/share/cassandra

mv /tmp/work/apache-cassandra-0.8.1/lib/apache-cassandra-0.8.1.jar .
cd /tmp/work/deb
tar -czvf data.tar.gz etc/ usr/ var/

rm cassandra_0.8.1_all.deb
ar rc cassandra_0.8.1_all.deb debian-binary control.tar.gz data.tar.gz

sudo apt-get install openjdk-6-jdk
sudo dpkg -i cassandra_0.8.1_all.deb 

Alternatively, you can use policy-rc.d to prevent cassandra.deb's post-init script from running
on install and replace the messed up .jar after it has been installed. Instructions here:
http://lifeonubuntu.com/how-to-prevent-server-daemons-from-starting-during-apt-get-install/




> Cassandra uses 100% system CPU on Ubuntu Natty (11.04)
> ------------------------------------------------------
>
>                 Key: CASSANDRA-2845
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2845
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.8.0, 0.8.1
>         Environment: Default install of Ubuntu 11.04
>            Reporter: Steve Corona
>
> Step 1. Boot up a brand new, default Ubuntu 11.04 Server install
> Step 2. Install Cassandra from Apache APT Respository (deb http://www.apache.org/dist/cassandra/debian
08x main)
> Step 3. apt-get install cassandra, as soon as it cassandra starts it will freeze the
machine
> What's happening is that as soon as cassandra starts up it immediately sucks up 100%
of CPU and starves the machine. This effectively bricks the box until you boot into single
user mode and disable the cassandra init.d script.
> Under htop, the CPU usage shows up as "system" cpu, not user.
> The machine I'm testing this on is a Quad-Core Sandy Bridge w/ 16GB of Memory, so it's
not a system resource issue. I've also tested this on completely different hardware (Dual
64-Bit Xeons & AMD X4) and it has the same effect.
> Ubuntu 10.10 does not exhibit the same issue. I have only tested 0.8 and 0.8.1.
> root@cassandra01:/# java -version
> java version "1.6.0_22"
> OpenJDK Runtime Environment (IcedTea6 1.10.2) (6b22-1.10.2-0ubuntu1~11.04.1)
> OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
> root@cassandra:/# uname -a
> Linux cassandra01 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64
x86_64 x86_64 GNU/Linux
> /proc/cpu
> Intel(R) Xeon(R) CPU E31270 @ 3.40GHz
> /proc/meminfo
> MemTotal:       16459776 kB
> MemFree:        14190708 kB

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message