pmwkaa / serenity

Disk storage and real transactions under Redis compatible protocol.
Other
197 stars 10 forks source link

*** Error in `./serenity': double free or corruption (!prev): 0x0000000001bbc300 *** #2

Closed arnaudsj closed 9 years ago

arnaudsj commented 9 years ago

Hi,

I found an issue when attempting to run the benchmark against a freshly built serenity binary on Ubuntu 14.04 LTS.

I run the redis-benchmark as follow (I could not run it with -k 1, getting "server closed connection":

redis-benchmark -c 50 -k 0 -n 1000

And eventually it crashes the serenity process:

serenity_1 | 1:M 26 Jul 01:29:26.110
serenity_1 | 1:M 26 Jul 01:29:26.111  serenity database.
serenity_1 | 1:M 26 Jul 01:29:26.111
serenity_1 | 1:M 26 Jul 01:29:26.111  using configuration file 'serenity.conf'
serenity_1 | 1:M 26 Jul 01:29:26.111
serenity_1 | 1:M 26 Jul 01:29:26.111  bind 0.0.0.0
serenity_1 | 1:M 26 Jul 01:29:26.111  port 6379
serenity_1 | 1:M 26 Jul 01:29:26.111  maxmemory 10737418240
serenity_1 | 1:M 26 Jul 01:29:26.111  pidfile /var/run/serenity.pid
serenity_1 | 1:M 26 Jul 01:29:26.111  dir ./serenity_db
serenity_1 | 1:M 26 Jul 01:29:26.111  databases 1
serenity_1 | 1:M 26 Jul 01:29:26.111  db 0 name db_0 primary_key string
serenity_1 | 1:M 26 Jul 01:29:26.111
serenity_1 | 1:M 26 Jul 01:29:26.111  recovering repository './serenity_db'
serenity_1 | 1:M 26 Jul 01:29:26.112  loading database './serenity_db/db_0'
serenity_1 | 1:M 26 Jul 01:29:26.117  complete
serenity_1 | 1:M 26 Jul 01:29:26.117
serenity_1 | *** Error in `./serenity': double free or corruption (!prev): 0x0000000001bbc300 ***
copilot_serenity_1 exited with code 139

FYI, I am using the following Dockerfile to build serenity and run it:

FROM phusion/baseimage:latest

RUN apt-get update

RUN apt-get -y install git build-essential

WORKDIR /opt
RUN git clone --recursive https://github.com/pmwkaa/serenity.git

WORKDIR /opt/serenity
RUN make

ADD serenity.conf /opt/serenity/

EXPOSE 6379

CMD ["./serenity", "serenity.conf"]
pmwkaa commented 9 years ago

Thanks! some notes about the benchmarking: by default redis benchmark measures all of the commands most of which are not supported by Serenity. They should pass, but server return errors.

It is better to exactly specify supported commands, like: ./redis-benchmark -t set,get -n 1000000. Or use memtier_benchmark.

arnaudsj commented 9 years ago

Thank you, that makes sense. I guess the server should not crash though when issued those commands no, but instead return an error no? I will retest with just set & get.

pmwkaa commented 9 years ago

Yes, it critical not to crash in any such case. Also i would like to note, even if a crash happens - data is safe due to storage engine guarantees.