Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DBD-Oracle CPAN distribution.

Report information
The Basics
Id: 55027
Status: resolved
Priority: 0/
Queue: DBD-Oracle

People
Owner: Nobody in particular
Requestors: bohica [...] ntlworld.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.24a
Fixed in: 1.27



Subject: ORA-22922: nonexistent LOB value (DBD ERROR: OCILobFreeTemporary)
Download (untitled) / with headers
text/plain 1.3k
The following code fails with: DBD::Oracle::st DESTROY failed: ORA-22922: nonexistent LOB value (DBD ERROR: OCILobFreeTemporary) [for Statement "BEGIN p_mje(?); END;"]. I'm guessing it is because DBD::Oracle is perhaps not paying attention to InactiveDestroy but that is just a guess. use strict; use warnings; use DBI; use Proc::Fork; use Data::Dumper; use DBD::Oracle qw(:ora_types); my $ph = DBI->connect( "dbi:Oracle:host=xxx;sid=yyy", "xxx", "xxx"); print "ph InactiveDestroy = $ph->{InactiveDestroy}\n"; eval { local $ph->{PrintError} = 0; $ph->do(q/drop table mje/); $ph->do(q/drop procedure p_mje/); }; $ph->do(q/create table mje (a clob)/); $ph->do(<<SQL); create procedure p_mje(a clob) AS BEGIN INSERT INTO mje values(a); END; SQL my $clob = 'x' x 50000; my $st = $ph->prepare(q/BEGIN p_mje(?); END;/); $st->bind_param(1, $clob, {ora_type => ORA_CLOB}); $st->execute; run_fork { child { # my $ch = $ph->clone; $ph->{InactiveDestroy} = 1; # $ph = undef; exit 0; } parent { waitpid $_[0], 0; } }; This was just an inconvenience but now out code disconnect and reconnects it is more than that. Perhaps the following from the Changelog has something to do with it: Fixed memory leak (not releasing Temp Lob with OCILobFreeTemporary) when created for a bind from John Scoles Martin -- Martin J. Evans Wetherby, UK
Download (untitled) / with headers
text/plain 1.7k
On Fri Feb 26 12:54:54 2010, MJEVANS wrote: Show quoted text
> The following code fails with: > > DBD::Oracle::st DESTROY failed: ORA-22922: nonexistent LOB value (DBD > ERROR: OCILobFreeTemporary) [for Statement "BEGIN p_mje(?); END;"]. > > I'm guessing it is because DBD::Oracle is perhaps not paying attention > to InactiveDestroy but that is just a guess. > > use strict; > use warnings; > use DBI; > use Proc::Fork; > use Data::Dumper; > use DBD::Oracle qw(:ora_types); > > my $ph = DBI->connect( > "dbi:Oracle:host=xxx;sid=yyy", > "xxx", "xxx"); > print "ph InactiveDestroy = $ph->{InactiveDestroy}\n"; > > eval { > local $ph->{PrintError} = 0; > $ph->do(q/drop table mje/); > $ph->do(q/drop procedure p_mje/); > }; > $ph->do(q/create table mje (a clob)/); > $ph->do(<<SQL); > create procedure p_mje(a clob) AS > BEGIN > INSERT INTO mje values(a); > END; > SQL > > my $clob = 'x' x 50000; > my $st = $ph->prepare(q/BEGIN p_mje(?); END;/); > $st->bind_param(1, $clob, {ora_type => ORA_CLOB}); > $st->execute;
If you add: $st = undef; here the problem goes away. However, this is really inconvenient as at this stage in my code I have a load of prepared statements which I don't want to re-prepare again after the fork. Show quoted text
> run_fork { > child { > # my $ch = $ph->clone; > $ph->{InactiveDestroy} = 1; > # $ph = undef; > exit 0; > } > parent { > waitpid $_[0], 0; > } > }; > > This was just an inconvenience but now out code disconnect and > reconnects it is more than that. > > Perhaps the following from the Changelog has something to do with it: > > Fixed memory leak (not releasing Temp Lob with OCILobFreeTemporary) > when created for a bind from John Scoles > > Martin
-- Martin J. Evans Wetherby, UK
Download (untitled) / with headers
text/plain 304b
I am now getting ph InactiveDestroy = DBD::Oracle::db clone failed: handle 2 is owned by thread 83ff4 not current thre ad 34a2534 (handles can't be shared between threads and your driver may need a CLONE method added) at release.pl line 33. Can you run your tests again with the Trunk path cheers John
Download (untitled) / with headers
text/plain 550b
On Fri Apr 23 13:03:01 2010, PYTHIAN wrote: Show quoted text
> I am now getting > > ph InactiveDestroy = > DBD::Oracle::db clone failed: handle 2 is owned by thread 83ff4 not > current thre > ad 34a2534 (handles can't be shared between threads and your driver may > need a CLONE method added) at release.pl line 33. > > Can you run your tests again with the Trunk path > > cheers > John
That's more like it. I think I can work this through better now with that error. Will update to the latest and take a look later today. Martin -- Martin J. Evans Wetherby, UK
Download (untitled) / with headers
text/plain 600b
On Mon Apr 26 04:02:34 2010, MJEVANS wrote: Show quoted text
> On Fri Apr 23 13:03:01 2010, PYTHIAN wrote:
> > I am now getting > > > > ph InactiveDestroy = > > DBD::Oracle::db clone failed: handle 2 is owned by thread 83ff4 not > > current thre > > ad 34a2534 (handles can't be shared between threads and your driver
may Show quoted text
> > need a CLONE method added) at release.pl line 33. > > > > Can you run your tests again with the Trunk path > > > > cheers > > John
> > That's more like it. I think I can work this through better now with > that error. Will update to the latest and take a look later today. > > Martin
Download (untitled) / with headers
text/plain 994b
On Fri May 07 12:54:01 2010, PYTHIAN wrote: Show quoted text
> On Mon Apr 26 04:02:34 2010, MJEVANS wrote:
> > On Fri Apr 23 13:03:01 2010, PYTHIAN wrote:
> > > I am now getting > > > > > > ph InactiveDestroy = > > > DBD::Oracle::db clone failed: handle 2 is owned by thread 83ff4 not > > > current thre > > > ad 34a2534 (handles can't be shared between threads and your driver
> may
> > > need a CLONE method added) at release.pl line 33. > > > > > > Can you run your tests again with the Trunk path > > > > > > cheers > > > John
> > > > That's more like it. I think I can work this through better now with > > that error. Will update to the latest and take a look later today. > > > > Martin
>
When I said I can "work this through" I meant I still think there is a problem but this is an improvement which will help to lead to the real problem. By all means leave this rt closed but I will come back to it as the error now suggests the clone method is missing. Martin -- Martin J. Evans Wetherby, UK
Download (untitled) / with headers
text/plain 1.1k
On Fri May 07 14:19:30 2010, MJEVANS wrote: Show quoted text
> On Fri May 07 12:54:01 2010, PYTHIAN wrote:
> > On Mon Apr 26 04:02:34 2010, MJEVANS wrote:
> > > On Fri Apr 23 13:03:01 2010, PYTHIAN wrote:
> > > > I am now getting > > > > > > > > ph InactiveDestroy = > > > > DBD::Oracle::db clone failed: handle 2 is owned by thread 83ff4 not > > > > current thre > > > > ad 34a2534 (handles can't be shared between threads and your driver
> > may
> > > > need a CLONE method added) at release.pl line 33. > > > > > > > > Can you run your tests again with the Trunk path > > > > > > > > cheers > > > > John
> > > > > > That's more like it. I think I can work this through better now with > > > that error. Will update to the latest and take a look later today. > > > > > > Martin
> >
> > When I said I can "work this through" I meant I still think there is a > problem but this is an improvement which will help to lead to the real > problem. By all means leave this rt closed but I will come back to it as > the error now suggests the clone method is missing. > > Martin
This is now working in trunk so I'll close. Martin -- Martin J. Evans Wetherby, UK


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.