[OpenSIPS-Devel] Hang due to "no more nonces can be generated"

Dan Pascu dan at ag-projects.com
Tue Dec 2 16:46:53 CET 2008


On Tuesday 02 December 2008, Richard Revels wrote:
> Dan,
>
> We are fighting a pkg_memory allocation error on our platform as
> well.  Are you saying that doing a fifo command such as dlg_list every
> few seconds would cause memory allocation errors for script processing
> over time?

Not necessarily. It all depends on the size of the dialog list. If it 
takes 10% of pkg_memory to build the response for that command it will 
have no ill effect, because the rest of the memory (90%) is not 
fragmented. But if you run some MI command that allocates almost all of 
the memory, after it is released it is so fragmented that even an 
allocation request for 200 bytes will fail even though almost all of the 
1MB is not allocated.

The easiest way to check this is to run ul_dump with a large number of 
contacts (I found that over 1500 will trigger this, but it depends on 
their size, so let's say over 200 contacts will trigger this). The 
command will fail because it doesn't have enough memory to build the 
response and at the same time will completely fragment all the memory 
into small chunks which are less than 100 bytes each. If you then try to 
run a simple command like opensipsctl ps, it will fail because it can't 
find a memory block large enough to build its answer.

However, only the MI process memory is fragmented, so only the MI process 
will fail to do things, the other processes will work just fine. This 
puzzles me because the nonce is not generated by the MI process, so it 
shouldn't fail because of this, but the report suggests that the issue 
appeared after an ul_dump which is known to fragment memory.

> This is on openser 1.3 rather than opensips 1.4 but the 
> core dumps I have the bug tracker on is keeping me from doing any
> upgrading at the moment.

It's in every openser derivative to date.

-- 
Dan



More information about the Devel mailing list