Every time when i call kamcmd drouting.reload in log i get message CRITICAL: <core> [core/mem/q_malloc.c:502]: qm_free(): BUG: bad pointer 0x7f7ea7c127d0 (out of memory block!) called from core: core/utils/tmrec.c: tmrec_free(393) - ignoring
Tested on Centos 7, kamailio 5.4/5.5 from repo in kamailio wiki
It looks like the issue is how the dynamic library (the module) loading resolves the symbols. When replying to the sr-users message, I though the drouting is using now the tmrec from the core (core/utils/tmrec.c), but actually it has its own clone inside module (dr_time.c). However, both files contain functions with same name, so in this case looks like symbols are resolved to core functions instead of those in dr_time.c.
core/utils/tmrec.c use to be in an internal library loaded by tmrec module, but we merged that lib to core. I did a diff and it seems to be some differences, therefore switching to use core code might take time and testing. The solution to go, at least in a first phase, is to rename the functions in dr_time.c to be specific for module.
By grepping the code, cplc module seems exposed to same issue, it has tmrec code inside cpl_time.c
Can you give it a try with latest master branch (or using the commit 33ea38f35f9911a26a757dbfa22065eb80a9a24a)?
If works fine, then I will backport.
I build from git and test drouting.reload, all works - no errors in log, changes in db are reflected on memory cache.
Thanks for testing, it will be backported.
Closed #2827.