OS Version: CentOS Linux release 7.0.1406 (Core)Linux 
3.10.0-123.20.1.el7.x86_64 x86_64
redis_version:2.8.14Opensips Version: NOTICE:core:main: version: opensips 
1.11.3-notls (x86_64/linux) (cloned from GitHub 2015-02-02)
Description of Problem: Attempting to implement cachedb_redis key/value store. 
When Redis queries return NULL (no matching key in Redis) script runs fine, 
when a value is returned from Redis it causes a segmentation fault (output 
below). Able to reproduce using "cache_fetch" as well as "cache_raw_query." I 
am passing Redis an IP address as a key and originally thought the "." was 
causing the segfault, however, I used a substitution to replace "." with "_" 
and the segfault still occurs. Further testing showed that removing matching 
keys from Redis allowed the script to carry on which leads me to believe it is 
the return from Redis causing the seg fault and not the format of the key.
Relevant config lines:loadmodule "cachedb_redis.so"modparam("cachedb_redis", 
"cachedb_url","redis:group1://localhost:6379/")#...$avp(s_ip) = $si;
avp_subst("$avp(s_ip)/$avp(s_ip_format)","/\./_/g"); 
cache_fetch("redis:group1","$avp(s_ip_format)",$avp(host_type));#also 
tried:#cache_raw_query("redis:group1","HGET known_hosts 
$avp(s_ip_format)","$avp(host_type)");
Relevant log output:Feb  3 13:09:22 localhost /usr/local/sbin/opensips[12528]: 
NOTICE:cachedb_redis:destroy: destroy module cachedb_redis ...Feb  3 13:09:23 
localhost /usr/local/sbin/opensips[12489]: ERROR:core:cachedb_fetch: Wrong 
argument <local> - no cachedb system with this name registeredFeb  3 13:09:23 
localhost kernel: opensips[12489]: segfault at 0 ip           (null) sp 
00007fff5bc53678 error 14 in opensips[400000+1f1000]Feb  3 13:09:23 localhost 
/usr/local/sbin/opensips[12486]: INFO:core:handle_sigs: child process 12489 
exited by a signal 11Feb  3 13:09:23 localhost /usr/local/sbin/opensips[12486]: 
INFO:core:handle_sigs: core was generatedFeb  3 13:09:23 localhost 
/usr/local/sbin/opensips[12486]: INFO:core:handle_sigs: terminating due to 
SIGCHLD
Here is the monitor output from Redis (replaced the actually IP addresses being 
dipped). This shows that, prior to the segmentation fault Opensips properly 
queried Redis and received a NULL response (since 192.168.1.1 is not a valid 
key while 192.168.1.2 is) and the second query create the 
segfault:1422997762.024040 [0 127.0.0.1:54187] "GET" 
"192_168_1_1"1422997762.047668 [0 127.0.0.1:54189] "GET" "192_168_1_2"
Core Info (I may be doing this incorrectly):(gdb) bt full#0  0x0000000000000000 
in ?? ()No symbol table info available.#1  0x00007fc7423d4484 in ?? ()No symbol 
table info available.#2  0x00007fc743d57de8 in ?? ()No symbol table info 
available.#3  0x00000000004ecc44 in ?? ()No symbol table info available.#4  
0x0000000000000010 in ?? ()No symbol table info available.#5  
0xffff8000a43ac8f1 in ?? ()No symbol table info available.#6  
0x00007fc743d57de8 in ?? ()No symbol table info available.#7  
0x00007fc743d4d1ef in ?? ()No symbol table info available.#8  
0x00007fff5bc53760 in ?? ()No symbol table info available.#9  
0xcccccccccccccccd in ?? ()No symbol table info available.#10 
0x00007fc743d2e7f0 in ?? ()No symbol table info available.#11 
0x00000000004f21db in ?? ()No symbol table info available.#12 
0x00007fc743d4e1b8 in ?? ()No symbol table info available.#13 
0x0000000000000000 in ?? ()No symbol table info available.
Thanks!
 
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to