Hi,
Thanks to all those who made suggestions. Using gdb I discovered that the
floating point exception was generated by the line
x = (double) (store_swap_high - store_swap_size) /
(store_swap_high - store_swap_low);
within the function storeExpireReferenceAge() (file = store.c). This looks
pretty harmless to me providing a division by zero doesn't occur.
Apparently FreeBSD enables floating point exceptions by default, whereas
Linux does not. Perhaps there's an underflow or something.
The fix was to #include <floatingpoint.h> in main.c and add the line
fpsetmask(~(FP_X_INV | FP_X_DNML | FP_X_DZ | FP_X_OFL | FP_X_UFL | FP_X_IMP));
in the main() function. This disables floating point exceptions for the
Squid process.
Simon.
>I normally run Squid under Linux but thought I'd try it under FreeBSD to
>compare the performance. I've got a clean install of FreeBSD 3.2-Release
>and I've built Squid 2.2.STABLE2 with no special options. The cache is
>split across two disks mounted at /usr/local/squid/cache1 and
>/usr/local/squid/cache2. Running Squid with -z to create the cache
>directories went fine and everything looks OK compared to my Linux systems
>(file ownership and permissions). However when I invoke RunCache I get a
>floating point exception reported at the console and Squid dies. This is
Received on Thu May 27 1999 - 05:19:58 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:46:27 MST