microsoftarchive / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes
http://redis.io
Other
20.81k stars 5.37k forks source link

Master Crashes when Slave Connects #474

Closed logan-miles closed 3 years ago

logan-miles commented 8 years ago

Starting two instances on different servers. Both are initially set as master with nothing connecting them, and they run fine. When I set one instance to be slave of the other, the master crashes. I have run the memory test and confirmed that it's not a bad memory issue. This is the log from the master:

[10712] 21 Jun 15:22:37.288 # Server started, Redis version 2.8.2104 [10712] 21 Jun 15:32:58.567 #

=== REDIS BUG REPORT START: Cut & paste starting from here === [10712] 21 Jun 15:32:58.567 # --- EXCEPTION_ACCESS_VIOLATION [10712] 21 Jun 15:32:58.567 # --- STACK TRACE redis-server.exe!LogStackTrace(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:95)(0x0013EC00, 0x0013FF90, 0x00000001, 0x4010BCA0) redis-server.exe!UnhandledExceptiontHandler(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00000000, 0x00000000, 0x00000000, 0x00260000) KERNELBASE.dll!UnhandledExceptionFilter(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00000000, 0xE9D31DA0, 0x00000000, 0x0013FF20) ntdll.dll!memset(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x0013F830, 0x00000009, 0x4010F188, 0x00000000) ntdll.dll!_C_specific_handler(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00000000, 0x0013ED70, 0x0013F830, 0x0013F830) ntdll.dll!_chkstk(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00000001, 0xEC7F0000, 0x00000000, 0xEC92409C) ntdll.dll!RtlRaiseException(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0xEC88D12B, 0xEC872F91, 0x0035DC80, 0x00000000) ntdll.dll!KiUserExceptionDispatcher(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x0000003C, 0x1936EE5C, 0xFDA6C202, 0x00000000) redis-server.exe!rdbSaveToSlavesSockets(c:\release\redis\src\rdb.c:1473)(0x0000003A, 0x5769A47A, 0x40143310, 0x0026F3D0) redis-server.exe!startBgsaveForReplication(c:\release\redis\src\replication.c:458)(0x00000000, 0x002A6F20, 0x00000001, 0x4008F24D) redis-server.exe!replicationCron(c:\release\redis\src\replication.c:2105)(0x00407218, 0x00000000, 0x00000001, 0x002A6F20) redis-server.exe!serverCron(c:\release\redis\src\redis.c:1209)(0x1936DD00, 0x032DDB00, 0x00000000, 0x00000000) redis-server.exe!processTimeEvents(c:\release\redis\src\ae.c:337)(0x00000001, 0x00000000, 0x00000001, 0x00000001) redis-server.exe!aeMain(c:\release\redis\src\ae.c:484)(0x5769A20D, 0x00000002, 0x00000000, 0x00000002) redis-server.exe!redis_main(c:\release\redis\src\redis.c:3524)(0x00267A90, 0x00000000, 0x5769A20D, 0x00000000) redis-server.exe!main(c:\release\redis\src\win32_interop\win32_qfork.cpp:1378)(0x00000000, 0x00000000, 0x00000000, 0xFFFFE000) redis-server.exe!__tmainCRTStartup(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(0x00000000, 0x4003429C, 0x00000000, 0x00000000) KERNEL32.DLL!BaseThreadInitThunk(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(0xEABC13B0, 0x00000000, 0x00000000, 0x00000000) ntdll.dll!RtlUserThreadStart(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(0x00000000, 0x00000000, 0x00000000, 0x00000000) ntdll.dll!RtlUserThreadStart(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(0x00000000, 0x00000000, 0x00000000, 0x00000000) [10712] 21 Jun 15:32:58.567 # --- INFO OUTPUT

Server

redis_version:2.8.2104 redis_git_sha1:00000000 redis_git_dirty:0 redis_build_id:83ad777ec89a946b redis_mode:standalone os:Windows
arch_bits:64 multiplexing_api:winsock_IOCP process_id:10712 run_id:54c6af4a0e80bf78e9226d5280eb18b982de3a50 tcp_port:6379 uptime_in_seconds:621 uptime_in_days:0 hz:10 lru_clock:6923386 config_file:E:\Redis\redis.windows.conf

Clients

connected_clients:47 client_longest_output_list:0 client_biggest_input_buf:0 blocked_clients:0

Memory

used_memory:4224304 used_memory_human:4.03M used_memory_rss:4223512 used_memory_peak:4295544 used_memory_peak_human:4.10M used_memory_lua:608256 mem_fragmentation_ratio:1.00 mem_allocator:dlmalloc-2.8

Persistence

loading:0 rdb_changes_since_last_save:2149 rdb_bgsave_in_progress:0 rdb_last_save_time:1466540557 rdb_last_bgsave_status:ok rdb_last_bgsave_time_sec:-1 rdb_current_bgsave_time_sec:-1 aof_enabled:0 aof_rewrite_in_progress:0 aof_rewrite_scheduled:0 aof_last_rewrite_time_sec:-1 aof_current_rewrite_time_sec:-1 aof_last_bgrewrite_status:ok aof_last_write_status:ok

Stats

total_connections_received:80 total_commands_processed:7579 instantaneous_ops_per_sec:0 total_net_input_bytes:5938107 total_net_output_bytes:0 instantaneous_input_kbps:0.00 instantaneous_output_kbps:0.00 rejected_connections:0 sync_full:1 sync_partial_ok:0 sync_partial_err:0 expired_keys:166 evicted_keys:0 keyspace_hits:374 keyspace_misses:114 pubsub_channels:1 pubsub_patterns:0 latest_fork_usec:0

Replication

role:master connected_slaves:1 slave0:ip=10.208.43.24,port=6379,state=wait_bgsave,offset=0,lag=0 master_repl_offset:1 repl_backlog_active:1 repl_backlog_size:1048576 repl_backlog_first_byte_offset:2 repl_backlog_histlen:0

CPU

used_cpu_sys:0.20 used_cpu_user:0.22 used_cpu_sys_children:0.00 used_cpu_user_children:0.00

Commandstats

cmdstat_get:calls=247,usec=1854,usec_per_call=7.51 cmdstat_set:calls=1786,usec=10156,usec_per_call=5.69 cmdstat_setex:calls=3,usec=64,usec_per_call=21.33 cmdstat_del:calls=476,usec=2024,usec_per_call=4.25 cmdstat_sadd:calls=1786,usec=4755,usec_per_call=2.66 cmdstat_sismember:calls=163,usec=1113,usec_per_call=6.83 cmdstat_hmset:calls=78,usec=918,usec_per_call=11.77 cmdstat_expire:calls=78,usec=305,usec_per_call=3.91 cmdstat_ping:calls=102,usec=169,usec_per_call=1.66 cmdstat_echo:calls=78,usec=120,usec_per_call=1.54 cmdstat_psync:calls=1,usec=101,usec_per_call=101.00 cmdstat_replconf:calls=1,usec=11,usec_per_call=11.00 cmdstat_info:calls=314,usec=12962,usec_per_call=41.28 cmdstat_config:calls=117,usec=1840,usec_per_call=15.73 cmdstat_subscribe:calls=39,usec=244,usec_per_call=6.26 cmdstat_unsubscribe:calls=216,usec=1907,usec_per_call=8.83 cmdstat_client:calls=78,usec=365,usec_per_call=4.68 cmdstat_eval:calls=158,usec=20825,usec_per_call=131.80 cmdstat_evalsha:calls=1830,usec=64896,usec_per_call=35.46 cmdstat_script:calls=28,usec=1393,usec_per_call=49.75

Keyspace

db0:keys=273,expires=266,avg_ttl=2239627 [10712] 21 Jun 15:32:58.567 # === REDIS BUG REPORT END. Make sure to include from START to END. ===

   Please report this bug by following the instructions at:

 http://github.com/MSOpenTech/redis/wiki/Submitting-an-Issue

Suspect RAM error? Use redis-server --test-memory to verify it.
enricogior commented 8 years ago

Hi @wewereschizo since 2.8.2104 there has been several fixes and code improvements, you should upgrade to the latest release 2.8.2402. Thank you.