Hi.. I'm trying to get session handling (%udat and %mdat) to work with
embperl 1.2b11.

I'm running stock redhat 6.1 on a p200; this comes with apache 1.3.9,
mod_perl 1.21, and perl 5.00503. I installed embperl 1.2b11 and
Apache::Session 1.04. I had previously installed and was using MySQL
3.22.27 with the latest version of DBI and DBD::mysql. 

Anyway, the symptoms are as follows: Everything works fine with
embperl normally, but when I add the following lines to my srm.conf
Bad Things Happen:

PerlSetEnv EMBPERL_SESSION_CLASSES "DBIStore SysVSemaphoreLocker"
PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:session UserName=apache"

The database exists, and the "sessions" table is set up as per the
Apache::Session::DBIStore documentation.

I performed a little bit of poking with strace and the single spawned
child httpd seems to be sigsegv'ing right after it stats Embperl.pm
and Embperl.bs, and before it attempts to open Embperl.. Here's a typical occurance:

Filehandle 5 is open("/usr/lib/perl5/site_perl/5.005/i386-linux/HTML/Embperl.pm", 
O_RDONLY) = 5

Here's a cleaned-up version of what strace says about what's happening... (I've 
cleaned out the multitude of brk(3)'s and rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 
0). 

munmap(0x40215000, 4096)                = 0
read(5, "isableHtmlScan         => 512 ;\n"..., 4096) = 4096
read(5, "l \'use Apache::Constants qw(:com"..., 4096) = 4096
read(5, "lit (/&/, $info) ;\n    my $cnt ="..., 4096) = 4096
read(5, "e\'}    = $ENV{EMBPERL_ESCMODE} }"..., 4096) = 4096
read(5, ": $@\" if ($@); \n\t    require CGI"..., 4096) = 4096
read(5, "\t    {\n\t    push @cleanups, \'dbg"..., 4096) = 4096
read(5, "G \"i = $req{\'inputfile\'}\\n\" ;\n\n "..., 4096) = 4096
read(5, " {\n\t        local(*ENTRY) = $val"..., 4096) = 4096
read(5, "\n\n    $response = $ua->request($"..., 4096) = 4096
read(5, "    = \\$HTML::Embperl::optDisabl"..., 4096) = 4096
read(5, "or $package\\:\\:$k -> $caller\\n\" "..., 4096) = 4096
read(5, "      $ok and $ok = $smtp->datas"..., 4096) = 1190
read(5, "", 4096)                       = 0
close(5)                                = 0
munmap(0x40017000, 4096)                = 0
stat("/usr/lib/perl5/5.00503/i386-linux/auto/HTML/Embperl", 0xbfffd898) = -1 ENOENT 
(No such file or directory)
stat("/usr/lib/perl5/5.00503/auto/HTML/Embperl", 0xbfffd898) = -1 ENOENT (No such file 
or directory)
stat("/usr/lib/perl5/site_perl/5.005/i386-linux/auto/HTML/Embperl", 
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/perl5/site_perl/5.005/i386-linux/auto/HTML/Embperl/Embperl.so", 
{st_mode=S_IFREG|0555, st_size=145024, ...}) = 0
stat("/usr/lib/perl5/site_perl/5.005/i386-linux/auto/HTML/Embperl/Embperl.bs", 
{st_mode=S_IFREG|0444, st_size=0, ...}) = 0
--- SIGSEGV (Segmentation fault) ---

So it looks like it's reading embperl.pm, finishes with that, then
stats those other files for some reason, then crashes.


The exact same thing happens when those environment variables aren't
set, but it continues to do the following stuff:

stat("/usr/lib/perl5/site_perl/5.005/i386-linux/auto/HTML/Embperl/Embperl.bs", {
st_mode=S_IFREG|0444, st_size=0, ...}) = 0
open("/usr/lib/perl5/site_perl/5.005/i386-linux/auto/HTML/Embperl/Embperl.so", O
_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0555, st_size=145024, ...}) = 0
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320}\0"..., 4096) = 409
6
mmap(0, 130380, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x40255000
mprotect(0x40271000, 15692, PROT_NONE)  = 0
mmap(0x40271000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0x1b000) = 
0x40271000
mmap(0x40274000, 3404, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 
0) = 0x40274000
close(5)

and then it goes on to read and process the actual .epl source file.


If it's producing a core file when it sigsegv's, I can't find what it
did with it.

Any thoughts?

Reply via email to