Describe the bug
redis server frequently restart
To reproduce
Expected behavior
No Redis crash should be
Additional information
=== REDIS BUG REPORT START: Cut & paste starting from here ===
3050910:S 22 Oct 2024 08:12:30.218 # Redis 6.0.15 crashed by signal: 11
3050910:S 22 Oct 2024 08:12:30.218 # Crashed running the instruction at: 0x42e7e4
3050910:S 22 Oct 2024 08:12:30.218 # Accessing address: 0x40
3050910:S 22 Oct 2024 08:12:30.218 # Failed assertion:
------ STACK TRACE ------ EIP: ./redis-server *:20407(dictScanCount2+0xe4)[0x42e7e4]
Backtrace: ./redis-server :20407(logStackTrace+0x54)[0x479c1c] ./redis-server :20407(sigsegvHandler+0x98)[0x47a3d8] linux-vdso.so.1(__kernel_rt_sigreturn+0x0)[0xfffd525f07c0] ./redis-server :20407(dictScanCount2+0xe4)[0x42e7e4] ./redis-server :20407(scanlimitGenericCommand2+0x220)[0x44ba40] ./redis-server :20407(scanlimitCommand+0x70)[0x44bd70] ./redis-server :20407(call+0xa4)[0x431e6c] ./redis-server :20407(processCommand+0x408)[0x432668] ./redis-server :20407(processInputBuffer+0x14c)[0x442bb4] ./redis-server :20407(aeProcessEvents+0x13c)[0x42b5ec] ./redis-server :20407(aeMain+0x30)[0x42ba40] ./redis-server :20407(main+0x628)[0x428650] /lib64/libc.so.6(__libc_start_main+0xe0)[0xfffd52303ec0] ./redis-server :20407[0x4287f8]
------ INFO OUTPUT ------
Server^M
redis_version:6.0.15^M redis_git_sha1:00000000^M redis_git_dirty:0^M redis_build_id:aaa43c3c81ae99c^M redis_mode:standalone^M os:Linux 4.19.90-2102.2.0.0062.ctl2.aarch64 aarch64^M arch_bits:64^M multiplexing_api:epoll^M atomicvar_api:atomic-builtin^M gcc_version:7.3.0^M process_id:3050910^M run_id:a05a8de4857f4cd1b6b49274da37e01c469cb6bc^M tcp_port:20407^M uptime_in_seconds:159823^M uptime_in_days:1^M hz:10^M configured_hz:10^M lru_clock:1502702^M executable:/app/ctgcache/cache_apps/redisEntites/redis/src/./redis-server^M config_file:/app/ctgcache/cache_apps/redisEntites/20407/redis20407.conf^M ^M
Clients^M
connected_clients:3^M client_recent_max_input_buffer:2^M client_recent_max_output_buffer:0^M blocked_clients:0^M
Memory^M
used_memory:2594648952^M used_memory_human:2.42G^M used_memory_rss:2625830912^M used_memory_rss_human:2.45G^M used_memory_peak:2594683456^M used_memory_peak_human:2.42G^M used_memory_peak_perc:100.00%^M used_memory_overhead:374440334^M used_memory_startup:1030976^M used_memory_dataset:2220208618^M used_memory_dataset_perc:85.60%^M allocator_allocated:2594874136^M allocator_active:2600206336^M allocator_resident:2624978944^M total_system_memory:547474309120^M total_system_memory_human:509.88G^M used_memory_lua:37888^M used_memory_lua_human:37.00K^M used_memory_scripts:0^M used_memory_scripts_human:0B^M number_of_cached_scripts:0^M maxmemory:17179869184^M maxmemory_human:16.00G^M maxmemory_policy:volatile-lru^M allocator_frag_ratio:1.00^M allocator_frag_bytes:5332200^M allocator_rss_ratio:1.01^M allocator_rss_bytes:24772608^M rss_overhead_ratio:1.00^M rss_overhead_bytes:851968^M mem_fragmentation_ratio:1.01^M mem_fragmentation_bytes:31232888^M mem_not_counted_for_evict:0^M mem_replication_backlog:0^M mem_clients_slaves:0^M mem_clients_normal:117198^M mem_aof_buffer:0^M mem_allocator:jemalloc-5.1.0^M active_defrag_running:0^M lazyfree_pending_objects:0^M
Persistence^M
loading:0^M rdb_changes_since_last_save:100952^M rdb_bgsave_in_progress:0^M rdb_last_save_time:1729555476^M rdb_last_bgsave_status:ok^M rdb_last_bgsave_time_sec:21^M rdb_current_bgsave_time_sec:-1^M rdb_last_cow_size:0^M aof_enabled:1^M aof_rewrite_in_progress:0^M aof_rewrite_scheduled:0^M aof_last_rewrite_time_sec:-1^M aof_current_rewrite_time_sec:-1^M aof_last_bgrewrite_status:ok^M aof_last_write_status:ok^M aof_last_cow_size:0^M aof_current_size:62356096^M aof_base_size:0^M aof_pending_rewrite:0^M aof_buffer_length:0^M aof_rewrite_buffer_length:0^M aof_pending_bio_fsync:0^M aof_delayed_fsync:0^M ^M
Stats^M
total_connections_received:30532^M total_commands_processed:8429527^M instantaneous_ops_per_sec:113^M total_net_input_bytes:9099858613^M total_net_output_bytes:17339489^M instantaneous_input_kbps:129.69^M instantaneous_output_kbps:0.00^M rejected_connections:0^M sync_full:0^M sync_partial_ok:0^M sync_partial_err:0^M expired_keys:0^M expired_stale_perc:0.00^M expired_time_cap_reached_count:0^M evicted_keys:0^M keyspace_hits:0^M keyspace_misses:0^M pubsub_channels:0^M pubsub_patterns:0^M latest_fork_usec:4779^M migrate_cached_sockets:0^M slave_expires_tracked_keys:0^M active_defrag_hits:0^M active_defrag_misses:0^M active_defrag_key_hits:0^M active_defrag_key_misses:0^M showlog_length:0^M auth_fail_times:0^M ^M
Replication^M
role:slave^M master_host:172.17.2.37^M master_port:20407^M master_link_status:up^M master_last_io_seconds_ago:0^M master_sync_in_progress:0^M slave_repl_offset:62356096^M slave_priority:100^M slave_read_only:1^M connected_slaves:0^M ^M
CPU^M
used_cpu_sys:542.555984^M used_cpu_user:193.123267^M used_cpu_sys_children:34.401356^M used_cpu_user_children:779.451043^M ^M
Commandstats^M
cmdstat_auth:calls=43849,usec=48264,usec_per_call=1.10,max_usec=25^M cmdstat_select:calls=60672,usec=30524,usec_per_call=0.50,max_usec=23^M cmdstat_newsave:calls=2663,usec=3238,usec_per_call=1.22,max_usec=2^M cmdstat_aoffileend:calls=49,usec=1047,usec_per_call=21.37,max_usec=34^M cmdstat_detect:calls=2663,usec=54535,usec_per_call=20.48,max_usec=82^M cmdstat_rdbfilesave:calls=40,usec=41,usec_per_call=1.02,max_usec=2^M cmdstat_scanlimit:calls=60671,usec=388860,usec_per_call=6.41,max_usec=72^M cmdstat_config:calls=1,usec=14,usec_per_call=14.00,max_usec=14^M cmdstat_info:calls=13318,usec=362360,usec_per_call=27.21,max_usec=183^M cmdstat_ping:calls=10653,usec=3779,usec_per_call=0.35,max_usec=9^M cmdstat_aoffiletrans:calls=8234948,usec=48668217,usec_per_call=5.91,max_usec=1018^M ^M
Cluster^M
cluster_enabled:0^M ^M ^M
Keyspace^M
db1:keys=4879540,expires=0,avg_ttl=0^M db3:keys=9,expires=9,avg_ttl=0^M db4:keys=987403,expires=0,avg_ttl=0^M db5:keys=2878,expires=0,avg_ttl=0^M db21:keys=1154771,expires=0,avg_ttl=0^M
------ CLIENT LIST OUTPUT ------ id=6 addr=172.17.2.37:20407 fd=9 name= age=159808 idle=0 flags=M db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=aoffiletrans id=30396 addr=172.17.2.37:46244 fd=11 name= age=765 idle=0 flags=N db=3 sub=0 psub=0 multi=-1 qbuf=91 qbuf-free=32677 obl=5 oll=0 omem=0 events=r cmd=scanlimit id=30397 addr=172.17.2.37:46252 fd=12 name= age=765 idle=5 flags=N db=3 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=scanlimit
------ CURRENT CLIENT INFO ------ id=30396 addr=172.17.2.37:46244 fd=11 name= age=765 idle=0 flags=N db=3 sub=0 psub=0 multi=-1 qbuf=91 qbuf-free=32677 obl=5 oll=0 omem=0 events=r cmd=scanlimit argv[0]: 'SCANLIMIT' argv[1]: '000' argv[2]: 'match' argv[3]: '*' argv[4]: 'count' argv[5]: '10000'
------ REGISTERS ------
------ FAST MEMORY TEST ------ 3050910:S 22 Oct 2024 08:12:30.219 # Bio thread for job type #0 terminated 3050910:S 22 Oct 2024 08:12:30.219 # Bio thread for job type #1 terminated 3050910:S 22 Oct 2024 08:12:30.219 # Bio thread for job type #2 terminated 3050910:S 22 Oct 2024 08:12:30.219 # Bio thread for job type #3 terminated *** Preparing to test memory region 5c0000 (655360 bytes) *** Preparing to test memory region fe20000 (196608 bytes) *** Preparing to test memory region fffc00000000 (1610612736 bytes) *** Preparing to test memory region fffc70000000 (2415919104 bytes) *** Preparing to test memory region fffd00000000 (1073741824 bytes) *** Preparing to test memory region fffd43570000 (8388608 bytes) *** Preparing to test memory region fffd43d80000 (8388608 bytes) *** Preparing to test memory region fffd44590000 (8388608 bytes) *** Preparing to test memory region fffd44da0000 (8388608 bytes) .O.O.O.O.O.O.O.O.O Fast memory test PASSED, however your memory can still be broken. Please run a memory test for several hours if possible.
------ DUMPING CODE AROUND EIP ------ Symbol: dictScanCount2 (base: 0x42e700) Module: ./redis-server *:20407 (base 0x400000) $ xxd -r -p /tmp/dump.hex /tmp/dump.bin $ objdump --adjust-vma=0x42e700 -D -b binary -m i386:x86-64 /tmp/dump.bin
3050910:S 22 Oct 2024 08:12:52.403 # dump of function (hexdump of 356 bytes): fd7bb9a9e60300aafd030091e93700fd2900679e011440f9002440f9200000abe00e0054c12840f9b92300f9d9400091a83300fd3f0400b1b55b02a9f60305aa280b40fdb76303a9f80303aab35301a9f70304aaf40302aab50040f9201d280e0000669e02f07dd3000d0054c6c000912001669ebaef04a9e40306aa230740f9c1e840a9bc2f00f91c001a8a7f0001eb80f37dd3680e0054e60319aae00302aaf90304aac10040f9336860f8130100b50a0000141f2003d5e10313aae00316aae0023fd6730a40f9930000b4a01640f91f0014eb23ffff540001669e1b001aca200340f913787cf8d30100b4a01640f99f0200ebc80000540a0000141f2003d5a01640f91f0014ebc2000054e10313aae00316aae0023fd6730a40f933ffffb5201da80e0000669e000400910000679e091ce82e2001669e1f001bea600000541c001a8ae7ffff17baef44a9bc2f40f9281de80ee0e7072fc1008052000480d20200669e
=== REDIS BUG REPORT END. Make sure to include from START to END. ===
Please report the crash by opening an issue on github:
http://github.com/antirez/redis/issues
Suspect RAM error? Use redis-server --test-memory to verify it.
Comment From: ShooterIT
hi @playaround88 do you change the redis code? scanlimit seems not a redis built-in command
Comment From: playaround88
@ShooterIT Thx! the version is customized. maybe i should seek advice from intercompany.