[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 2.99.49p9 router leaking memory
On Tue, Dec 09, 1997 at 07:23:21PM +0200, mea@nic.funet.fi wrote:
> > Hi,
> >
> > We are running the final 2.99.49p9 on Solaris 2.5.1 and found one serious
> > memory leaking in router when processing the below message. The router grow
> > memory infinitely and finally freeze up the whole OS. Most probably, the
> > from address below causes the problem.
> >
> > Anyone get hints or patches about that?
>
> Yeah, lets start with an explanation of what happens.
> This is not about memory leak, rather an eternal recursion
> in route processing due to (I think) canonicalization
> problem on the source address.
>
> Try following in interactive mode:
>
> MAILBIN/router -i
> z# rtrace
> z# router '"<>"@mx05.netaddress.usa.net'
> (... lots of text zips in front of your eyes...)
> Ctrl-Z
>
> Now scroll back (you have LONG scroll-back buffers, don't you?)
> and see where it goes into loop..
>
> My guess it is inside canon while processing "<>" :-/
> I may have time tomorrow to look at this -- I hope I will
> have time..
Thanks for your hints. I found there is unbalanced matching rules in
canon.cf in handling "<>". Here's my simple patch with that. Mea, is
there any other problem with that change?
# diff -c canon.cf.orig canon.cf
*** canon.cf.orig Mon Dec 1 17:36:44 1997
--- canon.cf Wed Dec 10 10:19:30 1997
***************
*** 35,41 ****
(.*)<([^>]*) # Extra "<" with an address
address="\1\2"; continue ;; # defocus
! (.*)>(.*) # Extra ">" within an address
address="\1\2"; continue ;; # defocus
(.*)<(.*)>(.*) address="\1\2\3" ;; # defocus
--- 35,41 ----
(.*)<([^>]*) # Extra "<" with an address
address="\1\2"; continue ;; # defocus
! ([^<]*)>(.*) # Extra ">" within an address
address="\1\2"; continue ;; # defocus
(.*)<(.*)>(.*) address="\1\2\3" ;; # defocus
Rgds,
Ken Lai