Re: squid in linux/alpha?

From: Roberto A. Lumbreras Pastor <[email protected]>
Date: Fri, 28 Nov 1997 18:16:39 +0100 (CET)

On Fri, 28 Nov 1997, Leigh Porter wrote:

: From: Leigh Porter <leigh@wisper.net>
: To: "Roberto A. Lumbreras Pastor" <rover@lander.es>
: Cc: Squid Users List <squid-users@nlanr.net>
: Date: Fri, 28 Nov 1997 07:47:08 +0000
: Subject: Re: squid in linux/alpha?
:
: Try lifiting the config and running it with the same version of
: squid on an Intel box.. Then try compiling debugging in and use
: gdb to see where it dies..

I have the same config file in an intel box... and it runs fine.

: But i'd try the config file though, I have had squid die doe to
: a divide by zero error with a broken config before.

Bingo!

GDB 4.16.patched (alpha-unknown-linux), Copyright 1996 Free Software Foundation, Inc...
(gdb) break storeExpiredReferenceAge
Breakpoint 1 at 0x12003cd08: file store.c, line 2775.
(gdb) run
Starting program: /usr/lib/squid/bin/squid

Breakpoint 1, storeExpiredReferenceAge () at store.c:2775
2775 if (Config.referenceAge == 0)
(gdb) list
2770 storeExpiredReferenceAge(void)
2771 {
2772 double x;
2773 double z;
2774 time_t age;
2775 if (Config.referenceAge == 0)
2776 return 0;
2777 x = (double) (store_swap_high - store_swap_size) / (store_swap_high - store_swap_low);
2778 x = x < 0.0 ? 0.0 : x > 1.0 ? 1.0 : x;
2779 z = pow((double) Config.referenceAge, x);
(gdb) step
2777 x = (double) (store_swap_high - store_swap_size) / (store_swap_high - store_swap_low);
(gdb) print store_swap_high - store_swap_low
$2 = 0
(gdb) print (store_swap_high - store_swap_size) / (store_swap_high - store_swap_low)
Erroneous arithmetic operation.
(gdb) step

Program received signal SIGFPE, Arithmetic exception.
storeExpiredReferenceAge () at store.c:2778
2778 x = x < 0.0 ? 0.0 : x > 1.0 ? 1.0 : x;
(gdb)

Yes, I have:
cache_swap_low 98
cache_swap_high 98

so objects are erased while others come in. Somebody suggested this
to avoid expensive expiration periods, and with my pentium box it
works ok; squid on linux/alpha tries to divide by 0... :-?

I'll change cache_swap_{low,high} and try to find why that evil /0
happens then }:-]

Regards,

-- 
Roberto Lumbreras Pastor  *  mailto:rover@lander.es
Lander Internet - Spain   *  http://www.lander.es/
Tel +34 1 556.28.83       *  Fax +34 1 556.30.01
--This message was written using 73% post-consumer electrons--
Received on Fri Nov 28 1997 - 09:20:24 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:37:44 MST