djveremix / redis

Automatically exported from code.google.com/p/redis
0 stars 0 forks source link

Slave hits 100% cpu on startup if master cannot write data file (with no warnings or errors in logs) #258

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Master and slave on same box, different ports
2. Master has read, but not write, access to its rdb
3. Slave has full access to its own rdb

What is the expected output? What do you see instead?

Slave hits 100% CPU trying to connect to master with no error logged on slave. 
Master says BGSAVE failed:

14 Jun 00:58:52 - Server started, Redis version 1.2.6
14 Jun 00:58:52 - DB loaded from disk
14 Jun 00:58:52 - The server is now ready to accept connections on port 9930
14 Jun 00:58:52 . DB 0: 1 keys (0 volatile) in 4 slots HT.
14 Jun 00:58:52 . 0 clients connected (0 slaves), 619123 bytes in use, 0 shared 
objects
14 Jun 00:58:57 . DB 0: 1 keys (0 volatile) in 4 slots HT.
14 Jun 00:58:57 . 0 clients connected (0 slaves), 619123 bytes in use, 0 shared 
objects
14 Jun 00:59:02 . DB 0: 1 keys (0 volatile) in 4 slots HT.
14 Jun 00:59:02 . 0 clients connected (0 slaves), 619123 bytes in use, 0 shared 
objects
14 Jun 00:59:07 . DB 0: 1 keys (0 volatile) in 4 slots HT.
14 Jun 00:59:07 . 0 clients connected (0 slaves), 619123 bytes in use, 0 shared 
objects
14 Jun 00:59:10 . Accepted 127.0.0.1:30501
14 Jun 00:59:10 - Slave ask for synchronization
14 Jun 00:59:10 - Starting BGSAVE for SYNC
14 Jun 00:59:10 - Background saving started by pid 9280
14 Jun 00:59:10 * Failed saving the DB: Permission denied
14 Jun 00:59:11 * Background saving error
14 Jun 00:59:11 * SYNC failed. BGSAVE child returned an error
14 Jun 00:59:12 . DB 0: 1 keys (0 volatile) in 4 slots HT.
14 Jun 00:59:12 . 0 clients connected (0 slaves), 619179 bytes in use, 0 shared 
objects
14 Jun 00:59:17 . DB 0: 1 keys (0 volatile) in 4 slots HT.
14 Jun 00:59:17 . 0 clients connected (0 slaves), 619179 bytes in use, 0 shared 
objects
14 Jun 00:59:22 . DB 0: 1 keys (0 volatile) in 4 slots HT.

Slave hits and stays at 100% cpu

What version of the product are you using? On what operating system?

1.2.6

Please provide any additional information below.

DB has only a few tiny keys, so complete rdbs, logs, and configs available if 
needed.

Original issue reported on code.google.com by CPaet...@gmail.com on 14 Jun 2010 at 6:04

GoogleCodeExporter commented 8 years ago
Fixed in Redis master (related to an issue already fixed).

This fixes will be backported to 2.0.0 in the next days before the release of 
2.0.0 stable.

Cheers,
Salvatore

Original comment by anti...@gmail.com on 31 Aug 2010 at 11:20