Module: kamailio
Branch: master
Commit: 90bcc49a7ec4e1c44ac94fd814d4ef41e79cb4f7
URL: https://github.com/kamailio/kamailio/commit/90bcc49a7ec4e1c44ac94fd814d4ef4…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2019-03-01T15:46:42+01:00
modules: readme files regenerated - dialplan ... [skip ci]
---
Modified: src/modules/dialplan/README
---
Diff: https://github.com/kamailio/kamailio/commit/90bcc49a7ec4e1c44ac94fd814d4ef4…
Patch: https://github.com/kamailio/kamailio/commit/90bcc49a7ec4e1c44ac94fd814d4ef4…
---
diff --git a/src/modules/dialplan/README b/src/modules/dialplan/README
index a63e4bfc7c..c5bdaea8eb 100644
--- a/src/modules/dialplan/README
+++ b/src/modules/dialplan/README
@@ -506,7 +506,8 @@ xlog("translated to var $var(y) \n");
6.4. dp_reload()
- Forces an update of the translation rules from the database.
+ Reload the translation rules from the database. Note that there is a
+ rate limiting of maximum one reload in five seconds.
Name: dp_reload
Module: kamailio
Branch: master
Commit: 34f928427ecf315f638cd59fa512d59f4c64f22e
URL: https://github.com/kamailio/kamailio/commit/34f928427ecf315f638cd59fa512d59…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-03-01T15:43:16+01:00
dialplan: docs - note about limiting to max 1 rpc reload in 5 seconds
---
Modified: src/modules/dialplan/doc/dialplan_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/34f928427ecf315f638cd59fa512d59…
Patch: https://github.com/kamailio/kamailio/commit/34f928427ecf315f638cd59fa512d59…
---
diff --git a/src/modules/dialplan/doc/dialplan_admin.xml b/src/modules/dialplan/doc/dialplan_admin.xml
index ed8bad4fae..371120fac4 100644
--- a/src/modules/dialplan/doc/dialplan_admin.xml
+++ b/src/modules/dialplan/doc/dialplan_admin.xml
@@ -620,7 +620,8 @@ xlog("translated to var $var(y) \n");
<function moreinfo="none">dp_reload()</function>
</title>
<para>
- Forces an update of the translation rules from the database.
+ Reload the translation rules from the database. Note that there is
+ a rate limiting of maximum one reload in five seconds.
</para>
<para>
Name: <emphasis>dp_reload</emphasis>
#### Reproduction
run this script simultaneously (from two console for example)
```
#!/usr/bin/perl
$cmd = q(curl -X GET -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "dialplan.reload", "params":[], "id": 1 }' http://IP:PORT/jsonrpc/);
for ($i=0; $i<1000; $i++){
`$cmd`;
}
```
#### Debugging Data
```
Program terminated with signal 11, Segmentation fault.
#0 0x00007ffaa39e95f7 in add_rule2hash (rule=0x7ffa9fa05248, h_index=1) at dp_db.c:563
/home/snen/KamailioGitMyFork/src/modules/dialplan/dp_db.c:563:12474:beg:0x7ffaa39e95f7
(gdb) bt
#0 0x00007ffaa39e95f7 in add_rule2hash (rule=0x7ffa9fa05248, h_index=1) at dp_db.c:563
#1 0x00007ffaa39e4831 in dp_load_db () at dp_db.c:305
#2 0x00007ffaa39ce914 in dialplan_rpc_reload (rpc=0x7ffa9f382a80 <func_param>, ctx=0x7ffa9f3829a0 <_jsonrpc_ctx_global>) at dialplan.c:610
#3 0x00007ffa9f16398f in jsonrpc_dispatch (msg=0x7ffd427ad880, s1=0x0, s2=0x0) at jsonrpcs_mod.c:1294
#4 0x0000000000461a5f in do_action (h=0x7ffd427ad7a0, a=0x7ffaa72987d8, msg=0x7ffd427ad880) at core/action.c:1067
#5 0x000000000046e23e in run_actions (h=0x7ffd427ad7a0, a=0x7ffaa72987d8, msg=0x7ffd427ad880) at core/action.c:1564
#6 0x00000000004619ce in do_action (h=0x7ffd427ad7a0, a=0x7ffaa729b140, msg=0x7ffd427ad880) at core/action.c:1058
#7 0x000000000046e23e in run_actions (h=0x7ffd427ad7a0, a=0x7ffaa729b140, msg=0x7ffd427ad880) at core/action.c:1564
#8 0x00007ffa9f38868c in xhttp_process_request (orig_msg=0x7ffaa72a6ed0,
new_buf=0x7ffaa72c4420 "GET /jsonrpc/ HTTP/1.1\r\nVia: SIP/2.0/TCP 192.168.10.190:48542\r\nUser-Agent: curl/7.29.0\r\nHost: 192.168.10.190:5071\r\nAccept: */*\r\nContent-Type: application/json\r\nContent-Length: 71\r\n\r\n{\"jsonrpc\": \"2.0\","..., new_len=253) at xhttp_mod.c:296
#9 0x00007ffa9f389dcf in xhttp_handler (msg=0x7ffaa72a6ed0) at xhttp_mod.c:383
#10 0x00000000004ff30c in nonsip_msg_run_hooks (msg=0x7ffaa72a6ed0) at core/nonsip_hooks.c:112
#11 0x000000000057b373 in receive_msg (
buf=0x7ffaa02ec618 "GET /jsonrpc/ HTTP/1.1\r\nUser-Agent: curl/7.29.0\r\nHost: 192.168.10.190:5071\r\nAccept: */*\r\nContent-Type: application/json\r\nContent-Length: 71\r\n\r\n{\"jsonrpc\": \"2.0\", \"method\": \"dialplan.reload\", \"params\":"..., len=214, rcv_info=0x7ffaa02ec338) at core/receive.c:270
#12 0x0000000000635eb5 in receive_tcp_msg (
tcpbuf=0x7ffaa02ec618 "GET /jsonrpc/ HTTP/1.1\r\nUser-Agent: curl/7.29.0\r\nHost: 192.168.10.190:5071\r\nAccept: */*\r\nContent-Type: application/json\r\nContent-Length: 71\r\n\r\n{\"jsonrpc\": \"2.0\", \"method\": \"dialplan.reload\", \"params\":"..., len=214, rcv_info=0x7ffaa02ec338, con=0x7ffaa02ec320) at core/tcp_read.c:1399
#13 0x0000000000638372 in tcp_read_req (con=0x7ffaa02ec320, bytes_read=0x7ffd427ae65c, read_flags=0x7ffd427ae658) at core/tcp_read.c:1631
#14 0x000000000063b115 in handle_io (fm=0x7ffaa7302d78, events=1, idx=-1) at core/tcp_read.c:1804
#15 0x00000000006299b6 in io_wait_loop_epoll (h=0xae9060 <io_w>, t=2, repeat=0) at core/io_wait.h:1062
#16 0x000000000063d172 in tcp_receive_loop (unix_sock=16) at core/tcp_read.c:1974
#17 0x00000000004dcaf9 in tcp_init_children () at core/tcp_main.c:5086
#18 0x00000000004266c4 in main_loop () at main.c:1750
#19 0x000000000042d14b in main (argc=13, argv=0x7ffd427aedc8) at main.c:2737
(gdb) l
558 new_id = 0;
559
560 /*search for the corresponding dpl_id*/
561 for(crt_idp = last_idp =rules_hash[h_index]; crt_idp!= NULL;
562 last_idp = crt_idp, crt_idp = crt_idp->next)
563 if(crt_idp->dp_id == rule->dpid)
564 break;
565
566 /*didn't find a dpl_id*/
567 if(!crt_idp){
(gdb) p crt_idp->dp_id
Cannot access memory at address 0x7ffa9f002429
(gdb)
```
### Additional Information
```
kamailio 5.3.0-dev3 (x86_64/linux) d726bd
```
--
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/1874