Module: kamailio
Branch: master
Commit: 970fc2ac73fb38b22d5a5acd3e326fb97b97f6af
URL: https://github.com/kamailio/kamailio/commit/970fc2ac73fb38b22d5a5acd3e326fb…
Author: Henning Westerholt <hw(a)kamailio.org>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2018-12-26T20:22:51+01:00
core: remove the SHM_MEM #define, the core will not even compile without it
- remove the SHM_MEM #define, the purpose of this was to allow the compilation
without SHM memory pool support
- this did not worked for a long time, the core will not even compile without
it (no locking, broken timer etc..). Additionally many modules need it.
- remove 50 ifdef/endif blocks, no functional changes done
---
Modified: src/core/cfg.y
Modified: src/core/cfg_core.c
Modified: src/core/cfg_core.h
Modified: src/core/lock_alloc.h
Modified: src/core/mem/mem.c
Modified: src/core/mem/shm_mem.c
Modified: src/core/mem/shm_mem.h
Modified: src/core/pt.c
Modified: src/core/pt.h
Modified: src/core/shm_init.c
Modified: src/core/timer.c
Modified: src/core/ut.h
Modified: src/core/ver_defs.h
---
Diff: https://github.com/kamailio/kamailio/commit/970fc2ac73fb38b22d5a5acd3e326fb…
Patch: https://github.com/kamailio/kamailio/commit/970fc2ac73fb38b22d5a5acd3e326fb…
### Description
due the behaviour of the variable "alias" the other that use dots inside are misinterpreted: seems ambiguity in the grammar with alias and listen respect other vars that have "dots" in values.
Both alias and listen can have an unquoted host list as value. An unquoted host is a list of
IDs separated by ‘.’. Since EOL is not taken into account, then `alias=foo.bar` followed by `myvar.msg=2.3.4.5` is interpreted as: `alias=foo.bar myvar.msg`
bug of course in issue #1773 nobody check that right?
### Troubleshooting
kamailio seems does not reconoce it the global variable in kamailio.cfg file **if no double quoted the value itselft! but if are not global variables, alias variable can be unquoted!**
prevousli done in isues:
* #1773 closed by a comment that does not make sense due i configured in right way
* after furter investigation seems due the alias variable that implies a "dot" inside the value
seems the "dots" are misinterperted due the presence of the aliases variable that already are present! and that generated a very very older problem!
#### Reproduction
download, configure and make build of kamailio
use the main config file
in that file put only one change, presicelly and adition:
`kamailio.bindip=10.101.10.10`
**bur using doble coutes seems there no problem** this are not documented and seems its and ancient bug
#### Log Messages
```
0(1542) DEBUG: <core> [core/modparam.c:83]: set_mod_param_regex(): 'debugger' matches module 'debugger'
0(1542) DEBUG: <core> [core/sr_module.c:811]: find_param_export(): found <log_level_name> in module debugger [/usr/lib/x86_64-linux-gnu/kamailio/modules/debugger.so]
0(1542) DEBUG: <core> [core/modparam.c:99]: set_mod_param_regex(): found <log_level_name> in module debugger [/usr/lib/x86_64-linux-gnu/kamailio/modules/debugger.so]
0(1542) CRITICAL: <core> [core/cfg.y:3450]: yyerror_at(): parse error in config file kamailio.cfg, line 9, column 6: syntax error
0(1542) CRITICAL: <core> [core/cfg.y:3450]: yyerror_at(): parse error in config file kamailio.cfg, line 9, column 6: unknown config variable
0(1542) CRITICAL: <core> [core/cfg.y:3447]: yyerror_at(): parse error in config file kamailio.cfg, line 9, column 7-8:
ERROR: bad config file (3 errors)
0(1542) WARNING: <core> [core/ppcfg.c:221]: pp_ifdef_level_check(): different number of preprocessor directives: N(#!IF[N]DEF) - N(#!ENDIF) = 1
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.1.6 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 4.9.2
```
* **Operating System**:
```
Linux ip-10-101-2-78 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30) x86_64 GNU/Linux
```
--
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/1779
### Description
i upgrade kamailio 4 to 5 following all the respective guides carefully: https://www.kamailio.org/wiki/install/upgrade/4.4.x-to-5.0.0 and then from 5.0 to 5.1 and kamailio does not start
### Troubleshooting
kamailio does not run and got error: `db_check_table_version(): invalid version 6 for table sipusers found, expected 7 (check table structure and table "version")`
the message are very ambigous
#### Reproduction
* install log time ago kamailio 4.4
* apply all steps to upgrade as https://www.kamailio.org/wiki/install/upgrade/4.4.x-to-5.0.0
* apply again aditional steps as https://www.kamailio.org/wiki/install/upgrade/5.0.x-to-5.1.0
* restar kamailio and does not start due error on table check
#### Log Messages
```
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: db_mysql [km_my_con.c:148]: db_mysql_new_connection(): server version is 5.5.5-10.0.32-MariaDB-0+deb8u1
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: <core> [db_res.c:120]: db_new_result(): allocate 56 bytes for result set at 0x7f395b036b30
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: db_mysql [km_res.c:66]: db_mysql_get_columns(): 1 columns returned from the query
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: <core> [db_res.c:158]: db_allocate_columns(): allocate 8 bytes for result names at 0x7f395b044128
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: <core> [db_res.c:169]: db_allocate_columns(): allocate 4 bytes for result types at 0x7f395b044198
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: db_mysql [km_res.c:84]: db_mysql_get_columns(): allocate 16 bytes for RES_NAMES[0] at 0x7f395b0b91c8
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: db_mysql [km_res.c:91]: db_mysql_get_columns(): RES_NAMES(0x7f395b0b91c8)[0]=[table_version]
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: db_mysql [km_res.c:99]: db_mysql_get_columns(): use DB1_INT result type
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: <core> [db_res.c:188]: db_allocate_rows(): allocate 16 bytes for rows at 0x7f395b0b9240
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: <core> [db_row.c:117]: db_allocate_row(): allocate 32 bytes for row values at 0x7f395b0b92b8
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: <core> [db_val.c:74]: db_str2val(): converting INT [6]
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: <core> [db_res.c:79]: db_free_columns(): freeing 1 columns
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: <core> [db_res.c:83]: db_free_columns(): freeing RES_NAMES[0] at 0x7f395b0b91c8
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: <core> [db_res.c:96]: db_free_columns(): freeing result names at 0x7f395b044128
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: <core> [db_res.c:101]: db_free_columns(): freeing result types at 0x7f395b044198
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: <core> [db_res.c:52]: db_free_rows(): freeing 1 rows
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: <core> [db_row.c:95]: db_free_row(): freeing row values at 0x7f395b0b92b8
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: <core> [db_res.c:60]: db_free_rows(): freeing rows at 0x7f395b0b9240
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: <core> [db_res.c:138]: db_free_result(): freeing result set at 0x7f395b036b30
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) ERROR: <core> [db.c:450]: db_check_table_version(): invalid version 6 for table sipusers found, expected 7 (check table structure and table "version")
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) ERROR: auth_db [auth_db_mod.c:308]: auth_fixup(): error during table version check.
Dec 21 16:34:31 ip-10-101-2-78 kamailio[8501]: 0(8503) DEBUG: <core> [db_pool.c:100]: pool_remove(): removing connection from the pool
```
### Possible Solutions
could the changelog provide the missing tables? or wiki doesn ot point all the respective changes?
### Additional Information
```
version: kamailio 5.1.6 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 4.9.2
```
### Operating System:
```
Linux ip-10-101-2-78 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30) x86_64 GNU/Linux
```
--
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/1780