Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing node in an uninitialised cluster crashes the server #1

Closed
yaeltzirulnikov opened this issue Feb 20, 2019 · 0 comments
Closed

Comments

@yaeltzirulnikov
Copy link
Contributor

Running redis server with redisraft using:
redis-server --port 5001 --dbfilename raft1.rdb --loadmodule redisraft.so id=1 raft-log-filename=raftlog1.db addr=localhost:5001
Running redis-cli -p 5001 RAFT.NODE remove 1 causes server to crash :
=== REDIS BUG REPORT START: Cut & paste starting from here ===
47734:M 18 Feb 2019 15:23:12.982 # Redis 5.0.0 crashed by signal: 11
47734:M 18 Feb 2019 15:23:12.982 # Crashed running the instruction at: 0x10e73c3f1
47734:M 18 Feb 2019 15:23:12.982 # Accessing address: 0x40
47734:M 18 Feb 2019 15:23:12.982 # Failed assertion: (:0)
------ STACK TRACE ------
EIP:
0 redisraft.so 0x000000010e73c3f1 raft_get_node + 17
Backtrace:
0 redis-server 0x000000010e56b52e logStackTrace + 110
1 redis-server 0x000000010e56b8fd sigsegvHandler + 253
2 libsystem_platform.dylib 0x00007fff6e3c0f5a _sigtramp + 26
3 ??? 0x0000000000000001 0x0 + 1
4 redisraft.so 0x000000010e72960d cmdRaftNode + 749
5 redis-server 0x000000010e59aa33 RedisModuleCommandDispatcher + 147
6 redis-server 0x000000010e51d08c call + 220
7 redis-server 0x000000010e51da54 processCommand + 1556
8 redis-server 0x000000010e52e07f processInputBuffer + 495
9 redis-server 0x000000010e514e9c aeProcessEvents + 732
10 redis-server 0x000000010e5151bb aeMain + 43
11 redis-server 0x000000010e520cce main + 1726
12 libdyld.dylib 0x00007fff6e0b2015 start + 1
------ INFO OUTPUT ------
Server
redis_version:5.0.0
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:546b15d3f28a6ead
redis_mode:standalone
os:Darwin 17.6.0 x86_64
arch_bits:64
multiplexing_api:kqueue
atomicvar_api:atomic-builtin
gcc_version:4.2.1
process_id:47734
run_id:af2696412bfd898df44578cdd50ef7037a6d9d56
tcp_port:5001
uptime_in_seconds:6
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:6992320
executable:/Users/yaeltzirulnikov/code-redisraft/redisraft/redis-server
config_file:
Clients
connected_clients:1
client_recent_max_input_buffer:2
client_recent_max_output_buffer:0
blocked_clients:0
Memory
used_memory:1063312
used_memory_human:1.01M
used_memory_rss:3457024
used_memory_rss_human:3.30M
used_memory_peak:1063312
used_memory_peak_human:1.01M
used_memory_peak_perc:100.11%
used_memory_overhead:1037014
used_memory_startup:987328
used_memory_dataset:26298
used_memory_dataset_perc:34.61%
allocator_allocated:1028928
allocator_active:3419136
allocator_resident:3419136
total_system_memory:17179869184
total_system_memory_human:16.00G
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:3.32
allocator_frag_bytes:2390208
allocator_rss_ratio:1.00
allocator_rss_bytes:0
rss_overhead_ratio:1.01
rss_overhead_bytes:37888
mem_fragmentation_ratio:3.36
mem_fragmentation_bytes:2428096
mem_not_counted_for_evict:0
mem_replication_backlog:0
mem_clients_slaves:0
mem_clients_normal:49686
mem_aof_buffer:0
mem_allocator:libc
active_defrag_running:0
lazyfree_pending_objects:0
Persistence
loading:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1550496186
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
Stats
total_connections_received:1
total_commands_processed:2
instantaneous_ops_per_sec:0
total_net_input_bytes:55
total_net_output_bytes:11919
instantaneous_input_kbps:0.01
instantaneous_output_kbps:6.61
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
expired_stale_perc:0.00
expired_time_cap_reached_count:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec: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
Replication
role:master
connected_slaves:0
master_replid:83f7339d0e5e71681a975b0b989d56044e369d06
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.016633
used_cpu_user:0.008875
used_cpu_sys_children:0.000000
used_cpu_user_children:0.000000
Commandstats
cmdstat_command:calls=1,usec=868,usec_per_call=868.00
cmdstat_config:calls=1,usec=46,usec_per_call=46.00
Cluster
cluster_enabled:0
Keyspace
------ CLIENT LIST OUTPUT ------
id=5 addr=127.0.0.1:57163 fd=17 name= age=1 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=38 qbuf-free=32730 obl=0 oll=0 omem=0 events=r cmd=raft.node
------ CURRENT CLIENT INFO ------
id=5 addr=127.0.0.1:57163 fd=17 name= age=1 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=38 qbuf-free=32730 obl=0 oll=0 omem=0 events=r cmd=raft.node
argv[0]: 'RAFT.NODE'
argv[1]: 'remove'
argv[2]: '1'
------ REGISTERS ------
47734:M 18 Feb 2019 15:23:12.985 #
RAX:0000000000000000 RBX:000000005c6ab1c0
RCX:0000000000000001 RDX:0000000000000001
RDI:0000000000000000 RSI:0000000000000001
RBP:00007ffee16ef520 RSP:00007ffee16ef500
R8 :0000000000000000 R9 :0000000000000001
R10:0000000000000008 R11:0000000000000001
R12:0000000000000000 R13:0000000000000000
R14:00007fdd04006400 R15:0000000000000001
RIP:000000010e73c3f1 EFL:0000000000010202
CS :000000000000002b FS:0000000000000000 GS:0000000000000000
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef50f) -> 0000000000000000
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef50e) -> 0000000000000001
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef50d) -> 00007fff6e26a1b3
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef50c) -> 00007ffee16ef5e0
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef50b) -> 00007fffa6bde2cc
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef50a) -> 0000000000100000
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef509) -> 00000000000fffff
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef508) -> 0000000007000001
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef507) -> 00000000000000c0
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef506) -> 00007ffee16ef5b0
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef505) -> 000000010e72960d
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef504) -> 00007ffee16ef6d0
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef503) -> 000000010e6055b8
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef502) -> 00007fdd04006400
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef501) -> 00000000000efe5c
47734:M 18 Feb 2019 15:23:12.985 # (00007ffee16ef500) -> 000000005c6ab1c0
------ DUMPING CODE AROUND EIP ------

yossigo pushed a commit that referenced this issue Jan 26, 2021
* Fix typo

* Add Clustering to TOC

* Docs fixes

* Fix clang compilation error

* Use correct types (clang compiles incorrectly without this)

* More docs fixes
This was referenced Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant