RediSearch / RediSearch

A query and indexing engine for Redis, providing secondary indexing, full-text search, vector similarity search and aggregations.
https://redis.io/docs/stack/search/
Other
5.43k stars 516 forks source link

Docker ARM support - Constant crashes when running on Apple silicon #2524

Open tyler-boyd opened 2 years ago

tyler-boyd commented 2 years ago

Hi,

I have been using the redislabs/redisearch:2.2.6 Docker image and it constantly crashes on my M1 MBP due to what appears to be a qemu crash, as the final line printed is qemu: uncaught target signal 11 (Segmentation fault) - core dumped.

I believe the easiest fix is to avoid relying on qemu. Does RediSearch support ARM? If so, a similar approach to the main redis image on DockerHub could be used, offering an ARM version of the redislabs/redisearch images.

If that's not possible...any other ideas? 🙂

Thanks!

Here's the full crash logs:

1:C 21 Jan 2022 02:36:08.154 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 21 Jan 2022 02:36:08.156 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 21 Jan 2022 02:36:08.156 # Configuration loaded
1:M 21 Jan 2022 02:36:08.160 * monotonic clock: POSIX clock_gettime
1:M 21 Jan 2022 02:36:08.173 * Running mode=standalone, port=6379.
1:M 21 Jan 2022 02:36:08.174 # Server initialized
1:M 21 Jan 2022 02:36:08.181 * <search> Redis version found by RedisSearch : 6.2.6 - oss
1:M 21 Jan 2022 02:36:08.182 * <search> RediSearch version 2.2.6 (Git=2.2-c2c29f12)
1:M 21 Jan 2022 02:36:08.182 * <search> Low level api version 1 initialized successfully
1:M 21 Jan 2022 02:36:08.183 * <search> concurrent writes: OFF, gc: ON, prefix min length: 2, prefix max expansions: 200, query timeout (ms): 500, timeout policy: return, cursor read size: 1000, cursor max idle (ms): 300000, max doctable size: 1000000, max number of search results:  1000000, search pool size: 20, index pool size: 8, 
1:M 21 Jan 2022 02:36:08.188 * <search> Initialized thread pool!
1:M 21 Jan 2022 02:36:08.190 * <search> Enabled diskless replication
1:M 21 Jan 2022 02:36:08.196 * Module 'search' loaded from /usr/lib/redis/modules/redisearch.so
1:M 21 Jan 2022 02:36:08.206 * Ready to accept connections
1:M 21 Jan 2022 02:36:52.151 * <module> Scanning index dev.txrouter.V1.purchases.events_index in background
1:M 21 Jan 2022 02:36:52.152 * <module> Scanning indexes in background: done (scanned=7)
1:M 21 Jan 2022 02:36:52.154 * <module> Scanning index dev.txrouter.V1.purchases.searchindex2 in background
1:M 21 Jan 2022 02:36:52.154 * <module> Scanning indexes in background: done (scanned=7)
1:M 21 Jan 2022 04:26:19.617 * <module> Scanning index unit.txrouter.V1.purchases.events_index in background
1:M 21 Jan 2022 04:26:19.618 * <module> Scanning indexes in background: done (scanned=14)
1:M 21 Jan 2022 04:26:19.623 * <module> Scanning index unit.txrouter.V1.purchases.searchindex2 in background
1:M 21 Jan 2022 04:26:19.623 * <module> Scanning indexes in background: done (scanned=14)

=== REDIS BUG REPORT START: Cut & paste starting from here ===
1:M 21 Jan 2022 04:26:19.840 # Redis 6.2.6 crashed by signal: 11, si_code: 1
1:M 21 Jan 2022 04:26:19.840 # Accessing address: 0x2d633533612d6c
1:M 21 Jan 2022 04:26:19.840 # Crashed running the instruction at: 0x40000d6df5

------ STACK TRACE ------
EIP:
/usr/local/bin/redis-server *:6379(RM_StringPtrLen+0x5)[0x40000d6df5]

Backtrace:
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14140)[0x4002158140]
/usr/local/bin/redis-server *:6379(RM_StringPtrLen+0x5)[0x40000d6df5]
/usr/lib/redis/modules/redisearch.so(+0xda2e2)[0x400360a2e2]
/usr/lib/redis/modules/redisearch.so(dictFind+0x3d)[0x400360ad4d]
/usr/lib/redis/modules/redisearch.so(dictFetchValue+0x9)[0x400360adf9]
/usr/lib/redis/modules/redisearch.so(OpenNumericIndex+0x28)[0x40035ea9d8]
/usr/lib/redis/modules/redisearch.so(IndexerBulkAdd+0x143)[0x40035cd913]
/usr/lib/redis/modules/redisearch.so(+0xaeb39)[0x40035deb39]
/usr/lib/redis/modules/redisearch.so(Indexer_Add+0x55)[0x40035df285]
/usr/lib/redis/modules/redisearch.so(Document_AddToIndexes+0xd4)[0x40035cdab4]
/usr/lib/redis/modules/redisearch.so(IndexSpec_UpdateDoc+0x135)[0x4003600005]
/usr/lib/redis/modules/redisearch.so(Indexes_UpdateMatchingWithSchemaRules+0x8c)[0x400360062c]
/usr/lib/redis/modules/redisearch.so(HashNotificationCallback+0x137)[0x40035e8af7]
/usr/local/bin/redis-server *:6379(moduleNotifyKeyspaceEvent+0xce)[0x40000dc69e]
/usr/local/bin/redis-server *:6379(notifyKeyspaceEvent+0x21)[0x40000c8fa1]
/usr/local/bin/redis-server *:6379(hsetCommand+0xf9)[0x4000093559]
/usr/local/bin/redis-server *:6379(call+0xa1)[0x400004f1a1]
/usr/local/bin/redis-server *:6379(execCommand+0x263)[0x400009fa23]
/usr/local/bin/redis-server *:6379(call+0xa1)[0x400004f1a1]
/usr/local/bin/redis-server *:6379(processCommand+0x593)[0x4000050d23]
/usr/local/bin/redis-server *:6379(processInputBuffer+0xf8)[0x4000063ec8]
/usr/local/bin/redis-server *:6379(+0xfbbb8)[0x40000fbbb8]
/usr/local/bin/redis-server *:6379(aeProcessEvents+0x292)[0x4000047e32]
/usr/local/bin/redis-server *:6379(aeMain+0x1d)[0x400004809d]
/usr/local/bin/redis-server *:6379(main+0x316)[0x40000442b6]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea)[0x400218cd0a]
/usr/local/bin/redis-server *:6379(_start+0x2a)[0x400004478a]

------ REGISTERS ------
1:M 21 Jan 2022 04:26:19.852 # 
RAX:00000040037e72c0 RBX:0000004002a3be00
RCX:ece76772452ca3af RDX:0000000000000002
RDI:302d633533612d64 RSI:0000004001c293b8
RBP:0000004002a3be10 RSP:0000004001c293a8
R8 :8628f80f045c7ffa R9 :0000004010075073
R10:0000000000000007 R11:000000400373aed0
R12:0000004002a3be00 R13:0000004001c29500
R14:0000004002a3be50 R15:302d633533612d64
RIP:00000040000d6df5 EFL:0000000000000202
CSGSFS:002b000000000033
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293b7) -> 000000401006dfe0
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293b6) -> 00000040035ea9d8
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293b5) -> 0000004002942f50
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293b4) -> 000000400360adf9
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293b3) -> 0000004001c29500
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293b2) -> 00000040029740e0
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293b1) -> 0000004001c29500
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293b0) -> 0000004002a3be00
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293af) -> 302d633533612d64
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293ae) -> 0000000000000001
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293ad) -> 0000004002a48020
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293ac) -> 000000400360ad4d
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293ab) -> 00000040029740e0
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293aa) -> 0000004001c29500
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293a9) -> 0000004002a3be00
1:M 21 Jan 2022 04:26:19.852 # (0000004001c293a8) -> 000000400360a2e2

------ INFO OUTPUT ------
# Server
redis_version:6.2.6
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:f57446d60c897d23
redis_mode:standalone
os:Linux 5.10.76-linuxkit x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:10.2.1
process_id:1
process_supervised:no
run_id:cb619bb2216bb5e49d3eba5093f74c9bb5bdd81c
tcp_port:6379
server_time_usec:1642739179837361
uptime_in_seconds:6611
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:15349227
executable:/usr/local/bin/redis-server
config_file:
io_threads_active:0

# Clients
connected_clients:20
cluster_connections:0
maxclients:10000
client_recent_max_input_buffer:557
client_recent_max_output_buffer:0
blocked_clients:6
tracking_clients:0
clients_in_timeout_table:6

# Memory
used_memory:2602880
used_memory_human:2.48M
used_memory_rss:0
used_memory_rss_human:0B
used_memory_peak:2602880
used_memory_peak_human:2.48M
used_memory_peak_perc:117.71%
used_memory_overhead:1290790
used_memory_startup:876384
used_memory_dataset:1312090
used_memory_dataset_perc:76.00%
allocator_allocated:2202168
allocator_active:2879488
allocator_resident:5472256
total_system_memory:4124368896
total_system_memory_human:3.84G
used_memory_lua:45056
used_memory_lua_human:44.00K
used_memory_scripts:592
used_memory_scripts_human:592B
number_of_cached_scripts:2
maxmemory:536870912
maxmemory_human:512.00M
maxmemory_policy:noeviction
allocator_frag_ratio:1.31
allocator_frag_bytes:677320
allocator_rss_ratio:1.90
allocator_rss_bytes:2592768
rss_overhead_ratio:0.00
rss_overhead_bytes:-5472256
mem_fragmentation_ratio:0.00
mem_fragmentation_bytes:-1907216
mem_not_counted_for_evict:0
mem_replication_backlog:0
mem_clients_slaves:0
mem_clients_normal:413030
mem_aof_buffer:0
mem_allocator:jemalloc-5.1.0
active_defrag_running:0
lazyfree_pending_objects:0
lazyfreed_objects:0

# 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:454
rdb_bgsave_in_progress:0
rdb_last_save_time:1642732568
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:39
total_commands_processed:2809
instantaneous_ops_per_sec:13
total_net_input_bytes:336002
total_net_output_bytes:649488
instantaneous_input_kbps:1.36
instantaneous_output_kbps:3.02
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:4
expired_stale_perc:0.00
expired_time_cap_reached_count:0
expire_cycle_cpu_milliseconds:1645
evicted_keys:0
keyspace_hits:439
keyspace_misses:79
pubsub_channels:1
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:46
dump_payload_sanitizations:0
total_reads_processed:2456
total_writes_processed:1824
io_threaded_reads_processed:0
io_threaded_writes_processed:0

# Replication
role:master
connected_slaves:0
master_failover_state:no-failover
master_replid:7653e4f317955a3ab9a0c81611317f0e7a8d001a
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:83.461646
used_cpu_user:95.758277
used_cpu_sys_children:0.018973
used_cpu_user_children:0.058778
used_cpu_sys_main_thread:83.265052
used_cpu_user_main_thread:95.258994

# Modules
module:name=search,ver=20206,api=1,filters=0,usedby=[],using=[],options=[handle-io-errors]

# Commandstats
cmdstat_watch:calls=16,usec=1000,usec_per_call=62.50,rejected_calls=0,failed_calls=0
cmdstat_xadd:calls=14,usec=2437,usec_per_call=174.07,rejected_calls=0,failed_calls=0
cmdstat_hmget:calls=109,usec=4934,usec_per_call=45.27,rejected_calls=0,failed_calls=0
cmdstat_multi:calls=8,usec=72,usec_per_call=9.00,rejected_calls=0,failed_calls=0
cmdstat_xack:calls=14,usec=766,usec_per_call=54.71,rejected_calls=0,failed_calls=0
cmdstat_xinfo:calls=6,usec=196,usec_per_call=32.67,rejected_calls=0,failed_calls=6
cmdstat_get:calls=20,usec=543,usec_per_call=27.15,rejected_calls=0,failed_calls=0
cmdstat_command:calls=1,usec=5420,usec_per_call=5420.00,rejected_calls=0,failed_calls=0
cmdstat_FT.SEARCH:calls=35,usec=46245,usec_per_call=1321.29,rejected_calls=0,failed_calls=1
cmdstat_ping:calls=968,usec=28233,usec_per_call=29.17,rejected_calls=0,failed_calls=0
cmdstat_xreadgroup:calls=86,usec=15061,usec_per_call=175.13,rejected_calls=0,failed_calls=0
cmdstat_evalsha:calls=57,usec=19097,usec_per_call=335.04,rejected_calls=0,failed_calls=0
cmdstat_echo:calls=38,usec=336,usec_per_call=8.84,rejected_calls=0,failed_calls=0
cmdstat_expire:calls=62,usec=2369,usec_per_call=38.21,rejected_calls=0,failed_calls=0
cmdstat_FT.CREATE:calls=4,usec=22379,usec_per_call=5594.75,rejected_calls=0,failed_calls=0
cmdstat_select:calls=113,usec=1544,usec_per_call=13.66,rejected_calls=0,failed_calls=0
cmdstat_FT.DROP:calls=1,usec=652,usec_per_call=652.00,rejected_calls=0,failed_calls=1
cmdstat_xdel:calls=14,usec=1105,usec_per_call=78.93,rejected_calls=0,failed_calls=0
cmdstat_hmset:calls=69,usec=27346,usec_per_call=396.32,rejected_calls=0,failed_calls=0
cmdstat_client:calls=38,usec=1330,usec_per_call=35.00,rejected_calls=0,failed_calls=0
cmdstat_hexists:calls=16,usec=166,usec_per_call=10.38,rejected_calls=0,failed_calls=0
cmdstat_hgetall:calls=1,usec=338,usec_per_call=338.00,rejected_calls=0,failed_calls=0
cmdstat_zscan:calls=23,usec=784,usec_per_call=34.09,rejected_calls=0,failed_calls=0
cmdstat_info:calls=962,usec=179756,usec_per_call=186.86,rejected_calls=0,failed_calls=0
cmdstat_xgroup:calls=6,usec=873,usec_per_call=145.50,rejected_calls=0,failed_calls=0
cmdstat_subscribe:calls=19,usec=1279,usec_per_call=67.32,rejected_calls=0,failed_calls=0
cmdstat_script:calls=6,usec=17241,usec_per_call=2873.50,rejected_calls=0,failed_calls=0
cmdstat_xpending:calls=12,usec=1702,usec_per_call=141.83,rejected_calls=0,failed_calls=0
cmdstat_exec:calls=7,usec=23702,usec_per_call=3386.00,rejected_calls=0,failed_calls=0
cmdstat_config:calls=57,usec=15840,usec_per_call=277.89,rejected_calls=0,failed_calls=0
cmdstat_cluster:calls=19,usec=267,usec_per_call=14.05,rejected_calls=0,failed_calls=19
cmdstat_eval:calls=6,usec=8109,usec_per_call=1351.50,rejected_calls=0,failed_calls=0
cmdstat_keys:calls=2,usec=955,usec_per_call=477.50,rejected_calls=0,failed_calls=0

# Errorstats
errorstat_ERR:count=45
errorstat_Unknown:count=1

# Cluster
cluster_enabled:0

# Keyspace
db0:keys=15,expires=1,avg_ttl=8216800

------ CLIENT LIST OUTPUT ------
id=12 addr=172.24.0.1:63166 laddr=172.24.0.3:6379 fd=14 name=Tylers-MacBook-Pro age=6589 idle=60 flags=b db=0 sub=0 psub=0 multi=-1 qbuf=256 qbuf-free=0 argv-mem=141 obl=0 oll=0 omem=0 tot-mem=21037 events=r cmd=xreadgroup user=default redir=-1
id=13 addr=172.24.0.1:63164 laddr=172.24.0.3:6379 fd=15 name=Tylers-MacBook-Pro age=6589 idle=53 flags=P db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20496 events=r cmd=ping user=default redir=-1
id=14 addr=172.24.0.1:63168 laddr=172.24.0.3:6379 fd=16 name=Tylers-MacBook-Pro age=6589 idle=60 flags=P db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20496 events=r cmd=ping user=default redir=-1
id=49 addr=172.24.0.1:64192 laddr=172.24.0.3:6379 fd=8 name=Tylers-MacBook-Pro age=4414 idle=2 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=info user=default redir=-1
id=50 addr=172.24.0.1:64190 laddr=172.24.0.3:6379 fd=9 name=Tylers-MacBook-Pro age=4414 idle=60 flags=P db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20496 events=r cmd=ping user=default redir=-1
id=15 addr=172.24.0.1:63170 laddr=172.24.0.3:6379 fd=17 name=Tylers-MacBook-Pro age=6589 idle=53 flags=b db=0 sub=0 psub=0 multi=-1 qbuf=256 qbuf-free=0 argv-mem=127 obl=0 oll=0 omem=0 tot-mem=21023 events=r cmd=xreadgroup user=default redir=-1
id=16 addr=172.24.0.1:63172 laddr=172.24.0.3:6379 fd=18 name=Tylers-MacBook-Pro age=6589 idle=60 flags=b db=0 sub=0 psub=0 multi=-1 qbuf=256 qbuf-free=0 argv-mem=135 obl=0 oll=0 omem=0 tot-mem=21031 events=r cmd=xreadgroup user=default redir=-1
id=17 addr=172.24.0.1:63176 laddr=172.24.0.3:6379 fd=19 name=Tylers-MacBook-Pro age=6589 idle=60 flags=b db=0 sub=0 psub=0 multi=-1 qbuf=224 qbuf-free=0 argv-mem=124 obl=0 oll=0 omem=0 tot-mem=20956 events=r cmd=xreadgroup user=default redir=-1
id=18 addr=172.24.0.1:63174 laddr=172.24.0.3:6379 fd=20 name=Tylers-MacBook-Pro age=6589 idle=60 flags=b db=0 sub=0 psub=0 multi=-1 qbuf=256 qbuf-free=0 argv-mem=116 obl=0 oll=0 omem=0 tot-mem=21012 events=r cmd=xreadgroup user=default redir=-1
id=19 addr=172.24.0.1:63178 laddr=172.24.0.3:6379 fd=21 name=Tylers-MacBook-Pro age=6589 idle=60 flags=P db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20496 events=r cmd=ping user=default redir=-1
id=20 addr=172.24.0.1:63180 laddr=172.24.0.3:6379 fd=22 name=Tylers-MacBook-Pro age=6589 idle=60 flags=b db=0 sub=0 psub=0 multi=-1 qbuf=224 qbuf-free=0 argv-mem=147 obl=0 oll=0 omem=0 tot-mem=20979 events=r cmd=xreadgroup user=default redir=-1
id=21 addr=172.24.0.1:63182 laddr=172.24.0.3:6379 fd=23 name=Tylers-MacBook-Pro age=6589 idle=60 flags=P db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20496 events=r cmd=ping user=default redir=-1
id=22 addr=172.24.0.1:63184 laddr=172.24.0.3:6379 fd=24 name=Tylers-MacBook-Pro age=6589 idle=53 flags=P db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20496 events=r cmd=ping user=default redir=-1
id=51 addr=172.24.0.1:55430 laddr=172.24.0.3:6379 fd=26 name=Tylers-MacBook-Pro age=1 idle=0 flags=x db=0 sub=0 psub=0 multi=1 qbuf=844 qbuf-free=113834 argv-mem=4 obl=18 oll=0 omem=0 tot-mem=135492 events=r cmd=exec user=default redir=-1
id=52 addr=172.24.0.1:55432 laddr=172.24.0.3:6379 fd=27 name=Tylers-MacBook-Pro age=1 idle=1 flags=P db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=subscribe user=default redir=-1
id=23 addr=172.24.0.1:63186 laddr=172.24.0.3:6379 fd=25 name=Tylers-MacBook-Pro age=6589 idle=59 flags=P db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20496 events=r cmd=ping user=default redir=-1
id=11 addr=172.24.0.1:63160 laddr=172.24.0.3:6379 fd=13 name=Tylers-MacBook-Pro age=6590 idle=59 flags=P db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20496 events=r cmd=ping user=default redir=-1
id=8 addr=172.24.0.1:63126 laddr=172.24.0.3:6379 fd=10 name=Tylers-MacBook-Pro age=6610 idle=19 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=info user=default redir=-1
id=9 addr=172.24.0.1:63128 laddr=172.24.0.3:6379 fd=11 name=Tylers-MacBook-Pro age=6610 idle=18 flags=P db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20496 events=r cmd=ping user=default redir=-1
id=10 addr=172.24.0.1:63158 laddr=172.24.0.3:6379 fd=12 name=Tylers-MacBook-Pro age=6590 idle=59 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=info user=default redir=-1

------ CURRENT CLIENT INFO ------
id=51 addr=172.24.0.1:55430 laddr=172.24.0.3:6379 fd=26 name=Tylers-MacBook-Pro age=1 idle=0 flags=x db=0 sub=0 psub=0 multi=1 qbuf=844 qbuf-free=113834 argv-mem=4 obl=18 oll=0 omem=0 tot-mem=135492 events=r cmd=exec user=default redir=-1
argv[0]: 'HMSET'
argv[1]: 'unit.txrouter.V1.purchases_data.SourcePurchaseIdb24d509b-b59b-468e-a558-2ebc5ed1a30c'
argv[2]: 'sourcePurchaseId'
argv[3]: 'SourcePurchaseIdb24d509b\-b59b\-468e\-a558\-2ebc5ed1a30c'
argv[4]: 'sourceMessageSequence'
argv[5]: '7'
argv[6]: 'auctionHubName'
argv[7]: 'TRADEREV'
argv[8]: 'payload'
argv[9]: '
5�>'
argv[10]: 'region'
argv[11]: 'CA'
argv[12]: 'totalAmountDue'
argv[13]: '89'
argv[14]: 'paymentStatus'
argv[15]: 'PAID'
argv[16]: 'item_cityStateProvince'
argv[17]: 'Cityc4f4f1cd\-8db0\-4920\-a7cf\-0b508544cdad StateProvince9421036c\-3e6c\-4de2\-b9d0\-f540dc9c7627'
argv[18]: 'buyer_organization_name'
argv[19]: 'Namebf3934f7\-1c19\-4ba4\-a3ed\-8205afefe7f2'
argv[20]: 'buyer_organization_auctionAccessId'
argv[21]: 'AuctionAccessIdcf5e8d4d\-ac17\-4495\-9a5b\-a1e55d05ff6c'
argv[22]: 'purchaseDate'
argv[23]: '1642739179'
argv[24]: 'data_version'
argv[25]: '5'
argv[26]: 'arbitration_status'
argv[27]: 'NOT_ARBITRATED'
argv[28]: 'title_status'
argv[29]: 'NOT_RECEIVED'
argv[30]: 'assurance_status'
argv[31]: 'PURCHASED'
argv[32]: 'vin'
argv[33]: 'Vin5d9bbd15\-177b\-49ff\-94d1\-3e36543c8de9'
argv[34]: 'purchaser_name'
argv[35]: 'Name11e46437\-1df5\-45f9\-8c7d\-62674ea30d2b'
argv[36]: 'purchaser_auctionAccessId'
argv[37]: 'AuctionAccessIdf766ac05\-e1e8\-4ee9\-bb1b\-8035e7d3ee4d'
argv[38]: 'isArchived'
argv[39]: '0'
1:M 21 Jan 2022 04:26:19.855 # key 'unit.txrouter.V1.purchases_data.SourcePurchaseIdb24d509b-b59b-468e-a558-2ebc5ed1a30c' found in DB containing the following object:
1:M 21 Jan 2022 04:26:19.855 # Object type: 4
1:M 21 Jan 2022 04:26:19.855 # Object encoding: 2
1:M 21 Jan 2022 04:26:19.855 # Object refcount: 1

------ MODULES INFO OUTPUT ------

------ FAST MEMORY TEST ------
1:M 21 Jan 2022 04:26:19.858 # Bio thread for job type #0 terminated
1:M 21 Jan 2022 04:26:19.858 # Bio thread for job type #1 terminated
1:M 21 Jan 2022 04:26:19.858 # Bio thread for job type #2 terminated
*** Preparing to test memory region 4000213000 (2547712 bytes)
*** Preparing to test memory region 4001c6c000 (12288 bytes)
*** Preparing to test memory region 4001db5000 (8192 bytes)
*** Preparing to test memory region 4002140000 (16384 bytes)
*** Preparing to test memory region 4002162000 (16384 bytes)
*** Preparing to test memory region 4002327000 (40960 bytes)
*** Preparing to test memory region 4002600000 (2097152 bytes)
*** Preparing to test memory region 4002931000 (2097152 bytes)
*** Preparing to test memory region 4003000000 (4194304 bytes)
*** Preparing to test memory region 40037e5000 (12288 bytes)
*** Preparing to test memory region 40037e9000 (8388608 bytes)
*** Preparing to test memory region 4003fea000 (8388608 bytes)
*** Preparing to test memory region 40047eb000 (8388608 bytes)
*** Preparing to test memory region 4004fec000 (8388608 bytes)
*** Preparing to test memory region 40057ed000 (8388608 bytes)
*** Preparing to test memory region 4005fed000 (2621440 bytes)
*** Preparing to test memory region 400626e000 (8388608 bytes)
*** Preparing to test memory region 4006e00000 (2097152 bytes)
*** Preparing to test memory region 400706e000 (8388608 bytes)
*** Preparing to test memory region 400786e000 (2097152 bytes)
*** Preparing to test memory region 4008000000 (135168 bytes)
*** Preparing to test memory region 400fe00000 (2097152 bytes)
*** Preparing to test memory region 401006d000 (2097152 bytes)
*** Preparing to test memory region 401026e000 (8388608 bytes)
.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.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: RM_StringPtrLen (base: 0x40000d6df0)
Module: /usr/local/bin/redis-server *:6379 (base 0x4000000000)
$ xxd -r -p /tmp/dump.hex /tmp/dump.bin
$ objdump --adjust-vma=0x40000d6df0 -D -b binary -m i386:x86-64 /tmp/dump.bin
------
1:M 21 Jan 2022 04:26:20.452 # dump of function (hexdump of 133 bytes):
4885ff747b488b47084885f674300fb648ff89ca83e20780fa040f879dcbf6ff488d3d61de0d000fb6d2486314974801faffe20f1f4400008b48f748890ec390488b48efebf5662e0f1f840000000000c0e9030fb6c9ebe30f1f8400000000000fb648fdebd5662e0f1f8400000000000fb748fbebc5662e0f1f840000000000488d0551e1

=== 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/redis/redis/issues

  Suspect RAM error? Use redis-server --test-memory to verify it.
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
ashtul commented 2 years ago

@tyler-boyd Can you please provide more details for your use case? Can you please attach the FT.INFO output for the index?

tyler-boyd commented 2 years ago

Our search documents are mostly boring strings/numbers, but the payload is a 1kb+ protobuf binary blob.

We have 2 identical schemas, one for unit tests (with the prefix "unit.") and one for local dev (with the prefix "dev."). Interestingly, the issue doesn't seem to occur when there's only one schema created (eg. I only ran unit tests, or I only ran the dev server). But as soon as I do the other thing, the redis server crashes shortly but not immediately.

Again, as far as I can tell, this only happens under Docker running an amd64 image on an M1 chip (qemu). Our CI systems and my non-M1 coworkers are uanffected by this issue.

ft.info:

 1) index_name
 2) unit.txrouter.V1.purchases.searchindex2
 3) index_options
 4) (empty array)
 5) index_definition
 6) 1) key_type
    2) HASH
    3) prefixes
    4) 1) unit.txrouter.V1.purchases_data
    5) default_score
    6) "1"
    7) payload_field
    8) payload
 7) attributes
 8)  1) 1) identifier
        2) sourcePurchaseId
        3) attribute
        4) sourcePurchaseId
        5) type
        6) TEXT
        7) WEIGHT
        8) "1"
     2) 1) identifier
        2) sourceMessageSequence
        3) attribute
        4) sourceMessageSequence
        5) type
        6) NUMERIC
     3) 1) identifier
        2) totalAmountDue
        3) attribute
        4) totalAmountDue
        5) type
        6) NUMERIC
     4) 1) identifier
        2) arbitration_status
        3) attribute
        4) arbitration_status
        5) type
        6) TEXT
        7) WEIGHT
        8) "1"
     5) 1) identifier
        2) paymentStatus
        3) attribute
        4) paymentStatus
        5) type
        6) TEXT
        7) WEIGHT
        8) "1"
     6) 1) identifier
        2) purchaseDate
        3) attribute
        4) purchaseDate
        5) type
        6) NUMERIC
        7) SORTABLE
     7) 1) identifier
        2) assurance_status
        3) attribute
        4) assurance_status
        5) type
        6) TEXT
        7) WEIGHT
        8) "1"
     8) 1) identifier
        2) item_cityStateProvince
        3) attribute
        4) item_cityStateProvince
        5) type
        6) TEXT
        7) WEIGHT
        8) "1"
     9) 1) identifier
        2) buyer_organization_name
        3) attribute
        4) buyer_organization_name
        5) type
        6) TEXT
        7) WEIGHT
        8) "1"
    10) 1) identifier
        2) buyer_organization_auctionAccessId
        3) attribute
        4) buyer_organization_auctionAccessId
        5) type
        6) TEXT
        7) WEIGHT
        8) "1"
    11) 1) identifier
        2) title_status
        3) attribute
        4) title_status
        5) type
        6) TEXT
        7) WEIGHT
        8) "1"
    12) 1) identifier
        2) region
        3) attribute
        4) region
        5) type
        6) TEXT
        7) WEIGHT
        8) "1"
    13) 1) identifier
        2) purchaser_name
        3) attribute
        4) purchaser_name
        5) type
        6) TEXT
        7) WEIGHT
        8) "1"
    14) 1) identifier
        2) purchaser_auctionAccessId
        3) attribute
        4) purchaser_auctionAccessId
        5) type
        6) TEXT
        7) WEIGHT
        8) "1"
    15) 1) identifier
        2) data_version
        3) attribute
        4) data_version
        5) type
        6) TEXT
        7) WEIGHT
        8) "1"
    16) 1) identifier
        2) auctionHubId
        3) attribute
        4) auctionHubId
        5) type
        6) TEXT
        7) WEIGHT
        8) "1"
    17) 1) identifier
        2) auctionHubName
        3) attribute
        4) auctionHubName
        5) type
        6) TEXT
        7) WEIGHT
        8) "1"
    18) 1) identifier
        2) vin
        3) attribute
        4) vin
        5) type
        6) TEXT
        7) WEIGHT
        8) "1"
    19) 1) identifier
        2) isArchived
        3) attribute
        4) isArchived
        5) type
        6) NUMERIC
    20) 1) identifier
        2) hasEvents
        3) attribute
        4) hasEvents
        5) type
        6) NUMERIC
 9) num_docs
10) "0"
11) max_doc_id
12) "0"
13) num_terms
14) "0"
15) num_records
16) "0"
17) inverted_sz_mb
18) "0"
19) total_inverted_index_blocks
20) "0"
21) offset_vectors_sz_mb
22) "0"
23) doc_table_size_mb
24) "0"
25) sortable_values_size_mb
26) "0"
27) key_table_size_mb
28) "0"
29) records_per_doc_avg
30) "-nan"
31) bytes_per_record_avg
32) "-nan"
33) offsets_per_term_avg
34) "-nan"
35) offset_bits_per_record_avg
36) "-nan"
37) hash_indexing_failures
38) "0"
39) indexing
40) "0"
41) percent_indexed
42) "1"
43) gc_stats
44)  1) bytes_collected
     2) "0"
     3) total_ms_run
     4) "0"
     5) total_cycles
     6) "0"
     7) average_cycle_time_ms
     8) "-nan"
     9) last_run_time_ms
    10) "0"
    11) gc_numeric_trees_missed
    12) "0"
    13) gc_blocks_denied
    14) "0"
45) cursor_stats
46) 1) global_idle
    2) (integer) 0
    3) global_total
    4) (integer) 0
    5) index_capacity
    6) (integer) 128
    7) index_total
    8) (integer) 0