Hi Henning,
At first I want to thanks you for reading my post :)
Actually I tried to use DEBUG logs, but nothing .....
So I put an "abort()" :) into cxdx_send_sar, so I am able to track one
successful test case. Here is the backtrace:
#2 0x00007fcb469c12f7 in cxdx_send_sar (msg=0x7fcb4d66a968,
public_identity=..., private_identity=..., server_name=...,
assignment_type=1, data_available=0, transaction_data=0x7fcb3e455610)
at cxdx_sar.c:328
#3 0x00007fcb469c3815 in scscf_assign_server (msg=0x7fcb4d66a968,
public_identity=..., private_identity=...,
assignment_type=1, data_available=0, transaction_data=0x7fcb3e455610)
at server_assignment.c:88
#4 0x00007fcb469ba42f in save (msg=0x7fcb4d66a968, str1=0x7fcb3e423158
"X0B>\313\177",
route=0x7fcb4d6656e0 " 3]M\313\177") at save.c:1438
#5 0x00007fcb469cce2a in w_save (_m=0x7fcb4d66a968, _route=0x7fcb4d6656e0
" 3]M\313\177",
_d=0x7fcb3e423158 "X0B>\313\177", mode=0x7fcb4d66a968 "\001",
_cflags=0x0) at ims_registrar_scscf_mod.c:623
#6 0x000000000047c5c9 in do_action (h=0x7ffd2e6d7e50, a=0x7fcb4d5d2f80,
msg=0x7fcb4d66a968) at core/action.c:1085
#7 0x000000000048907a in run_actions (h=0x7ffd2e6d7e50, a=0x7fcb4d5d2be8,
msg=0x7fcb4d66a968) at core/action.c:1578
#8 0x000000000047c422 in do_action (h=0x7ffd2e6d7e50, a=0x7fcb4d5d4010,
msg=0x7fcb4d66a968) at core/action.c:1064
#9 0x000000000048907a in run_actions (h=0x7ffd2e6d7e50, a=0x7fcb4d5d4010,
msg=0x7fcb4d66a968) at core/action.c:1578
#10 0x000000000047c470 in do_action (h=0x7ffd2e6d7e50, a=0x7fcb4d5d4160,
msg=0x7fcb4d66a968) at core/action.c:1068
#11 0x000000000048907a in run_actions (h=0x7ffd2e6d7e50, a=0x7fcb4d5c4d00,
msg=0x7fcb4d66a968) at core/action.c:1578
#12 0x0000000000478ed9 in do_action (h=0x7ffd2e6d7e50, a=0x7fcb4d573058,
msg=0x7fcb4d66a968) at core/action.c:697
#13 0x000000000048907a in run_actions (h=0x7ffd2e6d7e50, a=0x7fcb4d573058,
msg=0x7fcb4d66a968) at core/action.c:1578
#14 0x000000000047c422 in do_action (h=0x7ffd2e6d7e50, a=0x7fcb4d5732f8,
msg=0x7fcb4d66a968) at core/action.c:1064
#15 0x000000000048907a in run_actions (h=0x7ffd2e6d7e50, a=0x7fcb4d571ea0,
msg=0x7fcb4d66a968) at core/action.c:1578
#16 0x0000000000489803 in run_top_route (a=0x7fcb4d571ea0,
msg=0x7fcb4d66a968, c=0x0) at core/action.c:1663
#17 0x00000000005b510e in receive_msg (
buf=0xa95500 <buf.6971> "REGISTER sip:
scscf.mnc001.mcc001.3gppnetwork.org:6060 SIP/2.0\r\nVia: SIP/2.0/UDP
10.82.10.145:4060;branch=z9hG4bKe025.079fd766789513e3068d0dce7e1853f3.0\r\nVia:
SIP/2.0/UDP 10.82.10.145;branch=z9hG4bKe02"...,
len=1085, rcv_info=0x7ffd2e6d8490) at core/receive.c:424
#18 0x00000000004bc624 in udp_rcv_loop () at core/udp_server.c:548
So w_save is called from pcscf_save("location") from
/usr/local/etc/kamailio/pcscf/route/register.cfg
and save("PRE_REG_SAR_REPLY","location") or
save("REG_SAR_REPLY","location");
from /usr/local/etc/kamailio/scscf/kamailio.cfg
So I put err log messages(err to be clearly visible ) and then using
"journal | grep "my string" -c I count how many times the SAR is triggered
Then I count how many SAR messages a sent and the numbers mismatch
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to issue #2346
#### Description
* non confirmed calls can't be terminated via dialog.terminate_dlg() API
* set call.max_amount to 0 to terminate the call if gets confirmed
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2347
-- Commit Summary --
* cnxcc: don't terminate non confirmed calls
-- File Changes --
M src/modules/cnxcc/cnxcc_mod.c (249)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2347.patchhttps://github.com/kamailio/kamailio/pull/2347.diff
--
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/pull/2347
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
<!-- - [ ] Related to issue # -->
#### Description
Still WIP
* use [PKG|SHM]_MEM_ERROR
* use memset and avoid initialization per field
* init variables
* add cnxcc to lgtm build
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2343
-- Commit Summary --
* cnxcc: minor changes
-- File Changes --
M .lgtm.yml (3)
M src/modules/cnxcc/cnxcc_mod.c (61)
M src/modules/cnxcc/cnxcc_redis.c (29)
M src/modules/cnxcc/cnxcc_rpc.c (30)
M src/modules/cnxcc/cnxcc_sip_msg_faker.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2343.patchhttps://github.com/kamailio/kamailio/pull/2343.diff
--
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/pull/2343
Hi All,
I am experimenting with Kamailio 5.3.3 as an IMS and I am trying to do load
tests
I am using SIPp to generate SIP.REGISTER and MariaDB and a DIAMETER tool (
seagull)
For now I achieved registrations with "speed" 200 per/sec.
When I send SIP.REGISTER faster(let's say 500 per/sec) I see some SARs
missing, not sent at all.
I start debugging and found that cxdx_send_sar is responsible to creating
SAR message. I put my debug message in it.
The strange thing: there is a mismatch of my debug message (cxdx_send_sar
invocation) and real SAR send over the network.
What is the thing I missing ?
Is there anything else responsible for SAR creating except cxdx_send_sar ?
Did someone made similar tests ?
my test machine is Centos 7 with 3.10.0
Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
16G RAM
During this tests I see kamailio very low CPU usage, even when I push it
with 500/sec
The biggest CPU load is in MariaDB, but I do not have issues with UAR and
MAR
**ld_fld.c:273** implicit-function-declaration
```
CC (gcc) [M db2_ldap.so] db2_ldap_mod.o
CC (gcc) [M db2_ldap.so] ld_cfg.o
CC (gcc) [M db2_ldap.so] ld_cmd.o
CC (gcc) [M db2_ldap.so] ld_con.o
CC (gcc) [M db2_ldap.so] ld_fld.o
ld_fld.c: In function 'ldap_gentime2db_datetime':
ld_fld.c:273:10: warning: implicit declaration of function 'timelocal' [-Wimplicit-function-declaration]
273 | *dst = timelocal(&time);
| ^~~~~~~~~
CC (gcc) [M db2_ldap.so] ld_res.o
CC (gcc) [M db2_ldap.so] ld_uri.o
make[3]: 'libsrdb2.so.1.0' is up to date.
```
**redis_table.c:586** maybe-uninitialized
```
CC (gcc) [M db_redis.so] db_redis_mod.o
CC (gcc) [M db_redis.so] redis_connection.o
CC (gcc) [M db_redis.so] redis_dbase.o
CC (gcc) [M db_redis.so] redis_table.o
redis_table.c: In function 'db_redis_parse_keys':
redis_table.c:586:38: warning: 'table' may be used uninitialized in this function [-Wmaybe-uninitialized]
586 | table->types = type_target = type;
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
make[3]: 'libsrdb2.so.1.0' is up to date.
make[3]: 'libsrdb1.so.1.0' is up to date.
LD (gcc) [M db_redis.so] db_redis.so
```
**app_python** strict-aliasing
```
CC (gcc) [M app_python.so] app_python_mod.o
CC (gcc) [M app_python.so] apy_kemi.o
In file included from /usr/include/python2.7/Python.h:83,
from apy_kemi.c:25:
apy_kemi.c: In function 'sr_kemi_apy_return_true':
/usr/include/python2.7/object.h:769:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
769 | ((PyObject*)(op))->ob_refcnt++)
| ~^~~~~~~~~~~~~~~~
apy_kemi.c:121:2: note: in expansion of macro 'Py_INCREF'
121 | Py_INCREF(Py_True);
| ^~~~~~~~~
apy_kemi.c: In function 'sr_kemi_apy_return_false':
/usr/include/python2.7/object.h:769:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
769 | ((PyObject*)(op))->ob_refcnt++)
| ~^~~~~~~~~~~~~~~~
apy_kemi.c:130:2: note: in expansion of macro 'Py_INCREF'
130 | Py_INCREF(Py_False);
| ^~~~~~~~~
CC (gcc) [M app_python.so] apy_kemi_export.o
CC (gcc) [M app_python.so] mod_Core.o
```
**pdb.c:348** address-of-packed-member]
```
LD (gcc) [M p_usrloc.so] p_usrloc.so
CC (gcc) [M path.so] path.o
CC (gcc) [M path.so] path_mod.o
LD (gcc) [M path.so] path.so
CC (gcc) [M pdb.so] pdb.o
pdb.c: In function 'pdb_query':
pdb.c:348:60: warning: taking address of packed member of 'struct pdb_msg' may result in an unaligned pointer value [-Waddress-of-packed-member]
348 | _id = (short int *)&(msg.bdy.payload[reqlen]); /* make gcc happy */
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
LD (gcc) [M pdb.so] pdb.so
CC (gcc) [M pdt.so] pdt.o
CC (gcc) [M pdt.so] pdtree.o
make[3]: 'libsrdb1.so.1.0' is up to date.
```
--
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/2298
Module: kamailio
Branch: master
Commit: 4deb51419ab66931459709fe44acd3e7a0acc18d
URL: https://github.com/kamailio/kamailio/commit/4deb51419ab66931459709fe44acd3e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-06-03T12:45:05+02:00
core: tcp - log details of the exiting tcp connection on insert failure
---
Modified: src/core/tcp_read.c
---
Diff: https://github.com/kamailio/kamailio/commit/4deb51419ab66931459709fe44acd3e…
Patch: https://github.com/kamailio/kamailio/commit/4deb51419ab66931459709fe44acd3e…
---
diff --git a/src/core/tcp_read.c b/src/core/tcp_read.c
index 8147951b21..db6e8b923a 100644
--- a/src/core/tcp_read.c
+++ b/src/core/tcp_read.c
@@ -1720,7 +1720,7 @@ static ticks_t tcpconn_read_timeout(ticks_t t, struct timer_ln* tl, void* data)
* idx - index in the fd_array (or -1 if not known)
* return: -1 on error, or when we are not interested any more on reads
* from this fd (e.g.: we are closing it )
- * 0 on EAGAIN or when by some other way it is known that no more
+ * 0 on EAGAIN or when by some other way it is known that no more
* io events are queued on the fd (the receive buffer is empty).
* Usefull to detect when there are no more io events queued for
* sigio_rt, epoll_et, kqueue.
@@ -1728,7 +1728,7 @@ static ticks_t tcpconn_read_timeout(ticks_t t, struct timer_ln* tl, void* data)
* queued -- the receive buffer might still be non-empty)
*/
inline static int handle_io(struct fd_map* fm, short events, int idx)
-{
+{
int ret;
int n;
int read_flags;
@@ -1736,10 +1736,11 @@ inline static int handle_io(struct fd_map* fm, short events, int idx)
int s;
long resp;
ticks_t t;
-
+ fd_map_t *ee = NULL;
+
/* update the local config */
cfg_update();
-
+
switch(fm->type){
case F_TCPMAIN:
again:
@@ -1803,7 +1804,7 @@ inline static int handle_io(struct fd_map* fm, short events, int idx)
if (unlikely(read_flags & RD_CONN_REPEAT_READ))
goto repeat_1st_read;
#endif /* USE_TLS */
-
+
/* must be before io_watch_add, io_watch_add might catch some
* already existing events => might call handle_io and
* handle_io might decide to del. the new connection =>
@@ -1816,13 +1817,25 @@ inline static int handle_io(struct fd_map* fm, short events, int idx)
local_timer_reinit(&con->timer);
local_timer_add(&tcp_reader_ltimer, &con->timer,
S_TO_TICKS(TCP_CHILD_TIMEOUT), t);
- if (unlikely(io_watch_add(&io_w, s, POLLIN, F_TCPCONN, con)<0)){
+ if (unlikely(io_watch_add(&io_w, s, POLLIN, F_TCPCONN, con)<0)) {
LM_CRIT("io_watch_add failed for %p id %d fd %d, state %d, flags %x,"
" main fd %d, refcnt %d ([%s]:%u -> [%s]:%u)\n",
con, con->id, con->fd, con->state, con->flags,
con->s, atomic_get(&con->refcnt),
ip_addr2a(&con->rcv.src_ip), con->rcv.src_port,
ip_addr2a(&con->rcv.dst_ip), con->rcv.dst_port);
+ ee = get_fd_map(&io_w, s);
+ if(ee!=0 && ee->type==F_TCPCONN) {
+ tcp_connection_t *ec;
+ ec = (tcp_connection_t*)ee->data;
+ LM_CRIT("existing tcp con %p id %d fd %d, state %d, flags %x,"
+ " main fd %d, refcnt %d ([%s]:%u -> [%s]:%u)\n",
+ ec, ec->id, ec->fd, ec->state, ec->flags,
+ ec->s, atomic_get(&ec->refcnt),
+ ip_addr2a(&ec->rcv.src_ip), ec->rcv.src_port,
+ ip_addr2a(&ec->rcv.dst_ip), ec->rcv.dst_port);
+
+ }
tcpconn_listrm(tcp_conn_lst, con, c_next, c_prev);
local_timer_del(&tcp_reader_ltimer, &con->timer);
goto con_error;