Re: [BUGS] The postmaster keeps crashing

2003-11-09 Thread Micah Yoder
On Saturday 08 November 2003 12:53 pm, Tom Lane wrote:
> Yeah, it does.  Have you tried running memtest86?
>
> It could also be a kernel problem --- I'm not sure 2.4.16 had all the
> SMP bugs flushed out of it.  Consider getting a later kernel.

Thanks.

It's a virtual server and I don't run it, so none of that is up to me.  But I 
think they'll move me to another box.


-- 
Yoder Internet Development
Honest and Affordable Web Development and Linux consulting
http://yoderdev.com


---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [BUGS] PostgreSQL 7.4RC1 crashes on Panther

2003-11-09 Thread Scott Goodwin
Awesome! Thanks so much for the fix -- I depend on PostgreSQL and Tcl 
on my powerbook to do development work.

cheers,

/s.

On Nov 8, 2003, at 2:09 PM, Tom Lane wrote:

It turns out that the "createlang pltcl" failure on OS X 10.3 was due 
to
our ps_status code doing the wrong thing.  I have committed a fix.

			regards, tom lane


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
 subscribe-nomail command to [EMAIL PROTECTED] so that your
 message can get through to the mailing list cleanly


[BUGS] 7.4RC1 et al: cannot find block containing chunk

2003-11-09 Thread Robert Greimel

POSTGRESQL BUG REPORT TEMPLATE



Your name   :   Robert Greimel
Your email address  :   greimel ( at ) ing ( dot ) iac ( dot ) es


System Configuration
-
  Architecture (example: Intel Pentium) : Intel Pentium
  AMD Athlon

  Operating System (example: Linux 2.0.26 ELF)  : Linux 2.4.18 ELF (RedHat-8)
  Linux 2.4.22 ELF (homegrown)

  PostgreSQL version (example: PostgreSQL-7.3):   PostgreSQL-7.4RC1
  PostgreSQL-7.2.3
  PostgreSQL-7.2.2

  Compiler used (example:  gcc 2.95.2)  : gcc 3.2


Please enter a FULL description of your problem:


7.2.2 and RedHat 8
===
using PostgreSQL-7.2.2 and several user defined C function - dynamically loaded
from one .so file - I (sometimes) see the following error message doing the
following query:

>psql database
=# SELECT id,deg2ra(ra),deg2dec(dec),frames FROM Fields;
ERROR:  AllocSetFree: cannot find block containing chunk 0x83a5300

Here deg2dec and deg2ra are user functions defined as
CREATE FUNCTION deg2dec(float4) RETURNS text AS '/some/path/coord.so','deg2dec_float4' 
LANGUAGE C WITH (isStrict);
CREATE FUNCTION deg2dec(float8) RETURNS text AS '/some/path/coord.so','deg2dec_float8' 
LANGUAGE C WITH (isStrict);
CREATE FUNCTION deg2ra(float4) RETURNS text AS '/some/path/coord.so','deg2ra_float4' 
LANGUAGE C WITH (isStrict);
CREATE FUNCTION deg2ra(float8) RETURNS text AS '/some/path/coord.so','deg2ra_float8' 
LANGUAGE C WITH (isStrict);

and ra and dec are defined as REAL in table Fields.

The query
>psql database
=# SELECT id,ra,deg2dec(dec),frames FROM Fields;
  id   |   ra|deg2dec| frames 
---+-+---+
 3706  | 99.4405 | -04:16:00.001 | {0}
...
(deg2ra function removed) works. There is only a minute difference in the
code for deg2dec and deg2ra, so I am fairly certain that its not a programming
error on my part - although this is my first go on extending Postgres.

Calling (in a new psql session) the deg2ra function once before the query
>psql database
=# SELECT deg2ra(300);
deg2ra
--
 20:00:00.000
(1 row)
=# SELECT id,deg2ra(ra),deg2dec(dec),frames FROM Fields;
  id   |deg2ra|deg2dec| frames 
---+--+---+
 3706  | 06:37:45.720 | -04:16:00.001 | {0}
...
makes the query work !!!

7.2.3 and RedHat 8
==
using PostgreSQL-7.2.3 the same error is produced as in 7.2.2 .

However, the workaround of calling deg2ra before doing the query no longer
works. The single "SELECT deg2ra(300)" works - and I have never seen it fail -
but the table query afterwards produces the AllocSetFree error.

However, explicitly loading the dynamic code makes the query work again:
>psql database
=# LOAD '/some/path/coord.so';
=# SELECT id,deg2ra(ra),deg2dec(dec),frames FROM Fields;
  id   |deg2ra|deg2dec| frames 
---+--+---+
 3706  | 06:37:45.720 | -04:16:00.001 | {0}
...
works !!!

Interestingly, reversing the columns that call the functions also makes the
query work (this does not need an explicit LOAD or single SELECT before):
>psql database
=# SELECT id,deg2dec(dec),deg2ra(ra),frames FROM Fields;
  id   |deg2dec|deg2ra| frames 
---+---+--+
 3706  | -04:16:00.001 | 06:37:45.720 | {0}
...
works !!!

7.4RC1 and my own homegrown Linux
=
PostgreSQL-7.4RC1 still has the problem, but in a slightly different form.
The error is now

ERROR:  could not find block containing chunk 0x82eff00

This time I also experimented with debug levels. For a straight query there
was a slight difference in the reported error for the different debug levels,
but none worked:

postmaster (without debug, -d 1 and -d 2)
>psql database
=# SELECT id,deg2dec(dec),deg2ra(ra),frames FROM Fields;
ERROR:  could not find block containing chunk 0x82eca00

postmaster (-d 3 and -d 4)
>psql database
=# SELECT id,deg2dec(dec),deg2ra(ra),frames FROM Fields;
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!> \q

Doing the single SELECT before the query gives also different results depending
on debug level - it works for high debug levels but not for low:

postmaster (without debug, -d 1 and -d 2)
>psql database
=# SELECT deg2ra(300);
deg2ra
--
 20:00:00.000
(1 row)

=# SELECT id,deg2dec(dec),deg2ra(ra),frames 

Re: [BUGS] 7.4RC1 et al: cannot find block containing chunk

2003-11-09 Thread Peter Eisentraut
Robert Greimel writes:

> using PostgreSQL-7.2.2 and several user defined C function - dynamically loaded
> from one .so file - I (sometimes) see the following error message doing the
> following query:
>
> >psql database
> =# SELECT id,deg2ra(ra),deg2dec(dec),frames FROM Fields;
> ERROR:  AllocSetFree: cannot find block containing chunk 0x83a5300

Apparently, the implementation of that function contains a bug in the
memory handling.

-- 
Peter Eisentraut   [EMAIL PROTECTED]


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [BUGS] 7.4RC1 et al: cannot find block containing chunk

2003-11-09 Thread Tom Lane
[EMAIL PROTECTED] (Robert Greimel) writes:
> using PostgreSQL-7.2.2 and several user defined C function - dynamically loaded
> from one .so file - I (sometimes) see the following error message doing the
> following query:

> ERROR:  AllocSetFree: cannot find block containing chunk 0x83a5300

This indicates that somebody is pfree'ing a pointer that did not come
from palloc, or possibly pfree'ing the same pointer twice.  It could be
that the bad pfree is the indirect result of an earlier memory clobber,
too.

Given that you are using user-defined C functions it seems highly likely
that the bug is in your code and not Postgres.  If you can reproduce the
bug without any of your own C functions having been executed, please
send along a script that does it ...


regards, tom lane

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [BUGS] Autocomplete on Postgres7.4beta5 not working?

2003-11-09 Thread Gaetano Mendola
Bruce Momjian wrote:

This now works in current CVS and will be in 7.4 final:
Thank you.

regards
Gaetano Mendola
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match