Re: Pike 8.0: Sql.pgsql objects don't get garbage collected?

"Stephen R. van den Berg" <[email protected]>
Newsgroups gmane.comp.lang.pike.user
Message-ID <[email protected]>
Jeff Hungerford wrote:
>Debug builds tend to abort with a core dump after a few minutes
>of testing; It looks like the "exception in destruct()" check 
>which is only enabled in debug builds gets triggered. (object.c:816)

This is one of the worst misfeatures of Pike; what is the reason
exceptions in destroy() handlers don't evoke standard exception
processing?  I have to revert to silly things as sprinkling in catch
statements (which only serves to hide problems).

Nonetheless, this bug should be fixed now.

>/home/hungerf3/git/pike/src/threads.c:2571: Fatal error:
>Mutex unlock from wrong key 0xf7 != 0x11dd618!
>Pike was in GC stage 400 when this fatal occurred.

I'm not even sure I understand what happened here.  Smells like a bug in
Pike.  The current patches might circumvent this bug so it doesn't happen
anymore.

>It looks like there is an issue with multiple threads trying to open a
>connection at the same time; I've seen the following often when
>starting up a bunch of test workers at the same time:
>-=-=-=-=-
>Attempting to clone an unfinished program
>/usr/local/pike/8.0.175/lib/modules/Sql.pmod/Sql.pike:342:
>    Sql.Sql()->create("localhost:5432","hungerf3","hungerf3","CENSORED",UNDEFINED)

Again, I'm not quite sure what happened here.  Anyone?
It's unlikely that the last patch will fix this one, though one could hope.

>Lookup in destructed object.
>/usr/local/pike/8.0.175/lib/modules/Sql.pmod/pgsql.pike:604:

Fixed.

>Unknown program: destructed object->function()
>/usr/local/pike/8.0.175/lib/modules/Sql.pmod/pgsql.pike:627:

Fixed.

>Indexing the NULL value with "i".
>/usr/local/pike/8.0.175/lib/modules/Sql.pmod/pgsql.pike:635:
>    pgsql(hungerf3@localhost:5432/hungerf3,0,24878)->procmessage()

Fixed.

>Indexing the NULL value with "trylock".
>/usr/local/pike/8.0.175/lib/modules/Sql.pmod/pgsql_util.pmod:175:
>    Sql.pgsql_util.bufcon(0 bytes, read=[..-1] data=[0..-1]
>    free=[0..0] string
>    )->sendcmd(1,UNDEFINED)
>/usr/local/pike/8.0.175/lib/modules/Sql.pmod/pgsql.pike:1165:
>    unknown function()

Probably fixed.

>Indexing the NULL value with "trylock".
>     /usr/local/pike/8.0.175/lib/modules/Sql.pmod/pgsql_util.pmod:257:
>     conxion  fd: -1 input queue: 0/224 queued portals: 1
>     output queue: 0/224
>     ->start(UNDEFINED)

Probably fixed.


>And one random error with no useful info as to from whence it came:

>Attempt to call the NULL-value
>Unknown program:
>    0(conxion  fd: -1 input queue: 0/224 queued portals: 1  output

Most likely fixed as well.

>Let me know if there is any more info I can provide.

Best would probably be to grab the latest version and see if you can still
break it.
I changed the destruction of objects to synchronise with the natural extinction
of the threads.  This might/should fix all the accessing-member-in-destructed-
object occurrences.
-- 
Stephen.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.