Re: [HACKERS] plpython crash (PG 92)

2012-05-02 Thread Peter Eisentraut
On lör, 2012-04-28 at 00:32 -0400, Tom Lane wrote: I'm inclined to think that the best fix is for PLy_spi_execute_fetch_result to copy the tupledesc into TopMemoryContext, not the current context. This is a tad scary from a memory leakage standpoint, but I suppose that if python fails to

Re: [HACKERS] plpython crash (PG 92)

2012-04-27 Thread Peter Eisentraut
On tor, 2012-04-26 at 17:32 +0500, Asif Naeem wrote: PFA test case. It used simple select statement to retrieve data via plpython. It crashes latest pg 9.2 with the following stack trace i.e. Apparently it is being crashed because of invalid related pointer value of pfree()

Re: [HACKERS] plpython crash (PG 92)

2012-04-27 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: I must have been confused about the tuple descriptor APIs. ob-tupdesc is created using CreateTupleDescCopy(), which copies the refcount of the original tuple descriptor, Um, surely not. That would be nonsensical, and anyway a look at the code shows it

Re: [HACKERS] plpython crash (PG 92)

2012-04-27 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On tor, 2012-04-26 at 17:32 +0500, Asif Naeem wrote: PFA test case. It used simple select statement to retrieve data via plpython. It crashes latest pg 9.2 with the following stack trace i.e. Apparently it is being crashed because of invalid related

[HACKERS] plpython crash (PG 92)

2012-04-26 Thread Asif Naeem
Hi, PFA test case. It used simple select statement to retrieve data via plpython. It crashes latest pg 9.2 with the following stack trace i.e. #0 0x0073021f in pfree () #1 0x7fa74b632f7a in PLy_result_dealloc () from /home/masif/work/postgresql/postgresql/inst/lib/plpython2.so

Re: [HACKERS] plpython crash (PG 92)

2012-04-26 Thread Asif Naeem
FYI, I have observed this crash on Linux64. Thanks. Best Regards, Muhammad Asif Naeem On Thu, Apr 26, 2012 at 5:32 PM, Asif Naeem asif.na...@enterprisedb.comwrote: Hi, PFA test case. It used simple select statement to retrieve data via plpython. It crashes latest pg 9.2 with the following