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: 92229
Status: resolved
Priority: 0/
Queue: DBD-Oracle

People
Owner: Nobody in particular
Requestors: Detlef.Luetticke [...] materna.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.70



Subject: DBD::Oracle 1.44 crashes multi-threaded Perl application
Date: Fri, 17 Jan 2014 14:20:42 +0000
To: <bug-DBD-Oracle [...] rt.cpan.org>
From: <Detlef.Luetticke [...] materna.de>
Download (untitled) / with headers
text/plain 2.8k
Subject: DBD::Oracle 1.44 crashes multi-threaded Perl application --------------------- used Perl: me@sunny-1/2 (~)> perl -v This is perl 5, version 12, subversion 3 (v5.12.3) built for sun4-solaris-thread-multi-64 Copyright 1987-2010, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. --------------------- used OS: me@sunny-1/1 (~)> uname -a SunOS sunny 5.11 11.1 sun4v sparc SUNW,T5240 --------------------- DBD::Orcle: used version is DBD-Oracle-1.44 -- 23 Apr 2012 --------------------- Description: Running a multi-threaded Perl application with 2 threads using database connections. Each thread holds its own connection handle for db requests. The handles are not shared between the threads. The application aborts without any hint while doing some db stuff more or less in time. A (lucky) truss output locates the crash in the underlying OCI driver (Oracle 11.2.0_64 Patch 11.2.0.3). It seems that the OCI driver prevents a possible core dump, but I am not sure. --------------------- temp. Solution: Getting information from the DBI trace, the DBD::Oracle source and the OCI manual I fixed the problem using an additional undocumented connection attribute (ora_init_mode => 0x03) at application level. This enables the OCI environment in the mode OCI_THREADED (0x02) and OCI_OBJECT (0x01). Currently DBD::Oracle uses only OCI_OBJECT compiled as a multi-threaded Perl module. Fixed line of application code: DBI->connect("dbi:Oracle:foodb","bar","",{RaiseError=>1,ora_init_mode=>0x03}); --------------------- Looking at the source: OCI_THREADED was present up to and including 1.28. Since 1.29_1 (developer version) and 1.30 OCI_THREADED disappeared without any (useful) change comment. I suspect it is a mistake. Changes in DBD-Oracle 1.29_1 [ENHANCEMENTS] - added support for TAF callback (John Scoles) - now trap OCIServerAttach errors (patch by Marc Fielding, applied by Martin J. Evans) [rt68958] - added installation notes for MAC Snow Leopard (Martin J. Evans) - added '/etc' to the search paths for tnsnames.ora (Martin J. Evans, Jay Senseman) [rt67942] - removed support for ProcC connections (John Scoles) ... Version 1.28 source dbdimp.c, line 641, function dbd_db_login6 #if defined(USE_ITHREADS) || defined(MULTIPLICITY) || defined(USE_5005THREADS) init_mode |= OCI_THREADED; #endif --------------------- Looking ahead: Is it possible to reuse the mode OCI_THREADED in the case of using DBD::Oracle in a multi-threaded Perl environment for the next Version of DBD::Oracle. Best regards Detlef Lütticke
Download (untitled) / with headers
text/plain 343b
On Fri Jan 17 09:20:57 2014, Detlef.Luetticke@materna.de wrote: Show quoted text
> > Subject: DBD::Oracle 1.44 crashes multi-threaded Perl application >
Greet find, great diagnosis and excellent solution. Thanks. Yanick, it looks as someone accidentally deleted those 3 lines. It should be easy to put them back. Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #92229] DBD::Oracle 1.44 crashes multi-threaded Perl application
Date: Fri, 17 Jan 2014 10:20:51 -0500
To: bug-DBD-Oracle [...] rt.cpan.org
From: Yanick Champoux <champoux [...] pythian.com>
Download (untitled) / with headers
text/plain 693b
On 1/17/2014, 10:12 AM, Martin J Evans via RT wrote: Show quoted text
> Queue: DBD-Oracle > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=92229 > > > On Fri Jan 17 09:20:57 2014, Detlef.Luetticke@materna.de wrote:
>> >> Subject: DBD::Oracle 1.44 crashes multi-threaded Perl application >>
> > Greet find, great diagnosis and excellent solution. > > Thanks. > > Yanick, it looks as someone accidentally deleted those 3 lines. It should be easy to put them back.
Yup. I'll try to squeeze that in over the week-end. Thanks a lot guys! `/anick -- Yanick Champoux Solutions Architect Pythian - Love your data champoux@pythian.com Tel: +1 613 565 8696 x 274 www.pythian.com -- --


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.