I am trying to write a simple threaded perl CGI script to run under Apache::Registry on mod_perl 1.29 and Apache 1.3.33.
The perl scipt only creates 2 or 3 threads and perform a join() on each one to wait for data each thread returns. The script seems to work fine, returning all the data I expect and all the HTML is generated using CGI.pm, thus rendering a complete and accurate page in a web browser. On the server I get errors in my Apache error_log:
[Thu May 5 01:01:03 2005] null: semi-panic: attempt to dup freed string.
[Thu May 5 01:01:03 2005] [error] Undefined subroutine &main:: called.\n
[Thu May 5 01:01:03 2005] null: semi-panic: attempt to dup freed string.
[Thu May 5 01:01:03 2005] [error] Undefined subroutine &main:: called.\n
[Thu May 5 01:01:04 2005] [notice] child pid 13166 exit signal Segmentation fault (11), possible coredump in /usr/local/dmx/www
Running on RH 9 Linux - Perl 5.8.6, Apache 1.3.33, and mod_perl 1.29 all built by myself from source (not using RPM's)
Any Ideas? Thanks...
Certainly, Bill.
The short answer: mod_perl1 can't be used with perl ithreads.
The longer answer: I'm now working on making mp2 thread safe, you can try this branch:
https://svn.apache.org/repos/asf/perl/modperl/branches/clone-skip-unstable/
If you are interested I can explain why this is happening, and how we are going to fix it.
In any case, at the moment perl threads suck and I won't suggest to use them in production in the general case. It may work for you in certain cases. Try using the threads emulation with Liz's forks.pm from CPAN.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com