You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by "Michaud,Pierre [CMC]" <Pi...@ec.gc.ca> on 2002/08/21 17:04:57 UTC

flood round-robin-dynamic.xml problem

Hi,

I've just installed flood on my linux machine (red hat 7.3).  I've followed
all the steps indicated at http://httpd.apache.org/test/flood/building.html
.  I've tried successfully the round-robin-example.xml example.  But, when I
try the round-robin-dynamic.xml example, it is not working.  Here is what I
get:

[asdf@ghjk flood]$ ./flood examples/round-robin-dynamic.xml > time.out
flood: flood_round_robin.c:867: round_robin_postprocess: Assertion `status
== 0' failed.
Abort

I've put in comments the lines that targets www.apachelabs.org (this site is
not working for now) and activated the lines that generate the foo search on
google.

Any idea of what is happening?

Thanks,

Newbie Pierre


Re: flood round-robin-dynamic.xml problem

Posted by Jacek Prucia <ja...@7bulls.com>.
On Wed, 21 Aug 2002 14:02:32 -0700
Justin Erenkrantz <je...@apache.org> wrote:

> On Wed, Aug 21, 2002 at 01:59:15PM -0700, Aaron Bannert wrote:
> > So we need to fix that, right? An unmatched regexp shouldn't be
> > fatal.
> 
> The thought was that if the regexp failed, some expectation of how
> the site was designed has changed.  So, rather than continuing on,
> abort.

Yep, and regexp matches are quite frequently used in requesttemplate. So
a failure to match responsetemplate can cause a few next URL's to fail.
Abort makes sense for me as a default behaviour, though we might let
user override that in the future.

BTW: isnt't verify function supposed to precede postproces? You can get
simillar error while trying to match a 3x, 4x or 5x responses. You could
then mock around your regexp for a while, when actually remote server is
guilty.

regards,
-- 
Jacek Prucia
7bulls.com S.A.
http://www.7bulls.com/


Re: flood round-robin-dynamic.xml problem

Posted by Aaron Bannert <aa...@clove.org>.
On Wed, Aug 21, 2002 at 02:21:29PM -0700, Justin Erenkrantz wrote:
> I'm not saying that the error is informative (none of our errors
> are), but the exiting is correct.  If the site changed on you and
> you were expecting something else, then it should stop.

I'm fine with it being fatal for now. Yes, we should make our
error messages nicer, this is hardly the only problem error message. :)

> > Besides, if the user disables debugging, the assertions will be
> > disabled. If this is a fatal error (and I'm still on the fence here)
> > then we should detect that case and print a nice message.
> 
> How can a user disable asserts?  httpd-2.0 has that capability via
> AP_DEBUG_ASSERT, but flood doesn't.  -- justin

Here's a clip from assert.h:

#ifdef NDEBUG
#define assert(ignore) ((void) 0)
#else

-aaron

Re: flood round-robin-dynamic.xml problem

Posted by Justin Erenkrantz <je...@apache.org>.
On Wed, Aug 21, 2002 at 02:05:57PM -0700, Aaron Bannert wrote:
> Sure, but this isn't informative: flood: flood_round_robin.c:867: round_robin_postprocess: Assertion `status == 0' failed.

I'm not saying that the error is informative (none of our errors
are), but the exiting is correct.  If the site changed on you and
you were expecting something else, then it should stop.

> Besides, if the user disables debugging, the assertions will be
> disabled. If this is a fatal error (and I'm still on the fence here)
> then we should detect that case and print a nice message.

How can a user disable asserts?  httpd-2.0 has that capability via
AP_DEBUG_ASSERT, but flood doesn't.  -- justin

Re: flood round-robin-dynamic.xml problem

Posted by Aaron Bannert <aa...@clove.org>.
> Besides, if the user disables debugging, the assertions will be
> disabled. If this is a fatal error (and I'm still on the fence here)
> then we should detect that case and print a nice message.

Since I don't plan on fixing this, and since we both seem to be
in a mostly maintenance mode, I've added this to the STATUS in case
anyone else wishes to contribute the fix.

-aaron

Re: flood round-robin-dynamic.xml problem

Posted by Aaron Bannert <aa...@clove.org>.
On Wed, Aug 21, 2002 at 02:02:32PM -0700, Justin Erenkrantz wrote:
> On Wed, Aug 21, 2002 at 01:59:15PM -0700, Aaron Bannert wrote:
> > So we need to fix that, right? An unmatched regexp shouldn't be fatal.
> 
> The thought was that if the regexp failed, some expectation of how
> the site was designed has changed.  So, rather than continuing on,
> abort.  The only way to correct the problem would be to alter the
> profile to correct the regexp.

Sure, but this isn't informative: flood: flood_round_robin.c:867: round_robin_postprocess: Assertion `status == 0' failed.

Besides, if the user disables debugging, the assertions will be
disabled. If this is a fatal error (and I'm still on the fence here)
then we should detect that case and print a nice message.

-aaron

Re: flood round-robin-dynamic.xml problem

Posted by Justin Erenkrantz <je...@apache.org>.
On Wed, Aug 21, 2002 at 01:59:15PM -0700, Aaron Bannert wrote:
> So we need to fix that, right? An unmatched regexp shouldn't be fatal.

The thought was that if the regexp failed, some expectation of how
the site was designed has changed.  So, rather than continuing on,
abort.  The only way to correct the problem would be to alter the
profile to correct the regexp.

It's one of the few places where I like assertions as this is
user-correctable.  =)  -- justin

Re: flood round-robin-dynamic.xml problem

Posted by Aaron Bannert <aa...@clove.org>.
On Wed, Aug 21, 2002 at 11:06:02AM -0700, Justin Erenkrantz wrote:
> On Wed, Aug 21, 2002 at 11:04:06AM -0700, Aaron Bannert wrote:
> > Are we throwing an exception when the regexp doesn't match?
> 
> That's what is happening - we throw an assertion when the regexp
> fails.  -- justin

So we need to fix that, right? An unmatched regexp shouldn't be fatal.

-aaron

Re: flood round-robin-dynamic.xml problem

Posted by Justin Erenkrantz <je...@apache.org>.
On Wed, Aug 21, 2002 at 11:04:06AM -0700, Aaron Bannert wrote:
> Are we throwing an exception when the regexp doesn't match?

That's what is happening - we throw an assertion when the regexp
fails.  -- justin

Re: flood round-robin-dynamic.xml problem

Posted by Aaron Bannert <aa...@clove.org>.
On Wed, Aug 21, 2002 at 10:26:58AM -0700, Justin Erenkrantz wrote:
> Google changed its result format (which means that the postprocessing
> will fail as the response isn't what it expects) and apachelabs.org
> is now dead.
> 
> In short, flood is doing the right thing - round-robin-dynamic.xml
> would need to be rewritten to match Google's new result format.
> 
> Namely the responsetemplate parameter would have to be written to
> be a valid regexp on the response from Google.  -- justin

Are we throwing an exception when the regexp doesn't match?

-aaron

Re: flood round-robin-dynamic.xml problem

Posted by Justin Erenkrantz <je...@apache.org>.
On Wed, Aug 21, 2002 at 12:04:57PM -0300, Michaud,Pierre [CMC] wrote:
> [asdf@ghjk flood]$ ./flood examples/round-robin-dynamic.xml > time.out
> flood: flood_round_robin.c:867: round_robin_postprocess: Assertion `status
> == 0' failed.
> Abort
> 
> I've put in comments the lines that targets www.apachelabs.org (this site is
> not working for now) and activated the lines that generate the foo search on
> google.

Google changed its result format (which means that the postprocessing
will fail as the response isn't what it expects) and apachelabs.org
is now dead.

In short, flood is doing the right thing - round-robin-dynamic.xml
would need to be rewritten to match Google's new result format.

Namely the responsetemplate parameter would have to be written to
be a valid regexp on the response from Google.  -- justin