<html><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:10pt"><div><span>Hi </span>Razvan</div><div><br></div><div>Thanks for your quick and accurate reply.&nbsp; I have made the changes which seems to have dropped my errors down from several thousand to just a handful, which is fantastic!</div><div><br></div><div>It looks like the fix has worked nicely for the usrloc module but the dialog module does not appear to work in the same way...</div><div><br></div><div>I'm not quite sure what the memory warning means though as I have forced the module to have 215MB of fixed memory (66MB currently used as idle) and has a 512MB swap file.</div><div><br></div><div>Although these changes have fixed the error messages the process now does not restart properly... where as before it had several thousand errors, but still worked.</div><div><br></div><div>Jul&nbsp; 6 11:23:11 raspberryvoip opensips:
 INFO:core:init_tcp: using epoll_lt as the TCP io watch method (auto detected)<br>Jul&nbsp; 6 11:23:11 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: NOTICE:core:main: version: opensips 1.8.0-notls (armv6l/linux)<br>Jul&nbsp; 6 11:23:11 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: INFO:core:main: using 128 Mb shared memory<br>Jul&nbsp; 6 11:23:11 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: INFO:core:main: using 4 Mb private memory per process<br>Jul&nbsp; 6 11:23:11 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: NOTICE:signaling:mod_init: initializing module ...<br>Jul&nbsp; 6 11:23:11 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: INFO:sl:mod_init: Initializing StateLess engine<br>Jul&nbsp; 6 11:23:11 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: INFO:tm:mod_init: TM - initializing...<br>Jul&nbsp; 6 11:23:11 raspberryvoip
 /usr/local/opensips_proxy/sbin/opensips[17917]: CRITICAL:tm:lock_set_init: semget (..., 251, 0700) failed: Invalid argument<br>Jul&nbsp; 6 11:23:11 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: INFO:tm:lock_initialize: semaphore arrays of size 250 allocated<br>Jul&nbsp; 6 11:23:11 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: INFO:rr:mod_init: rr - initializing<br>Jul&nbsp; 6 11:23:11 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: INFO:maxfwd:mod_init: initializing...<br>Jul&nbsp; 6 11:23:11 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: INFO:sipmsgops:mod_init: initializing...<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: INFO:usrloc:ul_init_locks: locks array size 128<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: INFO:registrar:mod_init: initializing...<br>Jul&nbsp; 6 11:23:12 raspberryvoip
 /usr/local/opensips_proxy/sbin/opensips[17917]: INFO:acc:mod_init: initializing...<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: INFO:auth:mod_init: initializing...<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: INFO:auth_db:mod_init: initializing...<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: INFO:dialog:mod_init: Dialog module - initializing<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 7 to 4<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 4 to 8<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a
 power of 2 as it should be -&gt; rounding from 8 to 16<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 16 to 32<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 32 to 64<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 64 to 128<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 128 to 256<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt;
 rounding from 256 to 512<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 512 to 1024<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 1024 to 2048<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 2048 to 4096<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 4096 to 8192<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 8192
 to 16384<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 16384 to 32768<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 32768 to 65536<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 65536 to 131072<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 131072 to 262144<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 262144 to
 524288<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 524288 to 1048576<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 1048576 to 2097152<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 2097152 to 4194304<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 4194304 to 8388608<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from
 8388608 to 16777216<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 16777216 to 33554432<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 33554432 to 67108864<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 67108864 to 134217728<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it should be -&gt; rounding from 134217728 to 268435456<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:dialog:mod_init: hash_size is not a power of 2 as it
 should be -&gt; rounding from 268435456 to 536870912<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: WARNING:core:fm_malloc: Not enough free memory, will atempt defragmenation<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: ERROR:dialog:init_dlg_table: no more shm mem (1)<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: ERROR:dialog:mod_init: failed to create hash table<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: ERROR:core:init_mod: failed to initialize module dialog<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: ERROR:core:main: error while initializing modules<br>Jul&nbsp; 6 11:23:12 raspberryvoip /usr/local/opensips_proxy/sbin/opensips[17917]: INFO:core:cleanup: cleanup<br>Jul&nbsp; 6 11:23:12 raspberryvoip opensips: INFO:core:daemonize: pre-daemon process
 exiting with -1<br><br></div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> "users-request@lists.opensips.org" &lt;users-request@lists.opensips.org&gt;<br> <b><span style="font-weight: bold;">To:</span></b> users@lists.opensips.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, 6 July 2012, 11:00<br> <b><span style="font-weight: bold;">Subject:</span></b> Users Digest, Vol 48, Issue 21<br> </font> </div> <br>Send Users mailing list submissions to<br>&nbsp;&nbsp;&nbsp; <a ymailto="mailto:users@lists.opensips.org" href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br><br>To
 subscribe or unsubscribe via the World Wide Web, visit<br>&nbsp;&nbsp;&nbsp; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>or, via email, send a message with subject or body 'help' to<br>&nbsp;&nbsp;&nbsp; <a ymailto="mailto:users-request@lists.opensips.org" href="mailto:users-request@lists.opensips.org">users-request@lists.opensips.org</a><br><br>You can reach the person managing the list at<br>&nbsp;&nbsp;&nbsp; <a ymailto="mailto:users-owner@lists.opensips.org" href="mailto:users-owner@lists.opensips.org">users-owner@lists.opensips.org</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of Users digest..."<br><br><br>Today's Topics:<br><br>&nbsp;  1. Re: Raspberry Pi / OpenSIPS (R?zvan Crainea)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date:
 Fri, 06 Jul 2012 12:09:56 +0300<br>From: R?zvan Crainea &lt;<a ymailto="mailto:razvan@opensips.org" href="mailto:razvan@opensips.org">razvan@opensips.org</a>&gt;<br>Subject: Re: [OpenSIPS-Users] Raspberry Pi / OpenSIPS<br>To: <a ymailto="mailto:users@lists.opensips.org" href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br>Message-ID: &lt;<a ymailto="mailto:4FF6AB64.7020404@opensips.org" href="mailto:4FF6AB64.7020404@opensips.org">4FF6AB64.7020404@opensips.org</a>&gt;<br>Content-Type: text/plain; charset="utf-8"; Format="flowed"<br><br>Hi, Duncan!<br><br>It seems like the Rasperry Pi cannot allocate more than 250 semaphores <br>at once, but the usrloc module and dialog try to allocate more than <br>that. In order to get fewer errors, you should configure OpenSIPS to <br>allocate for each module less than 250 semaphores. For the dialog and <br>usrloc module you can use the hash_size parameter to do that:<br><br>modparam("usrloc",
 "hash_size", 7)<br>modparam("dialog", "hash_size", 7)<br><br>Setting the hash size to 7, it will allocate 2^7 = 128 semaphores, which <br>is less than 250 the upper limit, therefore no critical errors will be <br>displayed.<br>The first error (CRITICAL:tm:lock_set_init: semget ...) cannot be <br>avoided from the script, you will have to change some defines in <br>OpenSIPS source code.<br><br>Regards,<br><br>Razvan Crainea<br>OpenSIPS Core Developer<br><a href="http://www.opensips-solutions.com/" target="_blank">http://www.opensips-solutions.com</a><br><br>On 07/05/2012 08:10 PM, Duncan Bell wrote:<br>&gt; Hi<br>&gt;<br>&gt; I installed OpenSIPS on my Raspberry Pi as a project in exactly the <br>&gt; same way as I would on any other machine following the webinar guide <br>&gt; from the OpenSIPS site.&nbsp; It works and I can register extensions etc, <br>&gt; but there are a huge amount of errors in the logs I normally do not get.<br>&gt;<br>&gt; The
 error starts here...<br>&gt;<br>&gt; Jul&nbsp; 3 18:32:14 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: <br>&gt; CRITICAL:tm:lock_set_init: semget (..., 251, 0700) failed: Invalid <br>&gt; argument<br>&gt; Jul&nbsp; 3 18:32:14 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: <br>&gt; INFO:tm:lock_initialize: semaphore arrays of size 250 allocated<br>&gt; Jul&nbsp; 3 18:32:14 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: INFO:rr:mod_init: rr - <br>&gt; initializing<br>&gt; Jul&nbsp; 3 18:32:14 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: INFO:maxfwd:mod_init: <br>&gt; initializing...<br>&gt; Jul&nbsp; 3 18:32:14 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: <br>&gt; INFO:sipmsgops:mod_init: initializing...<br>&gt; Jul&nbsp; 3 18:32:14 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: <br>&gt;
 CRITICAL:usrloc:lock_set_init: semget (..., 512, 0700) failed: Invalid <br>&gt; argument<br>&gt;<br>&gt; and I get it counts all the way down from 512 &gt; 250 with a line for <br>&gt; each error... until<br>&gt;<br>&gt; Jul&nbsp; 3 18:32:14 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: <br>&gt; CRITICAL:usrloc:lock_set_init: semget (..., 251, 0700) failed: Invalid <br>&gt; argument<br>&gt; Jul&nbsp; 3 18:32:14 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: <br>&gt; INFO:usrloc:ul_init_locks: locks array size 250<br>&gt; Jul&nbsp; 3 18:32:14 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: <br>&gt; INFO:registrar:mod_init: initializing...<br>&gt; Jul&nbsp; 3 18:32:14 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: INFO:acc:mod_init: <br>&gt; initializing...<br>&gt; Jul&nbsp; 3 18:32:14 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]:
 INFO:auth:mod_init: <br>&gt; initializing...<br>&gt; Jul&nbsp; 3 18:32:14 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: INFO:auth_db:mod_init: <br>&gt; initializing...<br>&gt; Jul&nbsp; 3 18:32:14 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: INFO:dialog:mod_init: <br>&gt; Dialog module - initializing<br>&gt; Jul&nbsp; 3 18:32:14 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: <br>&gt; CRITICAL:dialog:lock_set_init: semget (..., 2048, 0700) failed: <br>&gt; Invalid argument<br>&gt;<br>&gt; counting all the way down with a error per line from 2048 &gt; 251<br>&gt;<br>&gt; Jul&nbsp; 3 18:32:15 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: <br>&gt; CRITICAL:dialog:lock_set_init: semget (..., 251, 0700) failed: Invalid <br>&gt; argument<br>&gt; Jul&nbsp; 3 18:32:15 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: <br>&gt;
 INFO:core:probe_max_sock_buff: using rcv buffer of 216 kb<br>&gt; Jul&nbsp; 3 18:32:15 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: <br>&gt; INFO:core:probe_max_sock_buff: using snd buffer of 216 kb<br>&gt; Jul&nbsp; 3 18:32:15 raspberryvoip <br>&gt; /usr/local/opensips_proxy/sbin/opensips[1139]: <br>&gt; INFO:core:init_sock_keepalive: -- TCP keepalive enabled on socket<br>&gt; Jul&nbsp; 3 18:32:15 raspberryvoip opensips: INFO:core:daemonize: <br>&gt; pre-daemon process exiting with 0<br>&gt;<br>&gt; Any ideas of these several thousand CRITICAL errors... or is this just <br>&gt; down to the unit not being able to handle OpenSIPS?<br>&gt;<br>&gt; Thanks<br>&gt; Duncan<br>&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; Users mailing list<br>&gt; <a ymailto="mailto:Users@lists.opensips.org" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>&gt; <a
 href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br><br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: &lt;<a href="http://lists.opensips.org/pipermail/users/attachments/20120706/309560c2/attachment.html" target="_blank">http://lists.opensips.org/pipermail/users/attachments/20120706/309560c2/attachment.html</a>&gt;<br><br>------------------------------<br><br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@lists.opensips.org" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br><br><br>End of Users Digest, Vol 48, Issue 21<br>*************************************<br><br><br> </div> </div> </blockquote></div>  
 </div></body></html>