The DBI 1.24 docs say: =head2 Threads and Thread Safety If the DBI is built using a Perl that has perl 5.005 style threads enabled then it will use a per-driver mutex to ensure that only one thread is with a driver at any one time. However perl 5.005 style threads are unstable and shoud not be used in production. Perl 5.7 and later support a new threading model called iThreads which is much more stable. However the DBI has not yet had any extra code added or testing done to make sure it works properly with iThreads. So at this time the DBI should not be used with iThreads in situations where more than one thread may enter a cloned instance of the DBI. It is I<possibly> safe to have multiple threads load the DBI module I<after> they have been created, but the DBI probably won't be providing any protection against multiple threads entering a databases own library code. As many databases don't have thread safe libraries that is likely to cause problems. Summary: Using DBI with perl threads of any kind is not recommended for production environments.
=cut Tim. On Wed, Jun 05, 2002 at 12:13:08PM +0200, Jrmy JUST wrote: > On Mon, 3 Jun 2002 19:15:19 +0200 > Jrmy JUST <[EMAIL PROTECTED]> wrote: > > > I use DBI-1.23 and DBD-Oracle-1.12. Everything works well under the > > 5.6.0 environment, but under 5.7.3, tests lead to a core dump, > > without any other error message. > > Follow-up to my previous message: > I finally manage to install DBD-Oracle-1.12. I've tested several options for Perl >compilation. I had to disable "INT64" for DBD-Oracle to work (at the same time, I >changed from cc to gcc, but I don't know if that helped or even if that was >necessary). > > > > But now, I occasionally get "Bus error(coredump)" when I use DBD::Oracle in a >multithreaded script. I don't know yet if there is a mistake in my code or if that >happens while concurrently accessing the database. > Is DBD::Oracle thread-safe or must I lock it by myself? > > > > By the way: I tried to compile DBI-1.24, without success. Version 1.23 compiles >successfully in the same environment. > I past the makelog and the perl environment description. > > > ####################################################################### > > /usr/local/genoplante/bin/perl5.8.0 -p -e "s/~DRIVER~/Perl/g" < >blib/arch/auto/DBI/Driver.xst > Perl.xsi > /usr/local/genoplante/bin/perl5.8.0 >/usr/local/genoplante/lib/perl5/5.8.0/ExtUtils/xsubpp -typemap >/usr/local/genoplante/lib/perl5/5.8.0/ExtUtils/typemap Perl.xs > Perl.xsc && mv >Perl.xsc Perl.c > gcc -c -D_REENTRANT -fno-strict-aliasing -I/usr/local/include -I/usr/gnu/include >-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -DVERSION=\"1.24\" >-DXS_VERSION=\"1.24\" -fPIC >"-I/usr/local/genoplante/lib/perl5/5.8.0/sun4-solaris-thread-multi/CORE" -Wall >-Wno-comment Perl.c > /usr/local/genoplante/bin/perl5.8.0 >/usr/local/genoplante/lib/perl5/5.8.0/ExtUtils/xsubpp -typemap >/usr/local/genoplante/lib/perl5/5.8.0/ExtUtils/typemap DBI.xs > DBI.xsc && mv >DBI.xsc DBI.c > gcc -c -D_REENTRANT -fno-strict-aliasing -I/usr/local/include -I/usr/gnu/include >-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -DVERSION=\"1.24\" >-DXS_VERSION=\"1.24\" -fPIC >"-I/usr/local/genoplante/lib/perl5/5.8.0/sun4-solaris-thread-multi/CORE" -Wall >-Wno-comment DBI.c > DBI.xs: In function `dbi_profile': > DBI.xs:1841: `PERINTERP' undeclared (first use in this function) > DBI.xs:1841: (Each undeclared identifier is reported only once > DBI.xs:1841: for each function it appears in.) > DBI.c: In function `XS_DBD_____st_fetchrow_hashref': > DBI.xs:3396: warning: unused variable `PERINTERP' > DBI.xs: In function `XS_DBD_____common_set_err': > DBI.xs:3585: warning: unused variable `PERINTERP' > make: *** [DBI.o] Error 1 > > ####################################################################### > ## perl5.8.0 -V > > Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: > Platform: > osname=solaris, osvers=2.7, archname=sun4-solaris-thread-multi > uname='sunos pascal 5.7 generic_106541-19 sun4u sparc ' > config_args='-Dcc=gcc -Uusemymalloc' > hint=recommended, useposix=true, d_sigaction=define > usethreads=define use5005threads=undef useithreads=define usemultiplicity=define > useperlio=define d_sfio=undef uselargefiles=define usesocks=undef > use64bitint=undef use64bitall=undef uselongdouble=undef > usemymalloc=n, bincompat5005=undef > Compiler: > cc='gcc', ccflags ='-D_REENTRANT -fno-strict-aliasing -I/usr/local/include >-I/usr/gnu/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', > optimize='-O3', > cppflags='-D_REENTRANT -fno-strict-aliasing -I/usr/local/include >-I/usr/gnu/include' > ccversion='', gccversion='2.95.2 19991024 (release)', gccosandvers='solaris2.7' > intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 > ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 > alignbytes=8, prototype=define > Linker and Libraries: > ld='gcc', ldflags =' -L/usr/local/lib -L/usr/gnu/lib ' > libpth=/usr/local/lib /usr/gnu/lib /usr/lib /usr/ccs/lib > libs=-lsocket -lnsl -ldl -lm -lrt -lpthread -lc > perllibs=-lsocket -lnsl -ldl -lm -lrt -lpthread -lc > libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' > cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib -L/usr/gnu/lib' > > > Characteristics of this binary (from libperl): > Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES >PERL_IMPLICIT_CONTEXT > Built under solaris > Compiled at Jun 4 2002 17:52:43 > @INC: > /usr/local/genoplante/lib/perl5/5.8.0/sun4-solaris-thread-multi > /usr/local/genoplante/lib/perl5/5.8.0 > /usr/local/genoplante/lib/perl5/site_perl/5.8.0/sun4-solaris-thread-multi > /usr/local/genoplante/lib/perl5/site_perl/5.8.0 > /usr/local/genoplante/lib/perl5/site_perl/5.6.0 > /usr/local/genoplante/lib/perl5/site_perl > . > > > -- > Jrmy JUST <[EMAIL PROTECTED]>
