From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Lee Harr" <missive(at)hotmail(dot)com> |
Cc: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: Re: Better backtrace (wasRe: pqReadData() -- backend closed the ch |
Date: | 2001-08-01 16:04:24 |
Message-ID: | 10012.996681864@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Well, the bottom line seems to be that there's something broken about
the floating-point support on that box. Look in
/usr/local/pgsql/data/tmp --- I made a trivial test program that just
tries to convert a short integer to a double. I get:
> cat tryit.c
#include <stdio.h>
#include <stdlib.h>
int main()
{
short i = 22;
double d;
d = i;
printf("i = %d, d = %g\n", i, d);
return 0;
}
> gcc tryit.c
> ./a.out
Illegal instruction (core dumped)
> gcc -msoft-float tryit.c
> ./a.out
i = 22, d = 22
> uname -a
FreeBSD jc12.easthighschool.net 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Sat Apr 21 10:54:49 GMT 2001 jkh(at)narf(dot)osd(dot)bsdi(dot)com:/usr/src/sys/compile/GENERIC i386
> gcc -v
Using builtin specs.
gcc version 2.95.3 [FreeBSD] 20010315 (release)
>
I speculate that your box is so old that it has no hardware floating
point at all, and that what we are seeing here is a fault in FreeBSD's
software emulation of the 'fild' (short-to-double) instruction. Or
maybe it's an assembly-time problem. A google search turned up
with the following interesting entry:
2000-05-17 Maciej W. Rozycki <macro(at)ds2(dot)pg(dot)gda(dot)pl>
* i386.h: Use sl_FP, not sl_Suf for fild.
which suggests that older versions of the GNU toolchain may mis-assemble
'fild' instructions.
It'd be worth asking around in BSD-specific mailing lists to see if this
is a known problem; I didn't find anything else in my web search, but I
wasn't trying very hard. I think Postgres is off the hook, in any case.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-08-01 17:36:07 | Re: Re: creating postgres tables using existing table defs |
Previous Message | Mihai Gheorghiu | 2001-08-01 16:00:49 | Re: Corrupted tables? |