[sr-dev] [kamailio/kamailio] Topos: critical error after upgrade to 5.5 (#2734)

Boris Korzun notifications at github.com
Thu May 13 15:48:00 CEST 2021


### Description
I've faced a critical error in the log after upgrade to 5.5 on _topos_ module.

### Troubleshooting
It looks like _ki_tps_set_context()_ tries to free incorrectly defined variable __tps_context_value_.

#### Reproduction
```
loadmodule "topos.so"
modparam("topos", "storage", "db")
modparam("topos", "db_url", DBURL_PRIMARY)
modparam("topos", "sanity_checks", 1)
modparam("topos", "branch_expire", 300)
modparam("topos", "dialog_expire", 7200)
modparam("topos", "clean_interval", 120)
```

#### Log Messages
```
20:59:43.951476 kamailio 81412 CRITICAL: <core> [core/mem/q_malloc.c:502]: qm_free(): BUG: bad pointer 0x82310fbdc (out of memory block!) called from topos: topos_mod.c: ki_tps_set_context(315) - ignoring
20:59:58.925224 kamailio 81413 CRITICAL: <core> [core/mem/q_malloc.c:502]: qm_free(): BUG: bad pointer 0x82310fbdc (out of memory block!) called from topos: topos_mod.c: ki_tps_set_context(315) - ignoring
21:00:13.930896 kamailio 81414 CRITICAL: <core> [core/mem/q_malloc.c:502]: qm_free(): BUG: bad pointer 0x82310fbdc (out of memory block!) called from topos: topos_mod.c: ki_tps_set_context(315) - ignoring
21:00:28.929303 kamailio 81415 CRITICAL: <core> [core/mem/q_malloc.c:502]: qm_free(): BUG: bad pointer 0x82310fbdc (out of memory block!) called from topos: topos_mod.c: ki_tps_set_context(315) - ignoring
21:00:43.925256 kamailio 81416 CRITICAL: <core> [core/mem/q_malloc.c:502]: qm_free(): BUG: bad pointer 0x82310fbdc (out of memory block!) called from topos: topos_mod.c: ki_tps_set_context(315) - ignoring
21:00:58.925535 kamailio 81417 CRITICAL: <core> [core/mem/q_malloc.c:502]: qm_free(): BUG: bad pointer 0x82310fbdc (out of memory block!) called from topos: topos_mod.c: ki_tps_set_context(315) - ignoring
21:01:13.925081 kamailio 81418 CRITICAL: <core> [core/mem/q_malloc.c:502]: qm_free(): BUG: bad pointer 0x82310fbdc (out of memory block!) called from topos: topos_mod.c: ki_tps_set_context(315) - ignoring
21:01:28.925306 kamailio 81419 CRITICAL: <core> [core/mem/q_malloc.c:502]: qm_free(): BUG: bad pointer 0x82310fbdc (out of memory block!) called from topos: topos_mod.c: ki_tps_set_context(315) - ignoring
```

### Additional Information
```
version: kamailio 5.5.0 (x86_64/freebsd) d4c1a1
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, select, kqueue.
id: d4c1a1 
compiled on 13:02:36 May 13 2021 with cc FreeBSD clang version 10.0.1 (git at github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2)
```

* **Operating System**:
FreeBSD 13


-- 
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/2734
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210513/9a3fd6a3/attachment.htm>


More information about the sr-dev mailing list