0

I have a strange problem where Spark job kills Cassandra server. For this question I simulated situation where Cassandra 3.9 server dies without Spark. Please check is it OK or it is a bug.

There is a following Cassandra table:

CREATE TABLE test.data (
    pk int,
    ck text,
    data text,
    PRIMARY KEY (pk, ck)
)

The table is populated with 10M random rows. Where data column is 2K character random text. In case where data column has shorter length - everything is fine.

Here is a bash script populating the table:

(for ((i=0; i<10000000; i=i+1)); do echo `cat /dev/urandom | tr -dc '0-9' | fold -w 5 | head -n 1`,`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1`,`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 2048 | head -n 1`; done) | cqlsh -e "copy test.data from stdin"

If I run 30 concurrent queries loading ~4M rows - Cassandra server dies on my Linux machine (16Gb RAM, I7 quad processor). Here is a bash script starting this queries:

for ((i=1; i<30; i++)); do (cqlsh -e "select * from test.data where token(pk)>=-7417407713535771950 and token(pk)<= 0" --request-timeout=600 | wc -l)& done;

Single query fetches 4031926 rows.

Log file could be downloaded from here. Operating system is Ubuntu 16.10. JVM - openjdk version "1.8.0_111". Cassandra version 3.9.

Mikhail Tsaplin
  • 642
  • 1
  • 9
  • 21
  • What did you mean as `dies`? Attach C* logs, pls – Cortwave Jan 16 '17 at 16:11
  • Java process exited or killed. Log attached see at the bottom of the question. I can't find any exceptions in the log, only GC problems messages in debug.log is it possible that OS kills java process? – Mikhail Tsaplin Jan 17 '17 at 02:45
  • Yes, linux OOM killer can kill app in case of not enough virtual + swap memory. You can check it in kernel log, usually it places at `/var/log/kern.log` in Debian OS family or in other file in `/var/log` – Cortwave Jan 17 '17 at 07:58
  • Yes, I see oom kills it. – Mikhail Tsaplin Jan 17 '17 at 08:38
  • Now the question is how cassandra overlimits its xmx option? I know about off-heap space - but as I know it should not be very big and we don't have parameters to control its usage. Please check another related question http://stackoverflow.com/questions/41297318/cassandra-eats-memory – Mikhail Tsaplin Jan 17 '17 at 08:41

0 Answers0