dragonflydb / dragonfly

A modern replacement for Redis and Memcached
https://www.dragonflydb.io/
Other
25.79k stars 950 forks source link

Debian Install Fails: trap invalid opcode ip:564902a7cbc8 sp:7ffce9909b80 error:0 #1410

Closed dgaastra closed 1 year ago

dgaastra commented 1 year ago

Describe the bug Debian Install Fails: trap invalid opcode ip:564902a7cbc8 sp:7ffce9909b80 error:0

To Reproduce Steps to reproduce the behavior: [cat /etc/debian_version -> 11.7]

   cd /tmp
    wget https://dragonflydb.gateway.scarf.sh/1.3.0/dragonfly_amd64.deb
    sudo dpkg -i dragonfly_amd64.deb

Expected behavior DragonFlyDB to launch successfully.

Screenshots

sudo systemctl status redis
● dragonfly.service - Modern and fast key-value store
     Loaded: loaded (/lib/systemd/system/dragonfly.service; enabled; vendor preset: enabled)
     Active: failed (Result: signal) since Wed 2023-06-14 13:58:43 CEST; 47s ago
    Process: 128493 ExecStart=/usr/bin/dragonfly --flagfile=/etc/dragonfly/dragonfly.conf (code=killed, signal=ILL)
   Main PID: 128493 (code=killed, signal=ILL)
        CPU: 54ms

Jun 14 13:58:43 webbu systemd[1]: dragonfly.service: Scheduled restart job, restart counter is at 5.
Jun 14 13:58:43 webbu systemd[1]: Stopped Modern and fast key-value store.
Jun 14 13:58:43 webbu systemd[1]: dragonfly.service: Start request repeated too quickly.
Jun 14 13:58:43 webbu systemd[1]: dragonfly.service: Failed with result 'signal'.
Jun 14 13:58:43 webbu systemd[1]: Failed to start Modern and fast key-value store.
sudo journalctl -xe
░░ The unit dragonfly.service has entered the 'failed' state with result 'signal'.
Jun 14 14:06:13 webbu kernel: traps: dragonfly[128636] trap invalid opcode ip:564902a7cbc8 sp:7ffce9909b80 error:0 in dragonfly[5649027d4000+5cf000]
Jun 14 14:06:13 webbu systemd[1]: dragonfly.service: Scheduled restart job, restart counter is at 5.

**Environment (please complete the following information):**
Debian 11.7 - with Redis installed and stopped

Additional context There are no instructions to be found for - could you please provide those: [1] How to install DragonFlyDB on Debian as a service - So just performed the standard dpkg installation [2] How to run DragonFlyDB as a unix socket?

Thanks so kindly Dennis

chakaz commented 1 year ago

Hi @dgaastra Can you please paste here the output of simply running

/usr/bin/dragonfly --alsologtostderr

Let's see if it gives us some more info

dgaastra commented 1 year ago
sudo /usr/bin/dragonfly --alsologtostderr
*** SIGILL received at time=1686745662 on cpu 1 ***
PC: @     0x55d7e6549bc8  (unknown)  (unknown)
chakaz commented 1 year ago

Gotcha, that's not adding much :)

Can you also please paste the outputs of cat /proc/cpuinfo and uname -a?

dgaastra commented 1 year ago
cat /proc/cpuinfo
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 95
model name  : Intel(R) Atom(TM) CPU C3558 @ 2.20GHz
stepping    : 1
microcode   : 0x38
cpu MHz     : 2199.999
cache size  : 2048 KB
physical id : 0
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 21
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand hypervisor lahf_lm 3dnowprefetch ssbd ibrs ibpb stibp fsgsbase tsc_adjust smep rdseed smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves arat md_clear arch_capabilities
bugs        : spectre_v1 spectre_v2 spec_store_bypass
bogomips    : 4399.99
clflush size    : 64
cache_alignment : 64
address sizes   : 45 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model       : 95
model name  : Intel(R) Atom(TM) CPU C3558 @ 2.20GHz
stepping    : 1
microcode   : 0x38
cpu MHz     : 2199.999
cache size  : 2048 KB
physical id : 2
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 2
initial apicid  : 2
fpu     : yes
fpu_exception   : yes
cpuid level : 21
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand hypervisor lahf_lm 3dnowprefetch ssbd ibrs ibpb stibp fsgsbase tsc_adjust smep rdseed smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves arat md_clear arch_capabilities
bugs        : spectre_v1 spectre_v2 spec_store_bypass
bogomips    : 4399.99
clflush size    : 64
cache_alignment : 64
address sizes   : 45 bits physical, 48 bits virtual
power management:

uname -a
Linux webbu 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux
chakaz commented 1 year ago

It might be that because your CPU does not support avx/avx2 you can't run Dragonfly. You could try to build it locally without avx (via cmake ENABLE_AVX=OFF), although I've never tried it myself, so it might not be a smooth path.

romange commented 1 year ago

@chakaz - it's not just AVX, Dragonfly requires at least sandybridge processor architecture for x86_64

dgaastra commented 1 year ago

Yes; I can confirm that moving the VM to a "Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz" made it work. Now my question is how to setup a unix socket with DragonFlyDB, like: unixsocket /var/run/redis/redis-server.sock unixsocketperm 766