[sr-dev] [kamailio/kamailio] Kamailio 5.0.3 segfault (in redis module?) (#1342)

Sebastian Damm notifications at github.com
Wed Nov 29 09:58:55 CET 2017


This is the output:

```
(gdb) frame 4
#4  0x00007ff057a4d6ac in redisc_exec (srv=0x7ffd7df680d0, res=0x7ffd7df680f0, cmd=0x7ffd7df680e0) at redis_client.c:402
402	redis_client.c: No such file or directory.
(gdb) list
397	in redis_client.c
(gdb) p cmd
$1 = (str *) 0x7ffd7df680e0
(gdb) p *cmd
$2 = {s = 0x7ff05d2a00a0 "SETEX ACTIVECHANNELS_swp3pvm7jqpnu6ixphj1jc7c24 at sipgate.de 21600 \n%swp3pvm7jqpnu6ixphj1jc7c24 at sipgate.de\022\n1234567e16\032\n4912345678\"%swp3pvm7jqpnu6ixphj1jc7c24 at sipgate.de", len = 167}
(gdb) p cmd->s
$3 = 0x7ff05d2a00a0 "SETEX ACTIVECHANNELS_swp3pvm7jqpnu6ixphj1jc7c24 at sipgate.de 21600 \n%swp3pvm7jqpnu6ixphj1jc7c24 at sipgate.de\022\n1234567e16\032\n4912345678\"%swp3pvm7jqpnu6ixphj1jc7c24 at sipgate.de"
```

This is how we call `redis_cmd`:
```
   if ($vn(variable1) == "ADD" && $vn(variable2) != $null) {
           if (!redis_cmd("liRedis", "SETEX ACTIVECHANNELS_$ci 21600 $vn(variable2)", "r")) {
                   xlog("L_ERR", "redis SET of ACTIVECHANNELS_$ci failed");
           }
           redis_free("r");
   } else {
           if (!redis_cmd("liRedis", "DEL ACTIVECHANNELS_$ci", "r")) {
                   xlog("L_ERR", "redis DEL of ACTIVECHANNELS_$ci failed");
           }
           redis_free("r");
   }
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1342#issuecomment-347794449
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20171129/b1817c57/attachment-0001.html>


More information about the sr-dev mailing list