Export to GitHub

redis - issue #303

Disk space full crashes redis-server (upon restart)


Posted on Aug 7, 2010 by Massive Bird

What steps will reproduce the problem? 1. Start redis-server 1.2.6 with dumping of data to dump.rdb 2. Use hard disk to 100% 3. Stop redis. Free disk space. Try starting redis with the same configuration

What is the expected output? What do you see instead? What's happening is that while the disk space is full and redis wants to write to dump.rdb, it writes a zero byte file. And during restart redis tries to read from that zero byte file and dies with the error (in logs): "Short read or OOM loading DB. Unrecoverable error, aborting now." (This should be logged in error level but somehow it is only logged if you enable debug level. Strange.

What version of the product are you using? On what operating system? 1.2.6 - Ubuntu 9.1

Please provide any additional information below.

Comment #1

Posted on Aug 30, 2010 by Grumpy Dog

Accepted, thanks for reporting, It is unlikely this will be fixed in 1.2 as 2.0 is going to be released.

I'll fix the issue and report here asap.

Cheers, Salvatore

Comment #2

Posted on Aug 30, 2010 by Grumpy Dog

(No comment was entered for this change.)

Comment #3

Posted on Aug 30, 2010 by Grumpy Dog

Can't replicate in 2.x... I guess the problem is now fixed. This is the current behavior:

1) Redis will try to save in the background process. 2) On write error (no space left on device) the operation will be aborted at all. 3) The file will not get overwritten (dump.rdb I mean), so the server will restart cleanly.

I don't see how this problem can be present in 1.2 as well but did not tried. Please can you provide the steps you used to reproduce the problem? Thank you.

Cheers, Salvatore

Comment #4

Posted on Aug 30, 2010 by Massive Bird

Steps are same as I wrote. Redis did produce a 0 byte file when disk space was full.

Comment #5

Posted on Aug 31, 2010 by Grumpy Dog

Ok, it's no longer the case with 2.0 and Redis master apparently :) I did many tests, so I'm closing this issue. Thanks for reporting!

Status: Done

Labels:
Type-Defect Priority-Medium