RedisLabsModules / redismod

A Docker image with select Redis Labs modules
BSD 3-Clause "New" or "Revised" License
127 stars 28 forks source link

Crash when emulating image on Apple m1 Max chip #28

Open cooperwalter opened 2 years ago

cooperwalter commented 2 years ago

I can run the image on my Intel MacBook without any issues. Any help would be much appreciated.

=== REDIS BUG REPORT START: Cut & paste starting from here ===

1:M 26 Nov 2021 23:51:07.075 # Redis 6.2.6 crashed by signal: 11, si_code: 1

1:M 26 Nov 2021 23:51:07.075 # Accessing address: 0x6c20666f657079

1:M 26 Nov 2021 23:51:07.075 # Crashed running the instruction at: 0x400004a003

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

EIP:

/usr/local/bin/redis-server *:6379(dictFind+0x83)[0x400004a003]

Backtrace:

/lib/x86_64-linux-gnu/libpthread.so.0(+0x14140)[0x4002158140]

/usr/local/bin/redis-server *:6379(dictFind+0x83)[0x400004a003]

/usr/local/bin/redis-server *:6379(lookupKey+0x15)[0x400006da55]

/usr/local/bin/redis-server *:6379(lookupKeyReadWithFlags+0x55)[0x4000070235]

/usr/local/bin/redis-server *:6379(sinterGenericCommand+0x8e)[0x40000867ee]

/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 26 Nov 2021 23:51:07.085 # 

RAX:0000000000000000 RBX:000000400293c600

RCX:0000000000000062 RDX:ffffffffffffffe0

RDI:000000400e4c4d33 RSI:000000400eaaccbb

RBP:000000400293c630 RSP:0000004001c3f6e0

R8 :000000400019b24c R9 :000000400e4c4d33

R10:0000000000000000 R11:00000040022f8d80

R12:696c20666f657079 R13:e91bfd88324f6004

R14:000000400293c650 R15:000000400e4c4d13

RIP:000000400004a003 EFL:0000000000000202

CSGSFS:002b000000000033

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6ef) -> 00000040000867ee

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6ee) -> 000000400e65a0d8

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6ed) -> 000000400e611100

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6ec) -> 000000400e635bb8

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6eb) -> 0000004000070235

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6ea) -> 000000400e4c4d00

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6e9) -> 0000004002a3f048

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6e8) -> 0000004002a3f048

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6e7) -> 000000400006da55

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6e6) -> 0000000000000000

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6e5) -> 0000001e999be240

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6e4) -> 0000000000000001

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6e3) -> 000000400e4c4d00

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6e2) -> 0000000000000000

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6e1) -> 0000000000000000

1:M 26 Nov 2021 23:51:07.085 # (0000004001c3f6e0) -> 0000000000000001

------ INFO OUTPUT ------

# Server

redis_version:6.2.6

redis_git_sha1:00000000

redis_git_dirty:0

redis_build_id:6d6062dbdaddf972

redis_mode:standalone

os:Linux 5.10.47-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:4beda3c253269ec31f660ea80b7b4b691cbaea26

tcp_port:6379

server_time_usec:1637970667074750

uptime_in_seconds:185645

uptime_in_days:2

hz:10

configured_hz:10

lru_clock:10580714

executable:/usr/local/bin/redis-server

config_file:

io_threads_active:0

# Clients

connected_clients:11

cluster_connections:0

maxclients:10000

client_recent_max_input_buffer:72

client_recent_max_output_buffer:0

blocked_clients:0

tracking_clients:0

clients_in_timeout_table:0

# Memory

used_memory:10242016

used_memory_human:9.77M

used_memory_rss:0

used_memory_rss_human:0B

used_memory_peak:10260752

used_memory_peak_human:9.79M

used_memory_peak_perc:99.82%

used_memory_overhead:6394032

used_memory_startup:6036264

used_memory_dataset:3847984

used_memory_dataset_perc:91.49%

allocator_allocated:10331168

allocator_active:10706944

allocator_resident:13664256

total_system_memory:2084888576

total_system_memory_human:1.94G

used_memory_lua:40960

used_memory_lua_human:40.00K

used_memory_scripts:880

used_memory_scripts_human:880B

number_of_cached_scripts:2

maxmemory:0

maxmemory_human:0B

maxmemory_policy:noeviction

allocator_frag_ratio:1.04

allocator_frag_bytes:375776

allocator_rss_ratio:1.28

allocator_rss_bytes:2957312

rss_overhead_ratio:0.00

rss_overhead_bytes:-13664256

mem_fragmentation_ratio:0.00

mem_fragmentation_bytes:-10201560

mem_not_counted_for_evict:0

mem_replication_backlog:0

mem_clients_slaves:0

mem_clients_normal:225696

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:7941

rdb_bgsave_in_progress:0

rdb_last_save_time:1637970638

rdb_last_bgsave_status:ok

rdb_last_bgsave_time_sec:0

rdb_current_bgsave_time_sec:-1

rdb_last_cow_size:4202496

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:723

total_commands_processed:49123

instantaneous_ops_per_sec:1317

total_net_input_bytes:5042424

total_net_output_bytes:8852247

instantaneous_input_kbps:79.93

instantaneous_output_kbps:3.43

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

expire_cycle_cpu_milliseconds:1893

evicted_keys:0

keyspace_hits:8748

keyspace_misses:21347

pubsub_channels:0

pubsub_patterns:0

latest_fork_usec:973

total_forks:42

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:2

dump_payload_sanitizations:0

total_reads_processed:36569

total_writes_processed:36547

io_threaded_reads_processed:0

io_threaded_writes_processed:0

# Replication

role:master

connected_slaves:0

master_failover_state:no-failover

master_replid:6ec4ed2ea40294bcac6ffe269507fa0c4911fcfa

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:625.427665

used_cpu_user:876.185829

used_cpu_sys_children:0.482749

used_cpu_user_children:2.112532

used_cpu_sys_main_thread:222.776632

used_cpu_user_main_thread:244.834398

# Modules

module:name=rg,ver=10008,api=1,filters=0,usedby=[],using=[ai],options=[]

module:name=ai,ver=10205,api=1,filters=0,usedby=[rg],using=[],options=[handle-io-errors]

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

module:name=timeseries,ver=10410,api=1,filters=0,usedby=[],using=[],options=[]

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

module:name=graph,ver=20411,api=1,filters=0,usedby=[],using=[],options=[]

module:name=bf,ver=20206,api=1,filters=0,usedby=[],using=[],options=[]

# Commandstats

cmdstat_hincrby:calls=84,usec=3367,usec_per_call=40.08,rejected_calls=0,failed_calls=0

cmdstat_evalsha:calls=6272,usec=709683,usec_per_call=113.15,rejected_calls=0,failed_calls=2

cmdstat_zrange:calls=1,usec=369,usec_per_call=369.00,rejected_calls=0,failed_calls=0

cmdstat_get:calls=3135,usec=26936,usec_per_call=8.59,rejected_calls=0,failed_calls=0

cmdstat_info:calls=732,usec=701322,usec_per_call=958.09,rejected_calls=0,failed_calls=0

cmdstat_smembers:calls=6420,usec=63561,usec_per_call=9.90,rejected_calls=0,failed_calls=0

cmdstat_zrevrangebylex:calls=2080,usec=274484,usec_per_call=131.96,rejected_calls=0,failed_calls=0

cmdstat_eval:calls=2,usec=10807,usec_per_call=5403.50,rejected_calls=0,failed_calls=0

cmdstat_hset:calls=12,usec=623,usec_per_call=51.92,rejected_calls=0,failed_calls=0

cmdstat_zcard:calls=5,usec=221,usec_per_call=44.20,rejected_calls=0,failed_calls=0

cmdstat_config:calls=1,usec=711,usec_per_call=711.00,rejected_calls=0,failed_calls=0

cmdstat_json.set:calls=895,usec=691069,usec_per_call=772.14,rejected_calls=0,failed_calls=0

cmdstat_scard:calls=6,usec=143,usec_per_call=23.83,rejected_calls=0,failed_calls=0

cmdstat_sscan:calls=16,usec=288,usec_per_call=18.00,rejected_calls=0,failed_calls=0

cmdstat_exists:calls=3137,usec=15787,usec_per_call=5.03,rejected_calls=0,failed_calls=0

cmdstat_zrangebylex:calls=9910,usec=449685,usec_per_call=45.38,rejected_calls=0,failed_calls=0

cmdstat_hget:calls=48,usec=930,usec_per_call=19.38,rejected_calls=0,failed_calls=0

cmdstat_del:calls=6760,usec=125207,usec_per_call=18.52,rejected_calls=0,failed_calls=0

cmdstat_zadd:calls=834,usec=42360,usec_per_call=50.79,rejected_calls=0,failed_calls=0

cmdstat_zrevrangebyscore:calls=2,usec=168,usec_per_call=84.00,rejected_calls=0,failed_calls=0

cmdstat_set:calls=3138,usec=160308,usec_per_call=51.09,rejected_calls=0,failed_calls=0

cmdstat_sadd:calls=815,usec=13550,usec_per_call=16.63,rejected_calls=0,failed_calls=0

cmdstat_json.get:calls=3885,usec=1934489,usec_per_call=497.94,rejected_calls=0,failed_calls=0

cmdstat_select:calls=728,usec=5587,usec_per_call=7.67,rejected_calls=0,failed_calls=0

cmdstat_zrem:calls=205,usec=9671,usec_per_call=47.18,rejected_calls=0,failed_calls=0

# Errorstats

errorstat_NOSCRIPT:count=2

# Cluster

cluster_enabled:0

# Keyspace

db1:keys=2049,expires=2,avg_ttl=852

------ CLIENT LIST OUTPUT ------

id=32 addr=172.17.0.1:59636 laddr=172.17.0.2:6379 fd=19 name= age=185601 idle=185434 flags=N db=1 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20552 events=r cmd=zrevrangebyscore user=default redir=-1

id=33 addr=172.17.0.1:59638 laddr=172.17.0.2:6379 fd=20 name= age=185601 idle=185601 flags=N db=1 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20496 events=r cmd=info user=default redir=-1

id=74 addr=172.17.0.1:59640 laddr=172.17.0.2:6379 fd=23 name= age=185597 idle=185431 flags=N db=1 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20528 events=r cmd=evalsha user=default redir=-1

id=25 addr=172.17.0.1:59626 laddr=172.17.0.2:6379 fd=21 name= age=185630 idle=185597 flags=N db=1 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20520 events=r cmd=zadd user=default redir=-1

id=974 addr=172.17.0.1:61054 laddr=172.17.0.2:6379 fd=14 name= age=36 idle=36 flags=N db=1 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20520 events=r cmd=json.set user=default redir=-1

id=975 addr=172.17.0.1:61056 laddr=172.17.0.2:6379 fd=15 name= age=36 idle=0 flags=N db=1 sub=0 psub=0 multi=-1 qbuf=57 qbuf-free=40897 argv-mem=40 obl=0 oll=0 omem=0 tot-mem=61496 events=r cmd=smembers user=default redir=-1

id=26 addr=172.17.0.1:59628 laddr=172.17.0.2:6379 fd=22 name= age=185630 idle=185598 flags=N db=1 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20520 events=r cmd=zrangebylex user=default redir=-1

id=29 addr=172.17.0.1:59630 laddr=172.17.0.2:6379 fd=16 name= age=185601 idle=185431 flags=N db=1 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20512 events=r cmd=json.get user=default redir=-1

id=30 addr=172.17.0.1:59632 laddr=172.17.0.2:6379 fd=17 name= age=185601 idle=32 flags=N db=1 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20520 events=r cmd=zrangebylex user=default redir=-1

id=31 addr=172.17.0.1:59634 laddr=172.17.0.2:6379 fd=18 name= age=185601 idle=32 flags=N db=1 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20512 events=r cmd=json.get user=default redir=-1

id=973 addr=172.17.0.1:61052 laddr=172.17.0.2:6379 fd=13 name= age=36 idle=23 flags=N db=1 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20512 events=r cmd=json.get user=default redir=-1

------ CURRENT CLIENT INFO ------

id=975 addr=172.17.0.1:61056 laddr=172.17.0.2:6379 fd=15 name= age=36 idle=0 flags=N db=1 sub=0 psub=0 multi=-1 qbuf=57 qbuf-free=40897 argv-mem=40 obl=0 oll=0 omem=0 tot-mem=61496 events=r cmd=smembers user=default redir=-1

argv[0]: 'smembers'

argv[1]: 'profiles_idxrivalja4h72ge4k9j'

qemu: uncaught target signal 11 (Segmentation fault) - core dumped
oliverbenns commented 2 years ago

Also running an M1 and struggling here. I tried building from source with:

docker build --build-arg ARCH=arm64v8 --tag=redislabs/redismod:latest .

The build succeeds, however on running it cannot open the shared object file for redisai:

Module /usr/lib/redis/modules/redisai.so failed to load: /usr/lib/redis/modules/redisai.so: cannot open shared object file: No such file or directory

Looking at redisai, it seems that this is also only built for intel instruction sets: https://github.com/RedisAI/RedisAI/issues/879 . Looking at the image naming conventions, it looks like support may be coming.

vgjenks commented 2 years ago

Any idea when this might be ready? We've got a couple M1 devs on the team that can't run this image. :(

10bo commented 11 months ago

Same issue here.