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

Jeff Hungerford <[email protected]>
Newsgroups gmane.comp.lang.pike.user
Message-ID <[email protected]>
Thanks for that last round of fixes.

I'm still seeing a couple of errors, but not very often.

I do still see the "Attempting to clone an unfinished program" error
from time to time, and I'm not sure what is causing it, but it only
happens when multiple threads are attempting to open the first connections
to a database at the same time.

I've managed to trigger a couple of errors related to acceessing
objects after they've been destroyed, and one fatal error,
which I think is likely due to something deeper in how Pike threads
work, and not directly related to the database driver.


Here are a couple of errors where it looks like destructed objects are
still being accessed:

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

-=-=-=-=-
Lookup in destructed object.
/usr/local/pike/8.0.177/lib/modules/Sql.pmod/pgsql.pike:604:
    unknown function(conxion  fd: -1 input queue: 0/224 queued portals: 1  output queue: 0/224)            
-=-=-=-=-

-=-=-=-=-
/usr/local/pike/8.0.177/lib/modules/Sql.pmod/pgsql.pike:1162: procmessage()
Indexing the NULL value with "trylock".
/usr/local/pike/8.0.177/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.177/lib/modules/Sql.pmod/pgsql.pike:1162: procmessage()
/usr/local/pike/8.0.177/lib/modules/Sql.pmod/pgsql.pike:626:
    _processloop(conxion  fd: 16 input queue: 0/224 queued portals: 1  output queue: 0/224)
-=-=-=-=-

-=-=-=-=-
Indexing the NULL value with "trylock".
/usr/local/pike/8.0.177/lib/modules/Sql.pmod/pgsql_util.pmod:260:
    conxion  fd: 10 input queue: 0/224 queued portals: 1  output queue: 0/224
    ->start(UNDEFINED)
/usr/local/pike/8.0.177/lib/modules/Sql.pmod/pgsql.pike:1162: procmessage()
-=-=-=-=-

Here is the fatal error I triggered; I think it might be a deeper issue
in how threads work. I've saved the core dump if anyone wants me to extract anything from it.
-=-=-=-=-
/home/hungerf3/src/git/pike/src/threads.c:2589: Fatal error: pthread_cond_destroy(&mut->condition)
Unexpected error from thread function: 22
Backtrace at time of fatal:
src/threads.c:3428: unknown function()
/usr/local/pike/8.0.177/lib/modules/Sql.pmod/pgsql_util.pmod:334:
    conxion  fd: -1 input queue: 0/224 queued portals: 1  output queue: 0/224
    ->sendcmd(1,UNDEFINED)
/usr/local/pike/8.0.177/lib/modules/Sql.pmod/pgsql.pike:329:
    pgsql(hungerf3@localhost:5432/hungerf3,12,0)->cancelquery()
/usr/local/pike/8.0.177/lib/modules/Sql.pmod/pgsql.pike:1205:
    pgsql(hungerf3@localhost:5432/hungerf3,12,0)->close()
/usr/local/pike/8.0.177/lib/modules/Sql.pmod/pgsql.pike:1213:
    pgsql(hungerf3@localhost:5432/hungerf3,12,0)->destroy()
/usr/local/pike/8.0.177/lib/modules/Sql.pmod/Sql.pike:372: Sql.Sql()->destroy()
test4.pike:10: /main()->run_test()
zsh: abort (core dumped)  pike test4.pike
-=-=-=-=-

-Jeff
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.