[sr-dev] [kamailio/kamailio] Kamailio 5.8 core dumps with regex module (Issue #3812)

2024-04-11 Thread Odorik.cz via sr-dev


### Description
I tried to update to a new version of kamailio and it didn't start with the old 
configuration file, I found out that the regex module is responsible.
Log after start:
` 0(713737) INFO: regex [regex_mod.c:417]: load_pcres(): num groups = 1
 0(713737) INFO: regex [regex_mod.c:419]: load_pcres(): 
((^[1-9]\d{5}$)|(^ukrb[12]$))  (size = 29)
 0(713735) ERROR:  [core/daemonize.c:302]: daemonize(): Main process 
exited before writing to pipe`


### Troubleshooting

 Reproduction



grep regex /usr/local/etc/kamailio/kamailio.cfg
loadmodule "regex.so"
modparam("regex", "file", "/usr/local/etc/kamailio/regex_groups")

cat /usr/local/etc/kamailio/regex_groups
[0]
#cislo linky
(^[1-9]\d{5}$)
(^ukrb[12]$)

 Debugging Data



```
 gdb /usr/local/sbin/kamailio /core
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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:
.
Find the GDB manual and other documentation resources online at:
.
  
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/sbin/kamailio...
  
warning: Can't open file /dev/zero (deleted) during file-backed mapping note 
processing
[New LWP 713740]
  
warning: Section `.reg-xstate/713740' in core file too small.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/local/sbin/kamailio -S -P 
/run/kamailio/kamailio.pid -f /usr/local/etc/kam'.
Program terminated with signal SIGSEGV, Segmentation fault.
  
warning: Section `.reg-xstate/713740' in core file too small.
#0  load_pcres (action=0) at regex_mod.c:466
466 *pcres = *pcres_tmp;
(gdb) bt full
#0  load_pcres (action=0) at regex_mod.c:466
i = 1
j = 32
f = 0x55c5775ea6b0
line = '\000' 
patterns = 0x7f7e7ad3a230
pcre_error_num = 100
pcre_error = '\000' , 
"\277Fou\305U\000\000\000\000\000\000m\000\000\000(Hou\305U\000\000\332Gou\305U\000\000\220\000\000\000\000\000\000\000\020\240\303z~\177\000\000
 
\274$u\305U\000\000\037\000\000\000\004\000\000\000\001\000\000\000%\000\000\000\n\344\n\000\000\000\000\000
 
\274$u\305U\000\000\000\000\000\000\000\000\000\000\n\344\n\000\000\000\000\000\360\212\355\255\374\177\000"
pcre_erroffset = 0
num_pcres_tmp = 1
pcres_tmp = 0x7f7e7ad62c00
llen = 19
__func__ = "load_pcres"
#1  0x7f7e79f62c92 in mod_init () at regex_mod.c:245
__func__ = "mod_init"
#2  0x55c5754a99f7 in init_mod (m=0x7f7e7adeb1f0) at core/sr_module.c:1036
ret = -2097389668
__func__ = "init_mod"
#3  0x55c5754a9687 in init_mod (m=0x7f7e7adeb6c0) at core/sr_module.c:1031
ret = 0
__func__ = "init_mod"
#4  0x55c5754a9687 in init_mod (m=0x7f7e7adebda0) at core/sr_module.c:1031
ret = -2097386271
__func__ = "init_mod"
#5  0x55c5754a9687 in init_mod (m=0x7f7e7adec3b0) at core/sr_module.c:1031
ret = 0
__func__ = "init_mod"
#6  0x55c5754a9687 in init_mod (m=0x7f7e7adec910) at core/sr_module.c:1031
ret = -1376937648
__func__ = "init_mod"
#7  0x55c5754a9687 in init_mod (m=0x7f7e7adece70) at core/sr_module.c:1031
ret = 0
__func__ = "init_mod"
#8  0x55c5754a9687 in init_mod (m=0x7f7e7aded520) at core/sr_module.c:1031
ret = 0
__func__ = "init_mod"
#9  0x55c5754a9687 in init_mod (m=0x7f7e7adedc10) at core/sr_module.c:1031
ret = 0
__func__ = "init_mod"
#10 0x55c5754a9687 in init_mod (m=0x7f7e7adee1f0) at core/sr_module.c:1031
ret = -1376937902
__func__ = "init_mod"
#11 0x55c5754a9687 in init_mod (m=0x7f7e7adeeaf0) at core/sr_module.c:1031
ret = 0
__func__ = "init_mod"
#12 0x55c5754a9687 in init_mod (m=0x7f7e7adef4d0) at core/sr_module.c:1031
ret = 16
__func__ = "init_mod"
#13 0x55c5754a9687 in init_mod (m=0x7f7e7adef8e0) at core/sr_module.c:1031
ret = 0
__func__ = "init_mod"
#14 0x55c5754a9687 in init_mod (m=0x7f7e7adefdd0) at core/sr_module.c:1031
ret = 0
__func__ = "init_mod"
#15 0x55c5754a9687 in init_mod (m=0x7f7e7adf3320) at core/sr_module.c:1031
ret = 2053729903
__func__ = "init_mod"
#16 0x55c5754a9687 in init_mod (m=0x7f7e7adf3770) at core/sr_module.c:1031
ret = -1
__func__ = "init_mod"
#17 0x55c5754a9687 in init_mod 

[sr-dev] Re: [kamailio/kamailio] tcp/docs: Added tcp_accept_iplimit config sample (PR #3792)

2024-04-11 Thread Daniel-Constantin Mierla via sr-dev
Fine for me to add it to the default config file `etc/kamailio.cfg`, but the 
commit message should be updated to reflect that, not the prefix `tcp/docs:` is 
not suggesting at all it is about `etc/kamailio.cfg`.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3792#issuecomment-2049694470
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] pike: fix documentation for reqs_density_per_unit (PR #3806)

2024-04-11 Thread Daniel-Constantin Mierla via sr-dev
Then I guess this can be closed without merging, right?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3806#issuecomment-2049691316
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] cfgutils lock (PR #3808)

2024-04-11 Thread Daniel-Constantin Mierla via sr-dev
I have nothing explicitly against this enhancement, but I guess that if one 
wanted to have two strings to compose the lock key,  then could use 
`lock("$var(str1)$var(str2)")` as alternative to new variant 
`lock("$var(str1)", "$var(str2)")`. The hashing behind is probably not the same 
result, but from the perspective of taking in consideration two strings for 
hashing, should be a similar behaviour.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3808#issuecomment-2049690308
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] core/tcp_main: Match protocol when lookup tcp/tls connections (PR #3810)

2024-04-11 Thread Daniel-Constantin Mierla via sr-dev
It can be merged from my point of view, although I am not the main developer of 
tcp/tls code in Kamailio, I guess it was considered that remote ip/port is 
enough, considering that tls is over a tcp connection, so it cannot overlap, 
but when listening on different sockets, it could be a conflict.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3810#issuecomment-2049680678
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Chaining Transformations {uri.param,received}{uri.host} does not work for IPv6 (Issue #3794)

2024-04-11 Thread Christian Berger via sr-dev

Ahh, that makes sense. That's probably it.

Am 11.04.24 um 14:55 schrieb Xenofon Karamanos via sr-dev:

@ChristianBergerSipgate 

Can you confrim that your $du contains a valid sip message? is it 
manually constructed or otherwise created? it seems to have a missing 
|:| in the |received| param.


|du=sip:1.2.4.129;lr;received=sip[2001:db8:0123:4567:89ab:cdef:dead:beef]:1234|
should be
|du=sip:1.2.4.129;lr;received=**sip:**[2001:db8:0123:4567:89ab:cdef:dead:beef]:1234|

—
Reply to this email directly, view it on GitHub 
, or unsubscribe .
You are receiving this because you are subscribed to this thread.Message 
ID: 



___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


--

Christian Berger - ber...@sipgate.de
Telefon: +49 (0)211-63 55 55-0
Telefax: +49 (0)211-63 55 55-22

sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391

www.sipgate.de - www.sipgate.co.uk
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Chaining Transformations {uri.param,received}{uri.host} does not work for IPv6 (Issue #3794)

2024-04-11 Thread Xenofon Karamanos via sr-dev
@ChristianBergerSipgate 

Can you confrim that your $du contains a valid sip message? is it manually 
constructed or otherwise created? it seems to have a missing `:` in the  
`received` param.

`du=sip:1.2.4.129;lr;received=sip[2001:db8:0123:4567:89ab:cdef:dead:beef]:1234`
should be 
`du=sip:1.2.4.129;lr;received=**sip:**[2001:db8:0123:4567:89ab:cdef:dead:beef]:1234`

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3794#issuecomment-2049632256
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] corex.list_sockets broken output (Issue #3799)

2024-04-11 Thread sergey-safarov via sr-dev
yes, works for me.
Closing.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3799#issuecomment-2049617430
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] corex.list_sockets broken output (Issue #3799)

2024-04-11 Thread sergey-safarov via sr-dev
Closed #3799 as completed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3799#event-12436049249
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] corex: Fix unknown af in list_sockets rpc call (PR #3811)

2024-04-11 Thread Xenofon Karamanos via sr-dev
Merged #3811 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3811#event-12434963200
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] corex.list_sockets broken output (Issue #3799)

2024-04-11 Thread Xenofon Karamanos via sr-dev
@sergey-safarov  

A change was pushed in https://github.com/kamailio/kamailio/pull/3811. can you 
confirm also that it works?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3799#issuecomment-2049429419
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] [kamailio/kamailio] corex: Fix unknown af in list_sockets rpc call (PR #3811)

2024-04-11 Thread Xenofon Karamanos via sr-dev
!-- Kamailio Pull Request Template --

!--
IMPORTANT:
  - for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
  - pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
  - backports to stable branches must be done with git cherry-pick -x 
...
  - code is contributed under BSD for core and main components (tm, sl, auth, 
tls)
  - code is contributed GPLv2 or a compatible license for the other components
  - GPL code is contributed with OpenSSL licensing exception
--

 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 youre unsure about any of these, dont 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 #3799 

 Description
!-- Describe your changes in detail --
This PR fixes the unknown address family when calling `corex.list_sockets` rpc 
call by providing the correct argument (address.af) to `get_af_name()` instead 
of proto.
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/3811

-- Commit Summary --

  * corex: Fix unknown af in list_sockets

-- File Changes --

M src/modules/corex/corex_rpc.c (4)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/3811.patch
https://github.com/kamailio/kamailio/pull/3811.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3811
You are receiving this because you are subscribed to this thread.

Message ID: kamailio/kamailio/pull/3...@github.com
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] PKG Memory Leak with RTPEngine Module with WebSocket (Issue #3777)

2024-04-11 Thread Henning Westerholt via sr-dev
@vijaykumar-exotel Thanks for the confirmation, do you could also paste the 
updated log messages here?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3777#issuecomment-2049373279
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] tcp/docs: Added tcp_accept_iplimit config sample (PR #3792)

2024-04-11 Thread Henning Westerholt via sr-dev
Looks good to me, its also just a comment in the end. Lets wait a bit more for 
feedback and then merge it.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3792#issuecomment-2049370698
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Less predictive algorithm for carrierroute hashing (Issue #3786)

2024-04-11 Thread Henning Westerholt via sr-dev
The hashing algorithm could be changed, sure. There are some internal hashing 
algorithms available (e.g. MD5) in the Kamailio core, there is of course also 
the possibility to use OpenSSL, but we might not want to introduce this 
depencency for that module.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3786#issuecomment-2049313684
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Segfault in pua_dialoginfo.c when starting up with a dialog in the database (Issue #3743)

2024-04-11 Thread Henning Westerholt via sr-dev
Thanks for providing the additional information. Does it crash only with the DB 
entry listed from above? If not, maybe you can provide the DB dump somewhere 
for download (sensitive data removed of course)?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3743#issuecomment-2049304633
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] db_mysql: failed build on CentOS 7 (Issue #3809)

2024-04-11 Thread sergey-safarov via sr-dev
How about this change
```diff
diff --git a/src/modules/db_mysql/km_my_con.c b/src/modules/db_mysql/km_my_con.c
index 4c756db..bab3e44 100644
--- a/src/modules/db_mysql/km_my_con.c
+++ b/src/modules/db_mysql/km_my_con.c
@@ -178,9 +178,16 @@ struct my_con *db_mysql_new_connection(const struct db_id 
*id)
}
 #endif /* MYSQL_VERSION_ID */
 #endif /* MARIADB_BASE_VERSION */
+
+#ifdef MYSQL_OPT_SSL_CA
if(db_mysql_opt_ssl_ca)
mysql_options(
ptr->con, MYSQL_OPT_SSL_CA, (const void 
*)db_mysql_opt_ssl_ca);
+#else
+   LM_WARN("opt_ssl_ca option not supported by mysql version (value %u) - "
+   "ignoring\n",
+   (unsigned int)db_mysql_opt_ssl_mode);
+#endif /* MYSQL_OPT_SSL_CA */
 
 #ifdef KSR_MYSQL_OPT_RECONNECT
/* set reconnect flag if enabled */
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3809#issuecomment-2049198019
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] db_mysql: failed build on CentOS 7 (Issue #3809)

2024-04-11 Thread sergey-safarov via sr-dev
I am fine with all of these cases:
1. add `#ifdef` for SSL support into db_mysql;
2. drop `CentOS 7` support;
3. build db_mysql module with MariaDB devel packages.

@miconda @linuxmaniac @henningw what is your opinion?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3809#issuecomment-2049166698
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org