[Serusers] Memory errors
Jan Janak
jan at iptel.org
Wed Nov 26 21:11:38 CET 2003
On 25-11 07:52, Greg Fausak wrote:
> Darren,
>
> Did you ever get this figured out?
> I am running in to this problem when I enable
> domain.so processing. It is curious, because when
> I first tried it I got this error:
>
> if (!mf_process_maxfwd_header("10")) {
> sl_send_reply("483", "too many hops");
> };
>
> when I take this test out I get the memory overflow.
> when I leave it in I get a 483 at the UA when registering.
That sounds like an infinite loop -- ser tries to send a message to
itself over and over again. If you remove the condition then it will
keep sending the message until the memory is exhausted. If you keep
the condition then it will return the error after 10 loops.
> This started happening with domain processing.
Probably one of the domains isn't properly recognized as belonging to your
server, but DNS resolves to the server. That will result in an
infinite loop.
> ngrep only shows one packet, but if I put an xlog() trace at the
> top of the route {}; logic I see recursion. Somehow the route
> loop is being entered over and over again.
Yes. ngrep doesn't show the looping packets because it can listen on
one interface only and that's usually the network card. Looping
packets are sent over loopback so ngrep will not show them.
> If I comment out the 'loadmodule domain.so', and remove the
> #modparam("domain", "db_mode", 1)
> #modparam("domain", "domain_table", "domain")
> #modparam("domain", "domain_col", "did")
> #modparam("domain","db_url", "X");
> #modparam("usrloc|group", "use_domain", 1)
> lines, modify the www_challenge and www_authorize accordingly, and
> change
> if (!uri==myself) {
> # if(!is_from_local()) {
> then everything works. Were you trying to use the domain stuff?
I guess the condition is the problem. Probably is_from_local() doesn't
match one of domains that are matched properly by (uri==myself) test.
To find out which domain is the troublemaker you can run ngrep
listening on the loopback (use -d lo) option. Look at the Request-URI
and make sure you have the domain from the Request-URI in your domain
table.
Jan.
More information about the sr-users
mailing list