Not really mod_perl but maybe the same issues as the recent Storable. This was experienced on win32 with the following line-up: Apache/2.0.48 (Win32) mod_perl/1.99_12-dev Perl/v5.8.2 + DBI/v1.39 DBD/mysql/v2.9002.
The DBI_01.pm (mp2 handler) below complains about "Attempt to free unreferenced scalar: SV 0x280bac00 at E:/usr/site/lib/DBI.pm line 626" under "heavy" load (try 'ab -n 100 -c 5' or more).
I was unable to recreate the same warnings outside mod_perl (dbi_01_test.pl) but got "free to wrong pool" and segfault instead. This is just by opening and closing a connection so it's a bit strange, since I can do this inside mp2 without any complaints (except when there's many threads operating).
You need to put in your own db details in order for these tests to work (I used the mysql driver so it may also be specific to that one). Steve, do you have any chance to test this?
BTW: I also found threading problems with XML::LibXML and was able to reproduce it in pure perl (generating "free to wrong pool" and "attempt to free unreferenced scalar"). I've posted this to the perl-xml list. Looks like this is a win32 specific problem as well. http://aspn.activestate.com/ASPN/Mail/Message/perl-xml/1972902
-Kurt.
- dbi_01_test.pl (pure perl) -
#!/usr/bin/perl use strict; use threads; use DBI;
my $DB_DATASOURCE = 'your_datasource'; my $DB_USER = 'username'; my $DB_PASSWORD = 'password';
my $t1 = threads->new(\&dbsub); $t1->join();
sub dbsub { my $dbh = DBI->connect( $DB_DATASOURCE, $DB_USER, $DB_PASSWORD ); $dbh->disconnect(); } __END__
- DBI_01.pm (mp2 handler) -
package MyApache::Test::DBI_01;
use strict; use warnings FATAL => 'all', NONFATAL => 'redefine'; use Apache::Const -compile => qw(OK); use Apache::Log; use DBI;
my $DB_DATASOURCE = 'your_datasource'; my $DB_USER = 'username'; my $DB_PASSWORD = 'password';
my $I; my $DBH;
sub handler { my $r = shift; my $data = {}; $I++; print "DBI_01 [$I]\n";
unless ($DBH) { $DBH = DBI->connect( $DB_DATASOURCE, $DB_USER, $DB_PASSWORD ); }
unless ($DBH) { $r->log_error(__PACKAGE__ . ': ' . $DBI::errstr); print "FAILED!\n"; } else { print "OK\n";
my $sth = $DBH->prepare("select * from session"); $sth->execute(); print $sth->rows() . "\n"; $sth->finish();
}
print "done.\n"; return Apache::OK; } 1; __END__
-- Kurt George Gjerde [EMAIL PROTECTED] ICQ:156792385
InterMedia - New Media / Net Based Learning University of Bergen, Norway
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]