Re: problem in cleanup of cursors in oracle.c - can cause php to die!!
| From: | Thies C. Arntzen | Date: | Thu, 22 Apr 1999 12:25:10 +0000 |
| Subject: | Re: problem in cleanup of cursors in oracle.c - can cause php to die!! | ||
| References: | 1 | Groups: | php.dev php.dev |
| Request: | Send a blank email to php-dev+get-5212@lists.php.net to get a copy of this message | ||
On Thu, 22 Apr 1999, Andreas Karajannis wrote:
> "Stig S. Bakken" wrote:
> >
> > "Thies C. Arntzen" wrote:
> > >
> > > hi,
> > >
> > > -- sorry this might be a bit chaotic, but i feel kind-a braindead today - i think the
> > > interesting stuff is the purify log below!!! -
> > >
> > > i've isolated (i think) a real problem in the oracle.c stuff:
> > >
> > > (this problem causes random crashes when you use the oracle driver!)
> > >
> > > the problem is that we do a
> > > _php3_hash_apply(ORACLE_GLOBAL(php3_oracle_module).resource_list,
> > > (int (*)(void *))_cursors_cleanup);
> > >
> > > in line 203 and 216 (_close_orapconn, _close_oraconn) -> but these
> > > functions already get called thru destroy_resource_list which means that
> > > we end up having kind of a recursion - and we're having no control over >
> > > > the order in which things get released -> and we NEED to release cursors BEFORE
> > > connectiond!!!
> >
> > What about not having a list destructor for cursors, but rather release
> > all cursors associated with a connection in the connection destructor?
> >
> > - Stig
> >
>
> It's been a while since I was into the oracle7 module, but if I remember
> things right, this was based on the assumption, that a connection is
> inserted into resource_list _before_ any cursor. On Shutdown, the list
> is destroyed from the beginning, connection before associated cursors.
> If we have 1 connection with 1 cursor, I think the order is:
> destroy_resource_list() -> connection
> _close_ora(p)conn()
> _cursors_cleanup() -> cursor is closed and cursor->open is set to 0,
> connections should be still there - see above
> ologof()
> destroy_resource_list() -> cursor
> _close_oracur() != _cursors_cleanup()
>
> If I get things right, that's hwt Stig suggests.
but as purify never lies;-) - we have a problem down here -> reread the
log i sent....
i'm willing to "fix" it as soon as somebody can tell me how to traverse
the le_conn list.... (hope it's not a RTFM;-)
tc
>
> -Andreas
>
> --
> Andreas Karajannis
> GMD National Research Center for Information Technology
> Schloss Birlinghoven, D-53754 Sankt Augustin
> Phone +49 2241 142948
>
>
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net