Daniel Pocock
unread,Mar 24, 2014, 5:47:33 PM3/24/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to si...@googlegroups.com
I've been using sipXtapi with reConServer (from reSIProcate)
I recently tried setting
RunAsUser = recon
in my reConServer.config. This basically means that recon will be
started as root, it will initialize the whole stack (reSIProcate and
sipXtapi), open the network sockets, etc as root and then it will drop
privileges just before the main processing loop is entered.
When using this, I've found that the application crashes.
Studying the problem with gdb, I see bad_alloc exceptions
Increasing the stack, .e.g
ulimit -s 128000
makes it go a little bit further but it still crashes. The more stack I
give it, the more it RAM it uses (according to valgrind) before the crash.
If I remove the RunAsUser config option, it runs fine
Is there any recommendation about how to use sipXtapi in an application
that wants to drop privileges?
There are workarounds and it seems to be quite happy if I just start it
as the recon user (using a modified init script) but maybe this issue is
a hint about some other stability or memory management issue.