Re: perl_alloc or perl_clone?

[email protected] (Stas Bekman)
Newsgroups perl.ithreads
Organization Hope, Humanized
Message-ID <[email protected]>
JD Brennan wrote:
> I've finally moved to Perl 5.8.7 (ActiveState) for my
> Java application that uses perlembed (using JPerl as
> a JNI wrapper).
> 
> With Perl 5.6 we got sporadic crashes, but it seems
> the threading support in 5.8 is ready for prime-time,
> so I removed the mutex synchronizing all the Perl calls
> and the crashes are much less frequent, but alas,
> the app still crashes maybe once every 20,000 perl calls
> or so:
> 
> Unexpected Signal : 11 occurred at PC=0xE6BBDF60
> Function=[Unknown. Nearest: Perl_savesvpv+0x70]
> Library=/export/home0/brennan/dev/mainline/lib/JPerl/solaris/libjperl.so
> 
> I'm wondering if switching to perl_clone() instead
> of perl_alloc() would help.  I haven't totally narrowed
> it down yet, but it's crashing in one of these 3 routines:
> 
> perl_alloc()
> perl_construct()
> perl_parse()
> 
> Apache modperl2 uses perl_clone().  Doesn't seem there
> is much advantage to it, and it probably calls perl_alloc()
> under the covers anyway.
> 
> I've googled and read the perlemb and perlthrtut, but I'm
> not sure what to try next.

I'm not familiar with activeperl, but perl_clone and perl_alloc aren't the 
same thing. You must run perl_clone if you want to start an ithread.

-- 
_____________________________________________________________
Stas Bekman mailto:[email protected]  http://stason.org/
MailChannels: Assured Messaging(TM) http://mailchannels.com/
The "Practical mod_perl" book       http://modperlbook.org/
http://perl.apache.org/ http://perl.org/ http://logilune.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.