Hello, I am just starting to learn Redis and wanted to install in on my M1 MacBook Pro. I followed these instructions, but I was unable to start Redis at all. I have tried doing so both with and without root permissions.
Crash report
This is what was logged in my system console upon running brew services start redis
Process: redis-server [19373]
Path: /opt/homebrew/*/redis-server
Identifier: redis-server
Version: 0
Code Type: ARM-64 (Native)
Parent Process: ??? [1]
Responsible: redis-server [19373]
User ID: 501
Date/Time: 2021-02-20 22:31:26.845 -0600
OS Version: macOS 11.2.1 (20D74)
Report Version: 12
Anonymous UUID: E98E77F9-5D1C-9590-3DFF-537EA24817DB
Time Awake Since Boot: 1500 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes: 0x0000000000000032, 0x00000001022ec000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace CODESIGNING, Code 0x2
kernel messages:
VM Regions Near 0x1022ec000:
__LINKEDIT 1022b4000-1022ec000 [ 224K] r--/r-- SM=COW /opt/homebrew/*
--> mapped file 1022ec000-1022f0000 [ 16K] r--/r-x SM=PRV Object_id=8867d0f5
__TEXT 102654000-1026d0000 [ 496K] r-x/r-x SM=COW /usr/lib/dyld
Application Specific Information:
dyld: launch, loading dependent libraries
/opt/homebrew/opt/openssl@1.1/lib/libssl.1.1.dylib
Thread 0 Crashed:
0 dyld 0x00000001026b0780 bcmp + 16
1 dyld 0x0000000102671408 ImageLoaderMachO::validateFirstPages(linkedit_data_command const*, int, unsigned char const*, unsigned long, long long, ImageLoader::LinkContext const&) + 136
2 dyld 0x00000001026783b8 ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, encryption_info_command const*, ImageLoader::LinkContext const&) + 268
3 dyld 0x000000010266fffc ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) + 172
4 dyld 0x0000000102658290 dyld::loadPhase6(int, stat const&, char const*, dyld::LoadContext const&) + 668
5 dyld 0x0000000102660dd8 dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 1328
6 dyld 0x0000000102660824 dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 208
7 dyld 0x0000000102660530 dyld::loadPhase3(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 1100
8 dyld 0x000000010265fcf0 dyld::loadPhase1(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 212
9 dyld 0x0000000102657e0c dyld::loadPhase0(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 468
10 dyld 0x00000001026579b0 dyld::load(char const*, dyld::LoadContext const&, unsigned int&) + 196
11 dyld 0x000000010266177c dyld::libraryLocator(char const*, bool, char const*, ImageLoader::RPathChain const*, unsigned int&) + 56
12 dyld 0x000000010266b9d4 ImageLoader::recursiveLoadLibraries(ImageLoader::LinkContext const&, bool, ImageLoader::RPathChain const&, char const*) + 344
13 dyld 0x000000010266a1ac ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, bool, ImageLoader::RPathChain const&, char const*) + 160
14 dyld 0x000000010265a5f4 dyld::link(ImageLoader*, bool, bool, ImageLoader::RPathChain const&, unsigned int) + 328
15 dyld 0x000000010265c928 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 6764
16 dyld 0x0000000102655258 dyldbootstrap::start(dyld3::MachOLoaded const*, int, char const**, dyld3::MachOLoaded const*, unsigned long*) + 476
17 dyld 0x0000000102655038 _dyld_start + 56
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x00000001022ec000 x1: 0x000000016dc45da0 x2: 0x0000000000000690 x3: 0x0000000000040001
x4: 0x0000000000000003 x5: 0x0000000000000000 x6: 0x00000001026d8280 x7: 0x0000000000000000
x8: 0x0000000000000000 x9: 0x000000016dc46350 x10: 0x0000000000000001 x11: 0x0001803000000000
x12: 0x0000000000000032 x13: 0x0004000000000000 x14: 0x0000000000076b40 x15: 0x000000016dc462d0
x16: 0x00000000000000c5 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x00000001026dd7a0
x20: 0x00000000000006a0 x21: 0x000000016dc45da0 x22: 0x00000001022ec000 x23: 0x0000000000000003
x24: 0x000000016dc46430 x25: 0x000000016dc4deb8 x26: 0x00000001021b0700 x27: 0x000000016dc45da0
x28: 0x0000000000000002 fp: 0x000000016dc457a0 lr: 0x0000000102671408
sp: 0x000000016dc45760 pc: 0x00000001026b0780 cpsr: 0x20000000
far: 0x00000001022ec000 esr: 0x92000007
Binary Images:
0x1021b0000 - 0x102287fff +redis-server (0) <95D988DD-A0E0-3327-9A6F-1876A7CF385B> /opt/homebrew/*/redis-server
0x102654000 - 0x1026cffff dyld (832.7.3) <4AB185B3-DC20-3C03-A193-67C0E6C589D7> /usr/lib/dyld
0x19ed52000 - 0x19ed53fff libSystem.B.dylib (1292.60.1) <CF348B98-3432-3B5A-920B-2C7AFE89000D> /usr/lib/libSystem.B.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 1541
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=481.2M resident=0K(0%) swapped_out_or_unallocated=481.2M(100%)
Writable regions: Total=8496K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8496K(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
STACK GUARD 56.0M 1
Stack 8176K 1
__AUTH 8 1
__AUTH_CONST 624 1
__DATA 384K 5
__DATA_CONST 48K 2
__LINKEDIT 479.9M 4
__TEXT 1368K 3
mapped file 16K 1
=========== ======= =======
TOTAL 545.7M 19
And this was logged by redis-cli ping:
Process: redis-cli [19195]
Path: /opt/homebrew/*/redis-cli
Identifier: redis-cli
Version: 0
Code Type: ARM-64 (Native)
Parent Process: bash [3337]
Responsible: iTerm2 [879]
User ID: 501
Date/Time: 2021-02-20 22:30:00.247 -0600
OS Version: macOS 11.2.1 (20D74)
Report Version: 12
Anonymous UUID: E98E77F9-5D1C-9590-3DFF-537EA24817DB
Time Awake Since Boot: 1400 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes: 0x0000000000000032, 0x0000000102e74000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace CODESIGNING, Code 0x2
kernel messages:
VM Regions Near 0x102e74000:
__LINKEDIT 102e64000-102e74000 [ 64K] r--/r-- SM=COW /opt/homebrew/*
--> mapped file 102e74000-102e78000 [ 16K] r--/r-x SM=PRV Object_id=8867d0f5
__TEXT 103194000-103210000 [ 496K] r-x/r-x SM=COW /usr/lib/dyld
Application Specific Information:
dyld: launch, loading dependent libraries
/opt/homebrew/opt/openssl@1.1/lib/libssl.1.1.dylib
Thread 0 Crashed:
0 dyld 0x00000001031f0780 bcmp + 16
1 dyld 0x00000001031b1408 ImageLoaderMachO::validateFirstPages(linkedit_data_command const*, int, unsigned char const*, unsigned long, long long, ImageLoader::LinkContext const&) + 136
2 dyld 0x00000001031b83b8 ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, encryption_info_command const*, ImageLoader::LinkContext const&) + 268
3 dyld 0x00000001031afffc ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) + 172
4 dyld 0x0000000103198290 dyld::loadPhase6(int, stat const&, char const*, dyld::LoadContext const&) + 668
5 dyld 0x00000001031a0dd8 dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 1328
6 dyld 0x00000001031a0824 dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 208
7 dyld 0x00000001031a0530 dyld::loadPhase3(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 1100
8 dyld 0x000000010319fcf0 dyld::loadPhase1(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 212
9 dyld 0x0000000103197e0c dyld::loadPhase0(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 468
10 dyld 0x00000001031979b0 dyld::load(char const*, dyld::LoadContext const&, unsigned int&) + 196
11 dyld 0x00000001031a177c dyld::libraryLocator(char const*, bool, char const*, ImageLoader::RPathChain const*, unsigned int&) + 56
12 dyld 0x00000001031ab9d4 ImageLoader::recursiveLoadLibraries(ImageLoader::LinkContext const&, bool, ImageLoader::RPathChain const&, char const*) + 344
13 dyld 0x00000001031aa1ac ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, bool, ImageLoader::RPathChain const&, char const*) + 160
14 dyld 0x000000010319a5f4 dyld::link(ImageLoader*, bool, bool, ImageLoader::RPathChain const&, unsigned int) + 328
15 dyld 0x000000010319c928 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 6764
16 dyld 0x0000000103195258 dyldbootstrap::start(dyld3::MachOLoaded const*, int, char const**, dyld3::MachOLoaded const*, unsigned long*) + 476
17 dyld 0x0000000103195038 _dyld_start + 56
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000102e74000 x1: 0x000000016cfcd7c0 x2: 0x0000000000000690 x3: 0x0000000000040001
x4: 0x0000000000000003 x5: 0x0000000000000000 x6: 0x0000000103218280 x7: 0x0000000000000000
x8: 0x0000000000000000 x9: 0x000000016cfcdd70 x10: 0x0000000000000001 x11: 0x0001803000000000
x12: 0x0000000000000032 x13: 0x0004000000000000 x14: 0x0000000000076b40 x15: 0x000000016cfcdcf0
x16: 0x00000000000000c5 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x000000010321d7a0
x20: 0x00000000000006a0 x21: 0x000000016cfcd7c0 x22: 0x0000000102e74000 x23: 0x0000000000000003
x24: 0x000000016cfcde50 x25: 0x000000016cfd58d8 x26: 0x0000000102e286b0 x27: 0x000000016cfcd7c0
x28: 0x0000000000000002 fp: 0x000000016cfcd1c0 lr: 0x00000001031b1408
sp: 0x000000016cfcd180 pc: 0x00000001031f0780 cpsr: 0x20000000
far: 0x0000000102e74000 esr: 0x92000007
Binary Images:
0x102e28000 - 0x102e57fff +redis-cli (0) <6902B5F9-4425-3EB1-81BF-4D107D0499F8> /opt/homebrew/*/redis-cli
0x103194000 - 0x10320ffff dyld (832.7.3) <4AB185B3-DC20-3C03-A193-67C0E6C589D7> /usr/lib/dyld
0x19ed52000 - 0x19ed53fff libSystem.B.dylib (1292.60.1) <CF348B98-3432-3B5A-920B-2C7AFE89000D> /usr/lib/libSystem.B.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 1541
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=480.4M resident=0K(0%) swapped_out_or_unallocated=480.4M(100%)
Writable regions: Total=8400K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8400K(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
STACK GUARD 56.0M 1
Stack 8176K 1
__AUTH 8 1
__AUTH_CONST 624 1
__DATA 256K 5
__DATA_CONST 48K 2
__LINKEDIT 479.8M 4
__TEXT 696K 3
mapped file 16K 1
=========== ======= =======
TOTAL 544.8M 19
Aditional information
- macOS 11.2.1
- Steps to reproduce:
Here's how I installed it via Homebrew 3.0.1:
$ brew install redis
Warning: Treating redis as a formula. For the cask, use homebrew/cask/redis
==> Downloading https://homebrew.bintray.com/bottles/redis-6.0.10.arm64_big_sur.bottle.tar.gz
Already downloaded: /Users/jeremyckahn/Library/Caches/Homebrew/downloads/7ba5f6a220056a681399457cc571100883a319d999dd9a327863b49aea4379fb--redis-6.0.10.arm64_big_sur.bottle.tar.gz
==> Pouring redis-6.0.10.arm64_big_sur.bottle.tar.gz
Warning: This keg was marked linked already, continuing anyway
==> Caveats
To have launchd start redis now and restart at login:
brew services start redis
Or, if you don't want/need a background service you can just run:
redis-server /opt/homebrew/etc/redis.conf
==> Summary
🍺 /opt/homebrew/Cellar/redis/6.0.10: 13 files, 4MB
~
$ brew services start redis
==> Successfully started `redis` (label: homebrew.mxcl.redis)
~
$ redis-cli ping
Killed: 9
~
$ brew services list
Name Status User Plist
redis error jeremyckahn /Users/jeremyckahn/Library/LaunchAgents/homebrew.mxcl.redis.plist
unbound stopped
Potentially related Github issues:
-
8062
-
8144
Comment From: yossigo
@jeremyckahn Not a macOS person but this line might indicate it is some security policy / local configuration issue on your system:
Termination Reason: Namespace CODESIGNING, Code 0x2
Comment From: jeremyckahn
@yossigo Thanks for the quick response and suggestion! That line also stood out to me. I looked in my system preferences and tried granting more access to Terminal:
I then reinstalled Redis, but the issue persisted. I'll keep digging into this, but I'd love to know what others think as well.
This issue is potentially related to the code signing issue: Homebrew/brew#9082
Comment From: jeremyckahn
Update: I was able to install and run Redis without Homebrew. After running brew uninstall redis, I followed the non-Homebrew install directions here: https://phoenixnap.com/kb/install-redis-on-mac
Specifically, I ran this:
mkdir redis && cd redis
curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
cd redis-stable
make
make test
sudo make install
And everything seems to work! This suggests that this may be a Homebrew issue, so I will file an issue against that project. Given this, would this be considered a Redis bug, or should this issue be closed?
Comment From: jeremyckahn
A fix has been identified by @dtrodrigues here: https://github.com/Homebrew/homebrew-core/issues/71667#issuecomment-782915318
The solution:
brew reinstall openssl@1.1
Closing this issue!