[prev in list] [next in list] [prev in thread] [next in thread] 

List:       serusers
Subject:    Re: [SR-Users] Memory issue?
From:       "Igor Potjevlesch" <igor.potjevlesch () gmail ! com>
Date:       2016-01-29 16:31:38
Message-ID: 017b01d15ab2$87eb2c30$97c18490$ () gmail ! com
[Download RAW message or body]

This is a multipart message in MIME format.

[Attachment #2 (multipart/alternative)]
This is a multipart message in MIME format.


Hi Stefan,

 

The fix must be applied in addition of the growth of SHM?

 

What exactly the fix will avoid?


Regards,

 

Igor.

 

De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Mititelu \
Stefan Envoyé : vendredi 22 janvier 2016 15:26
À : Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org>
Objet : Re: [SR-Users] Memory issue?

 

Hi Igor,

Yes, it's caused by lack of shm.

I don't know if there is a proper shm value. Depending on how many modules are loaded \
on kamailio and how much shm a module might use over time, more or less shm should be \
used. In your particular case, depending on how much userblacklist table should grow, \
you should adjust the startup shm value.

Thank you for your detailed feedback on the segfault; the fix it's on its way and \
will be backported.

Stefan

 

On Fri, Jan 22, 2016 at 1:12 PM, Igor Potjevlesch <igor.potjevlesch@gmail.com \
<mailto:igor.potjevlesch@gmail.com> > wrote:

Hi Stefan,

 

Indeed, It looks to be the issue. 

But, the root cause is the lack of SHM memory, isn't it?

 

Actually, Kamailio is running with 256M of SHM (-m 256). What would be the good new \
value?

 

Regards,

 

Igor.

 

De : sr-users [mailto:sr-users-bounces@lists.sip-router.org \
<mailto:sr-users-bounces@lists.sip-router.org> ] De la part de smititelu Envoyé : \
jeudi 21 janvier 2016 12:22 À : Kamailio (SER) - Users Mailing List \
<sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> > Objet : Re: \
[SR-Users] Memory issue?

 

On 21.01.2016 12:37, Igor Potjevlesch wrote:

And 2 coredumps readable:

Core was generated by `/usr/local/sbin/kamailio -P /var/run/kamailio.pid -m 256 -M \
64'.

Program terminated with signal 11, Segmentation fault.

#0  0x00007f13a1550af2 in dtrie_insert (root=0x7f138d7ffb38, number=0x22ba6c0 \
"003716716", numberlen=9, data=0x2, branches=10) at dtrie.c:141

141                     if (node->child[digit] == NULL) {

 

Core was generated by `/usr/local/sbin/kamailio -P /var/run/kamailio.pid -m 256 -M \
64'.

Program terminated with signal 11, Segmentation fault.

#0  0x00007f13a1550af2 in dtrie_insert (root=0x7f138d7ff998, number=0x22b57a8 \
"0035587482", numberlen=10, data=0x2, branches=10) at dtrie.c:141

141                     if (node->child[digit] == NULL) {


I remember something related, solved and backported in commit [1].

Now that I'm looking at the segfault line I think node should be NULL checked also \
after ```struct dtrie_node_t *node = root;```

Stefan

[1] https://github.com/kamailio/kamailio/commit/b399bb34cebdb1002d27bb0cf554f2d2e683c40d



_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> 
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

 


[Attachment #5 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type \
content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 \
(filtered medium)"><style><!-- /* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-reply;
	font-family:"Verdana",sans-serif;
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link=blue vlink=purple><div \
class=WordSection1><p class=MsoNormal><span \
style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Hi \
Stefan,<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span lang=EN-GB \
style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>The \
fix must be applied in addition of the growth of SHM?<o:p></o:p></span></p><p \
class=MsoNormal><a name="_MailEndCompose"><span lang=EN-GB \
style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></a></p><p \
class=MsoNormal><span lang=EN-GB \
style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>What \
exactly the fix will avoid?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB \
style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><br>Regards,<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-GB \
style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span lang=EN-GB \
style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Igor.<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-GB \
style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><b><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'>De&nbsp;:</span></b><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'> sr-users \
[mailto:sr-users-bounces@lists.sip-router.org] <b>De la part de</b> Mititelu \
Stefan<br><b>Envoyé&nbsp;:</b> vendredi 22 janvier 2016 15:26<br><b>À&nbsp;:</b> \
Kamailio (SER) - Users Mailing List \
&lt;sr-users@lists.sip-router.org&gt;<br><b>Objet&nbsp;:</b> Re: [SR-Users] Memory \
issue?<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div><div><p \
class=MsoNormal style='margin-bottom:12.0pt'>Hi Igor,<br><br>Yes, it's caused by lack \
of shm.<br><br>I don't know if there is a proper shm value. Depending on how many \
modules are loaded on kamailio and how much shm a module might use over time, more or \
less shm should be used. In your particular case, depending on how much userblacklist \
table should grow, you should adjust the startup shm value.<o:p></o:p></p></div><p \
class=MsoNormal style='margin-bottom:12.0pt'>Thank you for your detailed feedback on \
the segfault; the fix it's on its way and will be backported.<o:p></o:p></p></div><p \
class=MsoNormal>Stefan<o:p></o:p></p></div><div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>On Fri, Jan 22, 2016 at \
1:12 PM, Igor Potjevlesch &lt;<a href="mailto:igor.potjevlesch@gmail.com" \
target="_blank">igor.potjevlesch@gmail.com</a>&gt; wrote:<o:p></o:p></p><blockquote \
style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm \
6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB \
style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>Hi \
Stefan,</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB \
style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>&nbsp;</span><o:p></o:p></p><p \
class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>Indeed, \
It looks to be the issue. </span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB \
style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>But, the root \
cause is the lack of SHM memory, isn't it?</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB \
style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>&nbsp;</span><o:p></o:p></p><p \
class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>Actually, \
Kamailio is running with 256M of SHM (-m 256). What would be the good new \
value?</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB \
style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>&nbsp;</span><o:p></o:p></p><p \
class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>Regards,</span><o:p></o:p></p><p \
class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>&nbsp;</span><o:p></o:p></p><p \
class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>Igor.</span><o:p></o:p></p><p \
class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><a \
name="-651276145__MailEndCompose"><span lang=EN-GB \
style='font-size:9.0pt;font-family:"Verdana",sans-serif;color:#1F497D'>&nbsp;</span></a><o:p></o:p></p><div><div \
style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p \
class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'>De&nbsp;:</span></b><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'> sr-users [mailto:<a \
href="mailto:sr-users-bounces@lists.sip-router.org" \
target="_blank">sr-users-bounces@lists.sip-router.org</a>] <b>De la part de</b> \
smititelu<br><b>Envoyé&nbsp;:</b> jeudi 21 janvier 2016 12:22<br><b>À&nbsp;:</b> \
Kamailio (SER) - Users Mailing List &lt;<a \
href="mailto:sr-users@lists.sip-router.org" \
target="_blank">sr-users@lists.sip-router.org</a>&gt;<br><b>Objet&nbsp;:</b> Re: \
[SR-Users] Memory issue?</span><o:p></o:p></p></div></div><div><div><p \
class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><p \
class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>On 21.01.2016 \
12:37, Igor Potjevlesch wrote:<o:p></o:p></p><blockquote \
style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB>And 2 \
coredumps readable:</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB>Core was \
generated by `/usr/local/sbin/kamailio -P /var/run/kamailio.pid -m 256 -M \
64'.</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB>Program \
terminated with signal 11, Segmentation fault.</span><o:p></o:p></p><p \
class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-GB>#0&nbsp; 0x00007f13a1550af2 in dtrie_insert (root=0x7f138d7ffb38, \
number=0x22ba6c0 &quot;003716716&quot;, numberlen=9, data=0x2, branches=10) at \
dtrie.c:141</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-GB>141&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
if (node-&gt;child[digit] == NULL) {</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-GB>&nbsp;</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB>Core was \
generated by `/usr/local/sbin/kamailio -P /var/run/kamailio.pid -m 256 -M \
64'.</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-GB>Program \
terminated with signal 11, Segmentation fault.</span><o:p></o:p></p><p \
class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-GB>#0&nbsp; 0x00007f13a1550af2 in dtrie_insert (root=0x7f138d7ff998, \
number=0x22b57a8 &quot;0035587482&quot;, numberlen=10, data=0x2, branches=10) at \
dtrie.c:141</span><o:p></o:p></p><p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span \
lang=EN-GB>141&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
if (node-&gt;child[digit] == NULL) {</span><o:p></o:p></p></div></blockquote><p \
class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><br>I \
remember something related, solved and backported in commit [1].<br><br>Now that I'm \
looking at the segfault line I think node should be NULL checked also after ```struct \
dtrie_node_t *node = root;```<br><br>Stefan<br><br>[1] <a \
href="https://github.com/kamailio/kamailio/commit/b399bb34cebdb1002d27bb0cf554f2d2e683c40d" \
target="_blank">https://github.com/kamailio/kamailio/commit/b399bb34cebdb1002d27bb0cf554f2d2e683c40d</a><o:p></o:p></p></div></div></div></div><p \
class=MsoNormal style='margin-bottom:12.0pt'><br>_______________________________________________<br>SIP \
Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br><a \
href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br><a \
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" \
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></p></blockquote></div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p></div></div></body></html>



_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic