Skip to content

[CRASH] #425

@bkarvatskyi

Description

@bkarvatskyi

Crash report
Hey. I imported dump.rdb from Redis (v6) . But the KeyDB crashes after some time after start. Active replication is enabled with 1 instance.

3998:3997:M 16 May 2022 14:31:49.807 # Server initialized
3998:3997:M 16 May 2022 14:31:49.807 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
3998:3997:M 16 May 2022 14:31:49.808 * Loading RDB produced by version 6.3.0
3998:3997:M 16 May 2022 14:31:49.808 * RDB age 190 seconds
3998:3997:M 16 May 2022 14:31:49.808 * RDB memory usage when created 8.69 Mb
3998:3997:M 16 May 2022 14:31:49.824 # Done loading RDB, keys loaded: 0, keys expired: 0.
3998:3997:M 16 May 2022 14:31:49.825 * DB loaded from disk: 0.017 seconds
3998:3997:M 16 May 2022 14:31:49.825 # systemd supervision error: NOTIFY_SOCKET not found!
3998:3997:M 16 May 2022 14:31:49.825 # systemd supervision error: NOTIFY_SOCKET not found!
3998:4008:M 16 May 2022 14:31:49.825 * Thread 0 alive.
3998:4009:M 16 May 2022 14:31:49.825 * Thread 1 alive.


=== KEYDB BUG REPORT START: Cut & paste starting from here ===
3998:4008:M 16 May 2022 14:31:49.973 # === ASSERTION FAILED ===
3998:4008:M 16 May 2022 14:31:49.973 # ==> db.cpp:2863 'o->FExpires() == (m_setexpire->find(sdsKey) != m_setexpire->end())' is not true

------ STACK TRACE ------

Backtrace:
/usr/bin/keydb-server 0.0.0.0:6379(redisDbPersistentData::ensure(char const*, dictEntry**)+0x88f) [0x56442967d75f]
/usr/bin/keydb-server 0.0.0.0:6379(+0x12c5f3) [0x5644296865f3]
/usr/bin/keydb-server 0.0.0.0:6379(expireGenericCommand(client*, long long, int)+0x83) [0x5644295e3163]
/usr/bin/keydb-server 0.0.0.0:6379(call(client*, int)+0xaa) [0x5644296b160a]
/usr/bin/keydb-server 0.0.0.0:6379(processCommand(client*, int)+0x6fc) [0x5644296b252c]
/usr/bin/keydb-server 0.0.0.0:6379(processCommandAndResetClient(client*, int)+0x6b) [0x56442969256b]
/usr/bin/keydb-server 0.0.0.0:6379(processInputBuffer(client*, bool, int)+0x172) [0x564429696302]
/usr/bin/keydb-server 0.0.0.0:6379(processClients()+0x118) [0x5644296964e8]
/usr/bin/keydb-server 0.0.0.0:6379(+0x14fe6e) [0x5644296a9e6e]
/usr/bin/keydb-server 0.0.0.0:6379(beforeSleep(aeEventLoop*)+0x15a) [0x5644296bd8fa]
/usr/bin/keydb-server 0.0.0.0:6379(aeProcessEvents+0xe3) [0x5644296c17a3]
/usr/bin/keydb-server 0.0.0.0:6379(aeMain+0x3a) [0x5644296c26aa]
/usr/bin/keydb-server 0.0.0.0:6379(workerThreadMain(void*)+0x84) [0x5644296b4974]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x9609) [0x7fb3eaecc609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7fb3eadf1293]

------ INFO OUTPUT ------
# Server
redis_version:6.3.0
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:bc455d014a017397
redis_mode:standalone
os:Linux 5.4.0-96-generic x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:9.3.0
process_id:3998
process_supervised:no
run_id:92c9edb2e810cbd97c0d19aba515de546a27654d
tcp_port:6379
server_time_usec:1652711509975364
uptime_in_seconds:0
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:8544341
executable:/usr/bin/keydb-server
config_file:/etc/keydb/keydb.conf

# Clients
connected_clients:133
cluster_connections:0
maxclients:10000
client_recent_max_input_buffer:32
client_recent_max_output_buffer:0
blocked_clients:0
tracking_clients:0
clients_in_timeout_table:0
current_client_thread:0
thread_0_clients:67
thread_1_clients:66

# Memory
used_memory:12957048
used_memory_human:12.36M
used_memory_rss:16588800
used_memory_rss_human:15.82M
used_memory_peak:12957048
used_memory_peak_human:12.36M
used_memory_peak_perc:100.01%
used_memory_overhead:2447016
used_memory_startup:1989712
used_memory_dataset:10510032
used_memory_dataset_perc:95.83%
allocator_allocated:11519840
allocator_active:12886016
allocator_resident:16130048
total_system_memory:8340029440
total_system_memory_human:7.77G
used_memory_lua:37888
used_memory_lua_human:37.00K
used_memory_scripts:0
used_memory_scripts_human:0B
number_of_cached_scripts:0
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
allocator_frag_ratio:1.12
allocator_frag_bytes:1366176
allocator_rss_ratio:1.25
allocator_rss_bytes:3244032
rss_overhead_ratio:1.03
rss_overhead_bytes:458752
mem_fragmentation_ratio:1.52
mem_fragmentation_bytes:5682328
mem_not_counted_for_evict:1048576
mem_replication_backlog:0
mem_clients_slaves:0
mem_clients_normal:245976
mem_aof_buffer:0
mem_allocator:jemalloc-5.2.1
active_defrag_running:0
lazyfree_pending_objects:0
lazyfreed_objects:0
storage_provider:none

# Persistence
loading:0
current_cow_size:0
current_cow_size_age:0
current_fork_perc:0.00
current_save_keys_processed:0
current_save_keys_total:0
rdb_changes_since_last_save:123
rdb_bgsave_in_progress:0
rdb_last_save_time:1652711509
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:0
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
aof_last_cow_size:0
module_fork_in_progress:0
module_fork_last_cow_size:0

# Stats
total_connections_received:133
total_commands_processed:437
instantaneous_ops_per_sec:172
total_net_input_bytes:42588
total_net_output_bytes:12168
instantaneous_input_kbps:16.00
instantaneous_output_kbps:1.41
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:9
expired_stale_perc:0.00
expired_time_cap_reached_count:0
expire_cycle_cpu_milliseconds:0
evicted_keys:0
keyspace_hits:96
keyspace_misses:80
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
total_forks:0
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0
tracking_total_keys:0
tracking_total_items:0
tracking_total_prefixes:0
unexpected_error_replies:0
total_error_replies:0
dump_payload_sanitizations:0
total_reads_processed:262
total_writes_processed:260
instantaneous_lock_contention:1
avg_lock_contention:0.031250
storage_provider_read_hits:0
storage_provider_read_misses:0

# Replication
role:master
connected_slaves:0
master_failover_state:no-failover
master_replid:80969524f1b36da837d8b62593458b61965e43eb
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:0.052978
used_cpu_user:0.060279
used_cpu_sys_children:0.000000
used_cpu_user_children:0.000000
server_threads:2
long_lock_waits:0
used_cpu_sys_main_thread:0.016440
used_cpu_user_main_thread:0.014783

# Modules

# Commandstats
cmdstat_info:calls=2,usec=397,usec_per_call=198.50,rejected_calls=0,failed_calls=0
cmdstat_get:calls=39,usec=629,usec_per_call=16.13,rejected_calls=0,failed_calls=0
cmdstat_expiremember:calls=14,usec=373,usec_per_call=26.64,rejected_calls=0,failed_calls=0
cmdstat_hincrby:calls=21,usec=803,usec_per_call=38.24,rejected_calls=0,failed_calls=0
cmdstat_hlen:calls=55,usec=199,usec_per_call=3.62,rejected_calls=0,failed_calls=0
cmdstat_decr:calls=26,usec=198,usec_per_call=7.62,rejected_calls=0,failed_calls=0
cmdstat_hset:calls=15,usec=141,usec_per_call=9.40,rejected_calls=0,failed_calls=0
cmdstat_set:calls=6,usec=68,usec_per_call=11.33,rejected_calls=0,failed_calls=0
cmdstat_exists:calls=23,usec=70,usec_per_call=3.04,rejected_calls=0,failed_calls=0
cmdstat_hget:calls=62,usec=171,usec_per_call=2.76,rejected_calls=0,failed_calls=0
cmdstat_incr:calls=7,usec=89,usec_per_call=12.71,rejected_calls=0,failed_calls=0
cmdstat_auth:calls=133,usec=1324,usec_per_call=9.95,rejected_calls=0,failed_calls=0
cmdstat_expire:calls=34,usec=273,usec_per_call=8.03,rejected_calls=0,failed_calls=0

# Errorstats

# Cluster
cluster_enabled:0

# Keyspace
db0:keys=5006,expires=50,avg_ttl=1436742,cached_keys=5006
db2:keys=4,expires=0,avg_ttl=0,cached_keys=4

# KeyDB
mvcc_depth:1

------ CLIENT LIST OUTPUT ------
3998:signal-handler (1652711698) Received SIGTERM scheduling shutdown...
3998:signal-handler (1652711698) Received SIGTERM scheduling shutdown...

Aditional information

  1. OS - Ubuntu 20.04 . KeyDB installed by PPA - https://docs.keydb.dev/docs/ppa-deb
  2. Steps to reproduce (if any) - Cannot share the dump.rdb file :(

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions