> Hi All,
> In the latest CVS I can get the backend to terminate quite
> easily with a divide by 0.
> postgres=> select 1/0;
> pqReadData() -- backend closed the channel unexpectedly.
> This probably means the backend terminated abnormally before or while
> processing the request.
> We have lost the connection to the backend, so further processing is impossible.
> [postgres(at)sparclinux pgsql]$
> A bt on the core shows:-
> I don't know if this is recently introduced behaviour or if
> it's platform dependant. I can't recall trying this before
> so maybe it's always happened on S/Linux.
> My immediate thought is to include a check for divide by 0
> in the intXXdiv() functions and do something like an elog(WARN,...)
> Firstly, what do other people get on their platform?
ttest=> select 1/0;
ERROR: floating point exception! The last floating point operation
either exceeded legal ranges or was a divide by zero
so it looks like the signal. Check these lines:
#$ gid FloatExceptionHandler
backend/postmaster/postmaster.c:1247: pqsignal(SIGFPE, FloatExceptionHandler);
include/tcop/tcopprot.h:37: extern void FloatExceptionHandler(SIGNAL_ARGS);
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)
In response to
pgsql-hackers by date
|Next:||From: Keith Parks||Date: 1998-06-22 22:52:26|
|Subject: Re: [HACKERS] Divide by zero error on SPARC/Linux.|
|Previous:||From: Keith Parks||Date: 1998-06-22 19:40:15|
|Subject: Divide by zero error on SPARC/Linux.|