Gustaf,

You may be "using" traces but not realize it, it sounds like
ns_adp_abort isn't don't what was originally intended.

I wouldn't worry about an runtime error caused during running traces, it
would be an error to even use ns_adp_abort in a trace filter because the
connection is already finished. This is analogous to calling [break]
outside of a loop. 

It seems important to consider ns_adp_abort, ns_adp_return and
ns_adp_break as a unit. They add necessary loop type controls so that
developers can create deeply nested code and still get out of it without
the need to use [catch]. But, like a lot of AOLserver specific
procedures, there is no hand-holding in their use. They can be misued. 

In this particular case, it looks like somewhere along the way,
ns_adp_abort was modified to not work as expected. 

The desired effect is exactly what you would get by returning
filter_return from a preauth or postauth filter. This effect is to skip
to trace filters, not past them.

Skipping trace filters even on an aborted connection would be a disaster
for any application which relies on cleanup of resources. 

tom jackson

On Thu, 2009-04-02 at 11:12 +0200, Gustaf Neumann wrote:
> Andrew Steets schrieb:
> > The patch I sent earlier seems to fulfill these needs, but I am
> > worried about corner cases where LogTrace (from the nslog module)
> > could blow up.  Nothing about the state of the Conn * seems to be
> > guaranteed when the ConnCleanup callbacks are called.
> >   
> Dear Andrew,
> 
> i think most (all?) of the repondents seems to agree that writing in the 
> about case to
> the access log file. For me there are still two quesions open:
> 
> a) is it possoble to call ns_adp_abort at some time, where the server 
> might crash
>    (in normal operations, everthing looks fine to me, problems might 
> occur in
>    when called from some traces; other calls are likely to have similar 
> problems)
> 
> b) the patch replaces the call to the regular server trace by a 
> connection cleanup call.
>    this means, at least in 4.5.*, ns_adp_abort seems to cancel all 
> traces (also
>    these registered with ns_register_trace). Is this desired?
>   
>    From Tom's website:   http://rmadilo.com/files/nsapi/ns_adp_abort.html
>    the doc of ns_adp_abort says
> 
>    ... Every ns_returnxxx call in an ADP should be followed with a call
>     to ns_adp_abort....
> 
>    With this recommendation, cancelling traces seem wrong to me; or at 
> least,
>    this should be documented.
> 
> We don't use traces, all of OpenACS does not use it, so this is no
> current issue for us.
> 
> -gustaf neumann
> 
> 
> --
> AOLserver - http://www.aolserver.com/
> 
> To Remove yourself from this list, simply send an email to 
> <[email protected]> with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
> field of your email blank.
> 


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<[email protected]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to