gulaftab / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

redis segfaults on broken aof #620

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
redis 2.2.112, ubuntu hardy 64

Once redis segfaulted in runtime (!?!?) and left AOF in a broken state. Now I 
can't start redis because it segfaults when loading AOF

To reproduce, run redis-server with attached AOF file

[19518] 02 Aug 16:02:34 # ./src/redis-server(loadAppendOnlyFile+0x2ce) 
[0x80737ae]
[19518] 02 Aug 16:02:34 # ./src/redis-server(main+0xa1) [0x8059741]
[19518] 02 Aug 16:02:34 # /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) 
[0xb7dfa450]
[19518] 02 Aug 16:02:34 # ./src/redis-server [0x8053971]

PS: Original AOF was 300M, but I narrowed it to one command (so AOF reproducing 
the problem is small).

Original issue reported on code.google.com by kmeren...@gmail.com on 2 Aug 2011 at 12:05

Attachments:

GoogleCodeExporter commented 9 years ago
$ ./src/redis-check-aof appendonly.aof 
0x00000020: Expected \r\n, got: 000d
AOF is not valid

Original comment by kmeren...@gmail.com on 2 Aug 2011 at 12:09

GoogleCodeExporter commented 9 years ago
My bad, redis didn't segfault in runtime. It exited because it wrote only part 
of AOF (in flushAppendOnlyFile). Still, redis segfaults on broken AOF.

Original comment by kmeren...@gmail.com on 2 Aug 2011 at 12:35

GoogleCodeExporter commented 9 years ago
Fix: https://github.com/antirez/redis/pull/74

Original comment by kmeren...@gmail.com on 2 Aug 2011 at 1:15

GoogleCodeExporter commented 9 years ago
Fix merged, thanks, closing the issue.

Original comment by anti...@gmail.com on 20 Sep 2011 at 8:53