You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by ma...@metm.org on 2004/04/14 20:06:24 UTC

Getting more info from segfault

from the debian unstable distribution, I am using the 
  apache-perl ( version 1.3.29.0.2-4 )
  libapache-mod-perl ( version  1.29.0.2-4 )
  libembperl-perl ( version  2.0b10-1 )
packages 

mod-perl works on this server, some old modules I wrote work well out of
their directories.  However when calling for a page from a directory for
which I have enableed Embperl::Object the child segfaults:

[Wed Apr 14 13:42:11 2004] [notice] child pid 7680 exit signal Segmentation fault (11)

This is quite consistent.  

simple mod_perl works:
<Location /test>
    SetHandler  perl-script
    PerlHandler MetM::LookatRequest
</Location>

Embperl doesn't :

<Location /hello>
    PerlSetEnv EMBPERL_OBJECT_BASE _base.epl
    PerlSetEnv EMBPERL_FILESMATCH "\.html"
    PerlHandler Embperl::Object 
    SetHandler  perl-script
    Options ExecCGI 
</Location>

I want to see /hello/index.html processed by Embperl Object with the
_base.epl template.  Processing this page by hand through a small perl
script which calls : Embperl::Object::Execute(); works.

I have the apache logging set to debug, but I see no information in the
logs except for the Segfault everytime there is a request for the /hello
directory.

I am wondering how do I debug this further.  
How do I get more info?  Or is there something obvious I am missing?

Thanks,

-- 
Marco

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Getting more info from segfault

Posted by Marco Scoffier <ma...@metm.org>.
On Thu, Apr 15, 2004 at 08:19:29AM +0200, Gerald Richter wrote:
> Do you load Embperl on server startup?
> 
> Please try to add a
> 
> PerlModule Embperl
> 
> to your httpd.conf.
> 

Yes thank you.  
I could have sworn I had tried every combination of PerlHandler,
PerlRequire and PerlModule.  Now calmly it works :)
My site will be up soon...
thank you,

-- 
Marco

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Getting more info from segfault

Posted by Gerald Richter <ri...@ecos.de>.
Marco Scoffier wrote:
> On Wed, Apr 14, 2004 at 07:19:10PM -0400, Marco Scoffier wrote:
>> Ok I removed all the debian packages and built Apache, mod_perl and
>> Embperl from source.
>>
>>    apache_1.3.29.tar.gz
>>    Embperl-2.0b11.tar.gz
>>    mod_perl-1.0-current.tar.gz
>>
> It has come to my attention that I am mixing Embperl2 with Apache1.3
> which doesn't work.

Embperl 2 works well with Apache 1.3 (and 2.0).

>
>    ERR: 56: : Unknown Provider epcompile
>

Do you load Embperl on server startup?

Please try to add a

PerlModule Embperl

to your httpd.conf.

> <Location /hello>
>     PerlHandler Embperl::Object
>     PerlSetEnv EMBPERL_OBJECT_BASE _base.epl
>     PerlSetEnv EMBPERL_URIMATCH "\.html"
>     SetHandler  perl-script
>     Options ExecCGI
> </Location>

Embperl 2 does not require the PerlSetEnv anymore. If you want to use them,
you must add a

Embperl_UseEnv on

to your httpd.conf

Gerald

---------------------------------------------------------------------------
Gerald Richter            ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl

Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de          Voice:   +49 6133 939-122
WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
---------------------------------------------------------------------------
Besuchen Sie uns auf der CeBIT (18. - 24. März 2004)
Halle 6 Stand B38-452

ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
---------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Getting more info from segfault

Posted by Marco Scoffier <ma...@metm.org>.
On Thu, Apr 15, 2004 at 12:35:47AM -0400, Marco Scoffier wrote:
> It has come to my attention that I am mixing Embperl2 with Apache1.3
> which doesn't work.  I'll try with apache2.0 tommorrow.  Sorry about all
> the mails :)  I guess you have to put the problem out there to see the
> obvious mistake sometimes...
> 
Come to think of it, I wonder why all the tests worked and the example
website ??  Nothing gave me the impression I was doing something stupid
until I tried to access the page from the server.

-- 
Marco

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Getting more info from segfault

Posted by Marco Scoffier <ma...@metm.org>.
On Wed, Apr 14, 2004 at 07:19:10PM -0400, Marco Scoffier wrote:
> Ok I removed all the debian packages and built Apache, mod_perl and
> Embperl from source.
>  
>    apache_1.3.29.tar.gz  
>    Embperl-2.0b11.tar.gz  
>    mod_perl-1.0-current.tar.gz
> 
It has come to my attention that I am mixing Embperl2 with Apache1.3
which doesn't work.  I'll try with apache2.0 tommorrow.  Sorry about all
the mails :)  I guess you have to put the problem out there to see the
obvious mistake sometimes...

Thanks to the responders,

-- 
Marco

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Getting more info from segfault

Posted by Marco Scoffier <ma...@metm.org>.
Ok I removed all the debian packages and built Apache, mod_perl and
Embperl from source.
 
   apache_1.3.29.tar.gz  
   Embperl-2.0b11.tar.gz  
   mod_perl-1.0-current.tar.gz

I ran 'make test' and 'make start' in the Embperl directory, and the
server seems to work, at http://localhost:8531/eg/web.  How could I use
this example to build the begining of my site?

When trying to run the apache server newly installed in
/usr/local/apache, I once again get the dreaded:


   ERR: 56: : Unknown Provider epcompile

(I triple checked that it was the newly compiled one,
and that I had purged the debian one).

Does anyone have any idea what is going on?  Is this a perl problem? I
got rid of every possible weird old module that might be in the path,
and strace httpd -X shows that the correct modules are being loaded.

The test I am running which provokes the crashes or errors is as simple
as I could make it:

$cat hello/_base.epl 
<html>
<head></head>
<body>
<h1>[- Execute ('*') -]</h1>
</body>
</html>

$cat hello/index.html
hello

the lines in httpd.conf look like:

<Location /hello>
    PerlHandler Embperl::Object 
    PerlSetEnv EMBPERL_OBJECT_BASE _base.epl
    PerlSetEnv EMBPERL_URIMATCH "\.html"
    SetHandler  perl-script
    Options ExecCGI 
</Location>

-- 
Marco

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Getting more info from segfault

Posted by Marco Scoffier <ma...@metm.org>.
On Wed, Apr 14, 2004 at 03:44:03PM -0400, Marco Scoffier wrote:
> I got a better error: 
> 
>   ERR: 56: : Unknown Provider epcompile
> 
Now with
  strace apache-perl -X

I get these bits: 


open("/usr/lib/perl5/Embperl/Object.pm", O_RDONLY|O_LARGEFILE) = 4
ioctl(4, TCGETS, 0xbffff1dc)            = -1 ENOTTY (Inappropriate ioctl
for device)
_llseek(4, 0, [0], SEEK_CUR)            = 0
read(4, "\n###############################"..., 4096) = 4096
[...]
read(4, "\n    my $fallback = 0 ;\n    \t\n  "..., 4096) = 4096
read(4, ":Object Application -> init had "..., 4096) = 4096
_llseek(4, 10733, [10733], SEEK_SET)    = 0
_llseek(4, 0, [10733], SEEK_CUR)        = 0
close(4)                                = 0
getpid()                                = 15679
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

It is definitely crashing in Embperl::Object.  I am definitely going to
have to compile this myself I guess.

-- 
Marco

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Getting more info from segfault

Posted by Marco Scoffier <ma...@metm.org>.
I got a better error: 

  ERR: 56: : Unknown Provider epcompile

Thanks,

-- 
Marco

On Wed, Apr 14, 2004 at 02:06:24PM -0400, marco@metm.org wrote:
> [Wed Apr 14 13:42:11 2004] [notice] child pid 7680 exit signal Segmentation fault (11)

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org