Re: Minimum supported version of Python?
От | Tom Lane |
---|---|
Тема | Re: Minimum supported version of Python? |
Дата | |
Msg-id | 9745.1395863049@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Minimum supported version of Python? (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
I wrote: > Andres Freund <andres@2ndquadrant.com> writes: >> If there's a refcounting bug inside python somewhere (which is easy to >> trigger in python's C interface), it could be excerbated by that change, >> since it frees/compiles functions more frequently. But I'd very much >> like more evidence of this... > I think it's not a refcount issue, or at least not solely that. As best > I can tell, there's a stack clobber involved, because gdb can't make sense > of the stack after the exception hits. I've been trying to localize it > more closely, but it's slow going because Apple's copy of python doesn't > include debug symbols. Fortunately, Apple still has the source code for that package archived at www.opensource.apple.com, so after a bit of hair-pulling I was able to build a version with debug symbols. And (may I have the envelope please) you're right: it is a refcount issue. Take a look at what PLy_modify_tuple does with plntup, and note that the "TD[\"new\"] is not a dictionary" error is intentionally triggered by the plpython_trigger test. So we have a prematurely-freed dictionary item apparently available for recycling even though it's still part of the calling function's parsetree. It's still like that in HEAD, too. Will fix it shortly. I wonder though if there are any more thinkos like this one :-( BTW, isn't plstr totally dead code? regards, tom lane
В списке pgsql-hackers по дате отправления: