Thanks for the response Tim.

Commenting out this line appears to have fixed the first problem. It no
longer dies when it clones the process.
>   DBIS->logfp  = parent_dbis ? fp_dup(parent_dbis->logfp,'>',0) :
>   PerlIO_stderr();

If you would still like to see the stack trace, I can uncomment the line
and run the program again.  I don't know how to make perl dump the core
on a crash though,  so the specific flag to pass or info about what I
need to do to get stack trace would be appreciated.

I'm still having trouble though with connecting to the database after
each thread starts.

Through the archive,  I found the reference for the ora_init_mode
needing to be OCI_THREADED and OCI_OBJECT or'd together.
#define OCI_THREADED  0x01     /* the application is in threaded
environment */
#define OCI_OBJECT    0x02       /* the application is in object
environment */

So I added ora_init_mode => 3 to my connect args.

the basic premise of the code is this:
disconnect the db
start new thread
connect to db inside of thread
whatever I need to do.

I turned tracing to 5 to see If I could get any help from it.  It
reports

disconnecting
connecting to db
    DBI 1.30-ithread dispatch trace level set to 5
    -> DBI->connect(dbi:Oracle:mfm, USERNAME, ****, HASH(0x8be139c))
    -> DBI->install_driver(Oracle) for linux perl=5.008 pid=25587
ruid=500 euid=500
       install_driver: DBD::Oracle version 1.12 loaded from
/home/mm/installs/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi/DBD
/Oracle.pm
    <- install_driver= DBI::dr=HASH(0x8b6cb08)

And then nothing more.  When I do a connection before the threading,
There is a huge amount of output.  I also don't see the connections
establish with netstat -atn.



Scott

On Mon, 12 Aug 2002 08:06:44 +0100
Tim Bunce <[EMAIL PROTECTED]> wrote:
> On Fri, Aug 09, 2002 at 06:16:08PM +0000, Scott Alexander wrote:
> > I'm doing some testing with perl 5.8.0 and trying to use DBI.  I
> > know that the DBI and ithreads are listed as beta and not production
> > ready, but the problem I think I'm having is that this fails to even
> > make the clone.  It never gets to using the dbi itself.
> > 
> > The script is a Sendmail::Milter filter that I'm working on.  It
> > dies right after I make a connection to the sendmail engine.  Thats
> > why I'm pretty sure that this is caused by the cloning.
> > 
> > The actual error is:
> > Starting Sendmail::Milter 0.18 engine.
> > Assertion tbl failed: file "sv.c", line 8798
> 
> That's Perl_ptr_table_fetch(). A stack trace from the core file
> would be a big help.

> > at
> > /home/mm/installs/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi
> > /DBI.pm line 425.
> 
> That's inside the DBI's CLONE sub. Try commenting out this line in
> DBI.xs:
>   DBIS->logfp  = parent_dbis ? fp_dup(parent_dbis->logfp,'>',0) :
>   PerlIO_stderr();


 
> > Is this just something where I need to wait for the next version of
> > DBI?
> 
> Nope. At this stage I'm not using or testing or developing threads
> support for DBI.  I'm just responding to any issues that crop up.
> 
> > Does DBD::Oracle not support this yet?
> 
> See archives for some changes you can make to DBD::Oracle to improve
> things. The next release will be better.
> 
> Tim.

Reply via email to