redis-cli unix socket - import rcmd failing

1

I am using redis server 3.0.6 on ubuntu 16.04 desktop. Installed using

apt-get install redis-server

It was working fine for a long time. Today, when I tried to import a rcmd file using unix socket in redis-cli I am getting out of memory error.

$ sudo redis-cli -s /run/redis/redis.sock  < a1.rcmd
Error: Out of memory

a1.rcmd contents:

SET Api:Server:Name "server1"

/etc/redis/redis.conf was confiured with /run/redis/redis.sock. All other configurations are default.

GET, SET commands with unix socket option are working fine.

If I run without unix socket, the redis-cli < a1.rcmd command is working fine.

What causes this error?

Will upgrade to latest version of redis resolve this? I dont see apt-get way to install latest redis version 5.

Any help would be really appreciated.

** EDIT **

Some more inputs and GDB logs.

$ which redis-server 
/usr/bin/redis-server


$ sudo service redis-server status
● redis-server.service - Advanced key-value store
   Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2018-12-17 11:29:14 EST; 16min ago
     Docs: http://redis.io/documentation,
           man:redis-server(1)
  Process: 8986 ExecStopPost=/bin/run-parts --verbose /etc/redis/redis-server.post-down.d (code=exited, status=0/SUCCESS)
  Process: 8981 ExecStop=/bin/kill -s TERM $MAINPID (code=exited, status=0/SUCCESS)
  Process: 8977 ExecStop=/bin/run-parts --verbose /etc/redis/redis-server.pre-down.d (code=exited, status=0/SUCCESS)
  Process: 9001 ExecStartPost=/bin/run-parts --verbose /etc/redis/redis-server.post-up.d (code=exited, status=0/SUCCESS)
  Process: 8997 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=0/SUCCESS)
  Process: 8992 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d (code=exited, status=0/SUCCESS)
 Main PID: 9000 (redis-server)
    Tasks: 3
   Memory: 884.0K
      CPU: 304ms
   CGroup: /system.slice/redis-server.service
           └─9000 /usr/bin/redis-server 127.0.0.1:637

$ sudo gdb /usr/bin/redis-server 9000
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/redis-server...(no debugging symbols found)...done.
Attaching to program: /usr/bin/redis-server, process 9000
[New LWP 9002]
[New LWP 9003]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fe8f5158a13 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
84  ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) continue
Continuing.


After this step I ran following command in another terminal:
$ sudo redis-cli -s /run/redis/redis.sock < a1.rcmd
Segmentation fault (core dumped)


(gdb) bt
#0  0x00007fe8f5158a13 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
#1  0x000055b238abe15f in aeProcessEvents ()
#2  0x000055b238abe58b in aeMain ()
#3  0x000055b238abd204 in main ()

(gdb) info registers
rax            0xfffffffffffffffc   -4
rbx            0x7fe8f48e5300   140638512108288
rcx            0x7fe8f5158a13   140638520969747
rdx            0x1060   4192
rsi            0x7fe8f4910000   140638512283648
rdi            0x3  3
rbp            0x7fe8f487b068   0x7fe8f487b068
rsp            0x7ffd9a5ca920   0x7ffd9a5ca920
r8             0x284    644
r9             0x284    644
r10            0x64 100
r11            0x293    659
r12            0x7ffd9a5caae8   140727193217768
r13            0x7fe8f480e1a0   140638511227296
r14            0x7fe8f48101f0   140638511235568
r15            0xfffffffe   4294967294
rip            0x7fe8f5158a13   0x7fe8f5158a13 <epoll_wait+51>
eflags         0x293    [ CF AF SF IF ]
cs             0x33 51
ss             0x2b 43
ds             0x0  0
es             0x0  0
fs             0x0  0
gs             0x0  0
(gdb) 
redis
ubuntu-16.04
unix-socket
redis-cli
asked on Stack Overflow Nov 29, 2018 by Muthukkumaran Ramalingam • edited Dec 17, 2018 by Muthukkumaran Ramalingam

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0