Hi Experts,
Thanks for the reply! Below and attached are the critical log.
● kamailio.service - Kamailio - the Open Source SIP Server Loaded: loaded (/lib/systemd/system/kamailio.service; enabled; vendor preset: enabled) Active: inactive (dead) since Sat 2023-09-02 02:33:17 UTC; 24h ago Process: 12629 ExecStart=/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY --atexit=no (code=exited, status=0/SUCCESS) Main PID: 12631 (code=exited, status=0/SUCCESS)
Sep 02 02:33:17 KamailioServer-2 /usr/sbin/kamailio[12631]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f1c0d7fec68), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring Sep 02 02:33:17 KamailioServer-2 /usr/sbin/kamailio[12631]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f1c0d7ff8e8), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring Sep 02 02:33:17 KamailioServer-2 /usr/sbin/kamailio[12631]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f1c0d7ffae8), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring Sep 02 02:33:17 KamailioServer-2 /usr/sbin/kamailio[12631]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f1c0d7ff568), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_free(323) - ignoring Sep 02 02:33:17 KamailioServer-2 /usr/sbin/kamailio[12631]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f1c0d7ff4e8), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring Sep 02 02:33:17 KamailioServer-2 /usr/sbin/kamailio[12631]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f1c0d7ff768), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring Sep 02 02:33:17 KamailioServer-2 /usr/sbin/kamailio[12631]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f1c0d7ffde8), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring Sep 02 02:33:17 KamailioServer-2 /usr/sbin/kamailio[12631]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f1c0d7db740), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_realloc(299) - ignoring Sep 02 02:33:17 KamailioServer-2 /usr/sbin/kamailio[12631]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f1c0d799450), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring Sep 02 02:33:17 KamailioServer-2 /usr/sbin/kamailio[12631]: INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized root@KamailioServer-2:~# systemctl status kamailio.service
I checked the source code and I think it should not happen with this bug.
#if OPENSSL_VERSION_NUMBER < 0x010100000L static void ser_free(void *ptr) { /* The memory functions provided to openssl needs to behave like standard * memory functions, i.e. free(). Therefore, ser_free must accept NULL * pointers, see: * http://openssl.6102.n7.nabble.com/Custom-free-routine-is-invoked-with-NULL-a... * As shm_free() aborts on null pointers, we have to check for null pointer * here in the wrapper function. */ if (ptr) { shm_free(ptr); } } #else static void ser_free(void *ptr, const char *fname, int fline) { if (ptr) { shm_free(ptr); } } #endif
when shm_free() is called, the pointer, ptr, cannot be null. So I've been debugging this issue.
Best regards,
Louis LIU
Senior Software Engineer (Cloud Platform && Audio/Video Intercom) M +86 18575580920 8F-A CES Building,No.3099 Global Offer Innovation E bin.liu2@se.com Keyuan South Road, Nanshan District Home & Distribution Division, Energy Management Shenzhen, China
[cid:b0c47a84-d2a0-4d16-9922-0be4b682ec3f]
Download mySchneider apphttps://www.se.com/ww/en/work/support/myschneider-app/ 24/7 support Mobile catalog. Acces to expert help.
Internal
________________________________ From: Henning Westerholt hw@gilawa.com Sent: 12 August 2023 16:40 To: Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org Cc: Bin LIU bin.liu2@se.com Subject: RE: Kamailio Patching Issues
[External email: Use caution with links and attachments]
________________________________
Hello,
I am sorry, but I don’t fully understand your question. If you do a system upgrade for a package that consists of several individual packages, like Kamailio, you usually should update them all together to the same version. Otherwise, you’ll end up with some problems in many cases.
So, I’d suggest using the tools of the package management (like apt or dpkg in your case) to verify the version of the installed kamailio. If you send some log files, best is to include them in the actual e-mail, or use a text file. Word files are not optimal as some people cannot open them.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.comhttps://gilawa.com/
Internal
From: Bin LIU bin.liu2@se.com Sent: Samstag, 12. August 2023 07:05 To: Henning Westerholt hw@gilawa.com; Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org Subject: Re: Kamailio Patching Issues
Thanks a lot!
The log was gotten by after I clean the log file and start kamailio. Let me send you another successful start log attached without doing patching (version 5.5.4) . And I think I did not use custom patches. What I did is only executing apt-get update & apt-get upgrade commands. When I execute the command, 'apt-cache search kamailio ', it shows 45 patches (modules). But I installed only 11 modules before. In the word document attached you will see the 11 modules with green color.
I am not sure if the other patches(modules) except 11 installed before will fork a new process (child) and this new process will cause problems to the main process? Really thanks for your kindly reply and apologize for the troule I brought to you.
Best regards,
Louis LIU
Senior Software Engineer (Cloud Platform && Audio/Video Intercom) M +86 18575580920 8F-A CES Building,No.3099
Global Offer Innovation E bin.liu2@se.commailto:bin.liu2@se.com Keyuan South Road, Nanshan District
Home & Distribution Division, Energy Management Shenzhen, China
[cid:image001.png@01D9CD09.649AB300]
Download mySchneider apphttps://www.se.com/ww/en/work/support/myschneider-app/ 24/7 support Mobile catalog. Acces to expert help.
Internal
________________________________
From: Henning Westerholt <hw@gilawa.commailto:hw@gilawa.com> Sent: 12 August 2023 03:33 To: Kamailio (SER) - Development Mailing List <sr-dev@lists.kamailio.orgmailto:sr-dev@lists.kamailio.org> Cc: Bin LIU <bin.liu2@se.commailto:bin.liu2@se.com> Subject: RE: Kamailio Patching Issues
[External email: Use caution with links and attachments]
________________________________
Hello,
the log does not show much useful information on the first view. Your Kamailio terminates with a sigchild. If you are using some custom patches, have look to them and add them step by step, executing your tests after every try for example.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.comhttps://gilawa.com/
From: Bin LIU <bin.liu2@se.commailto:bin.liu2@se.com> Sent: Mittwoch, 9. August 2023 11:22 To: sr-dev@lists.kamailio.orgmailto:sr-dev@lists.kamailio.org Subject: [sr-dev] Kamailio Patching Issues
Halo Experts,
So sorry to disturb you for the kamailio start failure issue I faced recently when doing patching from version 5.5.4 to 5.5.6. Really appreciated if you could give me some assistance on it ! And attached is the start log. Thanks.
Best regards,
Louis LIU
Senior Software Engineer (Cloud Platform && Audio/Video Intercom) M +86 18575580920 8F-A CES Building,No.3099
Global Offer Innovation E bin.liu2@se.commailto:bin.liu2@se.com Keyuan South Road, Nanshan District
Home & Distribution Division, Energy Management Shenzhen, China
[cid:image001.png@01D9CD09.649AB300]
Download mySchneider apphttps://www.se.com/ww/en/work/support/myschneider-app/ 24/7 support Mobile catalog. Acces to expert help.
Internal