In config file I have:
debug=2 mem_summary=0
Still I get 3400+ memory related syslog message when Kamailio terminates due to sqlops not been able to connect to mysql server.
According to core cookbook, memdbg and memlog should not be active when their values are greater than debug value (they default to 3) and mem_summary=0 should disable printing of memory debugging info.
What is it that I'm still missing?
-- Juha
On 26.04.21 09:49, Juha Heinanen wrote:
In config file I have:
debug=2 mem_summary=0
Still I get 3400+ memory related syslog message when Kamailio terminates due to sqlops not been able to connect to mysql server.
According to core cookbook, memdbg and memlog should not be active when their values are greater than debug value (they default to 3) and mem_summary=0 should disable printing of memory debugging info.
What is it that I'm still missing?
Is your kamailio compiled without defining DBG_QM_MALLOC (which should be on by default)
Cheers, Daniel
On 26.04.21 11:02, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
Is your kamailio compiled without defining DBG_QM_MALLOC (which should be on by default)
Yes, I have not defined DBG_QM_MALLOC.
Can you compile with DBG_QM_MALLOC, then reproduce and send a few of those log messages?
As I looked again at your previous message sent a while ago on a similar subject, they are not related to mem_summary/status, but to a double free or other memory fault operation.
Cheers, Daniel
Daniel-Constantin Mierla writes:
On 26.04.21 11:02, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
Is your kamailio compiled without defining DBG_QM_MALLOC (which should be on by default)
Yes, I have not defined DBG_QM_MALLOC.
Can you compile with DBG_QM_MALLOC, then reproduce and send a few of those log messages?
I'm not sure how to compile with DBG_QM_MALLOC. I added to debian rules' configure command parameter
$(MAKE) cgf DBG_QM_MALLOC=1 ...
and after that I didn't notice changes in syslog output. Again lots of these:
Apr 26 16:29:49 edge /usr/bin/edge-proxy[7620]: INFO: <core> [core/mem/q_malloc.c:529]: qm_free(): freeing a free fragment (0x7f1840b5c460/0x7f1840b5c470) - ignore
-- Juha
On 26.04.21 15:33, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
On 26.04.21 11:02, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
Is your kamailio compiled without defining DBG_QM_MALLOC (which should be on by default)
Yes, I have not defined DBG_QM_MALLOC.
Can you compile with DBG_QM_MALLOC, then reproduce and send a few of those log messages?
I'm not sure how to compile with DBG_QM_MALLOC. I added to debian rules' configure command parameter
$(MAKE) cgf DBG_QM_MALLOC=1 ...
and after that I didn't notice changes in syslog output. Again lots of these:
Apr 26 16:29:49 edge /usr/bin/edge-proxy[7620]: INFO: <core> [core/mem/q_malloc.c:529]: qm_free(): freeing a free fragment (0x7f1840b5c460/0x7f1840b5c470) - ignore
That is the log when the DBG_QM_MALLOC is not defined.
By default DBG_QM_MALLOC should be defined by having MEMDBG=1 in src/Makefile.defs.
To not define it, maybe you set MEMDBG=0 for 'make cfg ...' command or somewhere in the debian specs.
Cheers, Daniel
Now I have MEMDBG=1 and lots of these kind of messages show up when Kamailio fails to start due to sqlpos failing to connect to server:
Apr 26 18:06:30 edge /usr/bin/edge-proxy[8548]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f7c80b347b0), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring Apr 26 18:06:30 edge /usr/bin/edge-proxy[8548]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f7c80b306b0), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring Apr 26 18:06:30 edge /usr/bin/edge-proxy[8548]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f7c80b34a30), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_free(323) - ignoring Apr 26 18:06:30 edge /usr/bin/edge-proxy[8548]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f7c80b39b90), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring
-- Juha
On 26.04.21 17:09, Juha Heinanen wrote:
Now I have MEMDBG=1 and lots of these kind of messages show up when Kamailio fails to start due to sqlpos failing to connect to server:
Apr 26 18:06:30 edge /usr/bin/edge-proxy[8548]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f7c80b347b0), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring Apr 26 18:06:30 edge /usr/bin/edge-proxy[8548]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f7c80b306b0), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring Apr 26 18:06:30 edge /usr/bin/edge-proxy[8548]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f7c80b34a30), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_free(323) - ignoring Apr 26 18:06:30 edge /usr/bin/edge-proxy[8548]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f7c80b39b90), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring
They are from libssl, because kamailio sets it own memory manager for libssl, likely to be from the libmysqlclient connection, if you connect to the database sever via tls.
Unless one wants to dig in further in libssl or libmysqlclient (or mariadb), they have to be ignored being the case of failed startup/misconfiguration which is not the usual case, or make an option to print them at the different log level.
Cheers, Daniel