You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Kee Hinckley <na...@somewhere.com> on 2002/03/19 16:38:24 UTC
Errors enabling Embperl 2.0b6
I have a clean running system with HTML::Embperl.
I've installed Embperl 2.0b6.
So far so good.
Then I add:
PerlModule Embperl
to my config file, but change nothing else.
Now when I access an HTML::Embperl driven site, I get:
dyld: /usr/local/apache/bin/httpd multiple definitions of symbol
_EMBPERL_mgGetEscMode
/Library/Perl/darwin/auto/Embperl/Embperl.bundle definition of
_EMBPERL_mgGetEscMode
/Library/Perl/darwin/auto/HTML/Embperl/Embperl.bundle definition of
_EMBPERL_mgGetEscMode
I suspect I'm running into shared library issues on MacOS X. Any suggestions?
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Kee Hinckley <na...@somewhere.com>.
At 9:23 PM +0100 3/21/02, Gerald Richter wrote:
>There is one thing we can try, in epapinit.c comment out line 163:
>
>ap_remove_module (&embperl_module) ;
No go.
>
>
>If this all doesn't help, then search for all
>
> cfg -> bUseEnv = -1 ;
If I turn off the directives, I still crash with other problems, so I
don't see this as solving anything.
I put in some debugging in the command processer. The embperl module
is *not* being checked during command processing. So it still looks
to me as though the module is only being partially loaded. I'm
continuing to investigate.
What version of Apache and mod_perl are you using? I'm using 1.3.23 and 1.26.
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Kee Hinckley <na...@somewhere.com>.
Life just got more interesting. I was right, but it turns out there
is a solution for this in mod_perl, but it's not working.
perl_section_self_boot has the following comment:
/* make sure this module is re-loaded for the second config read */
However that code is not being executed.
BUT, if I add the following to my config file:
<perl>
</perl>
then it gets executed.
I discovered that when I went to add my own section to see if I could
hand delete the $INC entry to force a reload, and lo... it did it for
me.
So, a step forward. Now we're dying here:
#0 0x4be4f5c8 in Perl_hv_fetch_ent ()
#1 0x4be587ec in Perl_pp_helem ()
#2 0x4be53e28 in Perl_runops_standard ()
#3 0x4be042a4 in S_call_body ()
#4 0x4be03f50 in perl_call_sv ()
#5 0x4be039cc in perl_call_method ()
#6 0x00441af4 in embperl_CreateSessionObject ()
#7 0x00442120 in embperl_SetupSessionObjects ()
#8 0x00442488 in embperl_SetupApp ()
#9 0x00444354 in embperl_Init ()
#10 0x0043f168 in embperl_ApacheInit ()
#11 0x000409f0 in ap_init_modules ()
#12 0x0002dc6c in main ()
#13 0x00002410 in _start ()
#14 0x00002240 in start ()
Also, I'm seeing this:
loading perl module 'Tie::IxHash'...not ok
Earlier, I got this message, although now it's gone away.
Bizarre copy of ARRAY in sassign at /usr/local/apache/conf/srm.conf line 16.
[19166]ERR: 66: Embperl Session handling DISABLED because of the
following error: Bizarre copy of IO in anonhash at
/Library/Perl/Apache/SessionX.pm line 57.
Set EMBPERL_SESSION_HANDLER_CLASS to 'no' to avoid this message.
Anyway, I installed Tie::IxHash, and that message went away. I
reinstalled SessionX... and now the module isn't getting init'd the
second time, even though the delete $ENV{"Embperl.pm"} call is being
made. This is getting too weird.
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Gerald Richter <ri...@ecos.de>.
>
> Do you have a startup.pl, or anything else that would cause mod_perl
> to run code during initialization? I suspect that's all it takes.
>
Yes, a startup.pl
>
> Well, that makes me feel a bit better. This was getting so weird
> that there was always this feeling in the back of my mind that maybe
> I was doing something stupid. Do you know what OS they are running?
Linux and Perl 5.005_03
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Kee Hinckley <na...@somewhere.com>.
At 8:02 AM +0100 3/22/02, Gerald Richter wrote:
> > I have to have a
>> <perl>
>> </perl>
>> block in the config file.
>>
>
>Mmh, I never had a need to do this...
Do you have a startup.pl, or anything else that would cause mod_perl
to run code during initialization? I suspect that's all it takes.
>
>> embperl_ApacheInitCleanup has to call ap_remove_module
>> (&embperl_module) every time, not just when mod_perl.c is dynamic.
>>
>
>That's what I first also had, but when you call it always it won't work on
>my static compiled mod_perl's anymore.
Hmm, and mine is static and needs it. Clearly another variable here.
>For the static builds that I had tested, the Perl interpreter was only
>initialized once, so Embperl must only initalize once, while for dynamic
>builds mod_perl is unloaded after the first pass and Embperl has to make
>sure it gets unloaded before (that's what embperl_ApacheInitCleanup does)
One work-around I thought about was forcing mod_perl to shutdown when
the config file is re-read, but that seemed a bit too much like a
hack, although there's a certain logic to it.
>Yesterday I talked to somebody who has exactly the same problem as you and
>is not running mac osx, so maybe we find out what specifc on those
Well, that makes me feel a bit better. This was getting so weird
that there was always this feeling in the back of my mind that maybe
I was doing something stupid. Do you know what OS they are running?
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Gerald Richter <ri...@ecos.de>.
> Good news. I have it somewhat working.
:-)
> I still can't get any
> directives read on the second pass, but I can get it to run.
:-(
>They
> key items:
>
> I have to have a
> <perl>
> </perl>
> block in the config file.
>
Mmh, I never had a need to do this...
> embperl_ApacheInitCleanup has to call ap_remove_module
> (&embperl_module) every time, not just when mod_perl.c is dynamic.
>
That's what I first also had, but when you call it always it won't work on
my static compiled mod_perl's anymore.
I don't know why Apache loads it's modules two times, but it causes a lot of
trouble. When I developed this code I spend a lot of time on it, to get it
working with several different configuartions, but as we learned there are
even more different ways it has to be done :-(
For the static builds that I had tested, the Perl interpreter was only
initialized once, so Embperl must only initalize once, while for dynamic
builds mod_perl is unloaded after the first pass and Embperl has to make
sure it gets unloaded before (that's what embperl_ApacheInitCleanup does)
What's happeing at your system is something inbetween.
Yesterday I talked to somebody who has exactly the same problem as you and
is not running mac osx, so maybe we find out what specifc on those
configuration, so I can reproduce it here...
> Good night. And have a good vacation--you've done an incredible job
> with Embperl.
Thanks for debugging this
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Kee Hinckley <na...@somewhere.com>.
Good news. I have it somewhat working. I still can't get any
directives read on the second pass, but I can get it to run. They
key items:
I have to have a
<perl>
</perl>
block in the config file.
embperl_ApacheInitCleanup has to call ap_remove_module
(&embperl_module) every time, not just when mod_perl.c is dynamic.
Good night. And have a good vacation--you've done an incredible job
with Embperl.
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Kee Hinckley <na...@somewhere.com>.
I have a theory which may or may not be correct, but I'm not sure
where to go next.
Embperl is loading and executing just fine the first time.
However the second time the config file is read (by standalone_main)
it is *not* loaded properly. This is true whether or not
standalone_main is executed in the same process (-X) or in a child
process.
(At some point someone should explain to me why Apache dynamically
loads all its modules and the "unloads" them and does it all over
again. I see that mod_auth_digest explicitly does nothing on the
first load, since it knows there's a second one coming._
MOD_PERL_TRACE=all sudo /usr/local/apache/bin/httpd -X
perl_parse args: '/dev/null' ...allocating perl interpreter...ok
constructing perl interpreter...ok
ok
running perl interpreter...ok
mod_perl: 0 END blocks encountered during server startup
loading perl module 'Apache'...loading perl module
'Apache::Constants::Exports'...ok
ok
PerlModule: arg='Embperl'
loading perl module 'Embperl'...ok
## The next call results from the PerlHandler, so all is well
init `PerlHandler' stack
perl_cmd_push_handlers: @PerlHandler, 'Embperl'
pushing `Embperl' into `PerlHandler' handlers
## At this point standalone_main runs, and the output goes to the log file
loading perl module 'Apache'...ok
perl_startup: perl aleady running...ok
loading perl module 'Apache'...ok
cleanup_sv: SvREFCNT(0xf1738)==1
loading perl module 'Apache'...ok
loading perl module 'Apache'...ok
PerlModule: arg='Embperl'
loading perl module 'Embperl'...ok
## The next thing should be the PerlHandler call
## But we never make it that far.
Syntax error on line 28 of /usr/local/apache/conf/srm.conf:
Invalid command 'EMBPERL_APPNAME', perhaps mis-spelled or defined by
a module not included in the server configuration
If we move EMBPERL_APPNAME until after the PerlHandler, the first
pass works fine, the second place manages the PerlHandler just fine,
but we still die on the EMBPERL_APPNAME.
If I take out the keyword, things just die later, so that's not useful.
So, here's where I am.
A lot of debugging output shows me that the first time PerlModule
Embperl is read, the init routine for Embperl gets called, and in
particular, embperl_ApacheAddModule gets called, and it calls
ap_add_module. The second time it does *not* get called.
The problem is, I can't figure out when it's being called. From
looking at the code, it looks like all init() routines are called
from ap_init_modules(), but the first time it's being called as soon
as it is loaded. (and ap_init_modules() runs after the config file is
processed anyway). So my next guess is that it's being called from
Embperl.pm when it's loaded. However the *second* time, since Perl
is already running, that code does not get re-executed, and Init is
not called, and as a result, add_module isn't called.
The more my sleep addled brain thinks about this, the more it makes
sense. But it leaves two questions.
1. How can I force Init (or more specifically, ap_add_module) to be
called both times.
2. Why is this only causing problems for me and nobody else?
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Gerald Richter <ri...@ecos.de>.
> >
> >What are the different error message, if any, with and without the
> >AddModule?
>
> Kind of telling.
>
> Cannot add module via name 'embperl.c': not in list of loaded modules
>
Oops, yes it can't work. Sorry I am overseen this.
> It looks to me like the module is being only partially registered.
> There's some debug code in mod_perl, I'm going to look into how to
> turn it on. At this point I'm pretty sure this isn't an Embperl
> issue, but rather something to do with mod_perl and PerlModule's in
> general. Either it's an OSX problem, or OSX is exposing some other
> issue.
It wasn't easy to get this configuration stuff working with all possible
Perl version/Apache builds. I guess you setup is just introucing another
variant....
I think it's a kind of Embperl issuse, since the way Embperl plugs into
Apache seem not to work with your setup.
There is one thing we can try, in epapinit.c comment out line 163:
ap_remove_module (&embperl_module) ;
If this all doesn't help, then search for all
cfg -> bUseEnv = -1 ;
change it to 1 and use enviroment variables for configuration (and remove
all Embperl Apache configuration directives). Then we continue debugging
when I am back from my holiday
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Kee Hinckley <na...@somewhere.com>.
At 3:56 PM +0100 3/21/02, Gerald Richter wrote:
>Embperl_UseEnv on
>AddModule embperl.c
>Embperl_UseEnv on
>
>What are the different error message, if any, with and without the
>AddModule?
Kind of telling.
Cannot add module via name 'embperl.c': not in list of loaded modules
It looks to me like the module is being only partially registered.
There's some debug code in mod_perl, I'm going to look into how to
turn it on. At this point I'm pretty sure this isn't an Embperl
issue, but rather something to do with mod_perl and PerlModule's in
general. Either it's an OSX problem, or OSX is exposing some other
issue.
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Gerald Richter <ri...@ecos.de>.
Looks like didn't get much sleep, since your last mail....
>
> I assume all I have to do to not load 1.3.4 is make sure there are no
> references to HTML::Embperl in my config file? No difference.
>
Yes
> I'm definitely using the same apache and mod_perl, because I'm
> testing on the live server (it's my development machine).
>
> Here's a weird one though (like I needed another weird one). I tried
> using Embperl_UseEnv on. Initially I put it in my FilesMatch
> section, but it said I couldn't use it there. Which means it
> recognized it as a command! But if I put it anywhere else, it gives
> me a syntax error.
>
Mmmh, could you try to put a
AddModule embperl.c
directly after your
PerlModule Embperl
and then
Embperl_UseEnv on
so you get
Embperl_UseEnv on
AddModule embperl.c
Embperl_UseEnv on
What are the different error message, if any, with and without the
AddModule?
> >
> >If make test doesn't work? What is the exact error? How is your mod_perl
> >compiled. Staticly or as DSO?
>
> mod_perl is static (the config problems I had last week were due to
> my trying to compile it dynamic).
>
> Make test is a different issue, I've been meaning to post about that.
> I've actually never been able to get make test to work on MacOS X,
> even when I was running with HTML::Embperl.
>
I have no idea here. Maybe somebody else has an idea
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Kee Hinckley <na...@somewhere.com>.
At 11:19 AM +0100 3/21/02, Gerald Richter wrote:
>So one step back: Does make test work for you? If yes, are you really using
>the same Apache and mod_perl in test and in life? For your last tests, did
>you load 2.0b6 only, or did you also load 1.3.4. Please try to load 2.0
>only. Does this make any difference?
I assume all I have to do to not load 1.3.4 is make sure there are no
references to HTML::Embperl in my config file? No difference.
I'm definitely using the same apache and mod_perl, because I'm
testing on the live server (it's my development machine).
Here's a weird one though (like I needed another weird one). I tried
using Embperl_UseEnv on. Initially I put it in my FilesMatch
section, but it said I couldn't use it there. Which means it
recognized it as a command! But if I put it anywhere else, it gives
me a syntax error.
>
>If make test doesn't work? What is the exact error? How is your mod_perl
>compiled. Staticly or as DSO?
mod_perl is static (the config problems I had last week were due to
my trying to compile it dynamic).
Make test is a different issue, I've been meaning to post about that.
I've actually never been able to get make test to work on MacOS X,
even when I was running with HTML::Embperl.
488% make test wraith.somewhere.com:Embperl-2.0b7
PERL_DL_NONLAZY=0 /usr/bin/perl -Iblib/arch -Iblib/lib
-I/System/Library/Perl/darwin -I/System/Library/Perl test.pl
loading... dyld: /usr/bin/perl Undefined symbols:
_ap_add_module
_ap_add_version_component
_ap_find_linked_module
_ap_get_client_block
_ap_log_error
_ap_make_sub_pool
_ap_palloc
_ap_pcalloc
_ap_pstrdup
_ap_register_cleanup
_ap_remove_module
_ap_rflush
_ap_rputc
_ap_rwrite
_ap_send_http_header
_ap_setup_client_block
_ap_should_client_block
_ap_table_add
_ap_table_do
_ap_table_get
_ap_table_set
make: *** [test_dynamic] Error 67
For what it's worth, here's my config:
PerlModule Embperl
<VirtualHost wraith>
#PerlSetEnv EMBPERL_DEBUG 0x7fffffff
Port 80
ServerName meaimh
ServerAlias imh
ServerAdmin webmaster@infantmentalhealth.org
DocumentRoot /usr/local/www/meaimh
ErrorLog /var/log/httpd/meaimh.error_log
CustomLog /var/log/httpd/meaimh.access_log combined
ErrorDocument 404 /404.html
<FilesMatch ".*\.html$">
AllowOverride AuthConfig FileInfo Indexes Limit Options
Options ExecCGI
SetHandler perl-script
PerlHandler Embperl
Embperl_UseEnv on
#PerlHandler HTML::Embperl
#EMBPERL_DEBUG 532480
#Embperl_DEBUG 256+512
#Embperl_APPNAME meaimh
#EMBPERL_LOG /embperllog.html
#EMBPERL_OPTIONS 16+32768
# raw, undef->empty in args
#PerlSetEnv EMBPERL_MAILHOST gate.somewhere.com
#PerlSetEnv EMBPERL_MAILFROM
webmaster@infantmentalhealth.org
</FilesMatch>
<Location /data>
Order allow,deny
Deny from all
</Location>
# <LocationMatch "/admin/">
# PerlSetEnv EMBPERL_OBJECT_BASE AdminTemplate.html
# PerlSetEnv EMBPERL_URIMATCH "\.(html|epl)$"
# PerlSetEnv EMBPERL_OBJECT_ADDPATH /usr/local/www/meaimh/data
# SetHandler perl-script
# PerlHandler HTML::EmbperlObject
# Options ExecCGI
# </LocationMatch>
</VirtualHost>
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Gerald Richter <ri...@ecos.de>.
>
> The check for a null pointer worked, but I'm still not sure if we're
> fixing the bug, or working around a symptom.
>
It isn't bad anyway, since it makes Embperl more robust against problems,
where ever they might come from...
> Which leads me to my next problem. I can't seem to get config
> directives recognized. They should like like this, right?
>
> PerlModule Embperl
> EMBPERL_DEBUG 532480
>
Yes, that's the way it should work.
So one step back: Does make test work for you? If yes, are you really using
the same Apache and mod_perl in test and in life? For your last tests, did
you load 2.0b6 only, or did you also load 1.3.4. Please try to load 2.0
only. Does this make any difference?
If make test doesn't work? What is the exact error? How is your mod_perl
compiled. Staticly or as DSO?
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Kee Hinckley <na...@somewhere.com>.
That fix got me past
At 7:45 AM +0100 3/21/02, Gerald Richter wrote:
>Most other Perl module won't use Apache config directives, so there is not
>much to compare outside anyway.
The check for a null pointer worked, but I'm still not sure if we're
fixing the bug, or working around a symptom.
Which leads me to my next problem. I can't seem to get config
directives recognized. They should like like this, right?
PerlModule Embperl
EMBPERL_DEBUG 532480
Syntax error on line 20 of /usr/local/apache/conf/srm.conf:
Invalid command 'EMBPERL_DEBUG', perhaps mis-spelled or defined by a
module not included in the server configuration
And now I am definitely going to bed--this cross-ocean debugging
session is killing my sleep time.
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Gerald Richter <ri...@ecos.de>.
> >hosts. Do you use virtual hosts and have Embperl settings in more then
one
> >virtual host section ?
>
> Yes, but removing them doesn't fix the problem.
I have tested the virtual host problem inbetween and it seems not the source
of problems.
>
> First of all, Embperl is the only PerlModule I'm loading, so I don't
> have anything to compare it to.
>
Most other Perl module won't use Apache config directives, so there is not
much to compare outside anyway.
>
> Now we've got to very funny things here.
> 1. merge_server_configs is calling Embperl's directory merge call.
That's ok since Embperl uses this routines for both (server and directory
merge)
> 2. The basev value for the merge is 0.
>
Mmmh, so maybe we try to change the Embperl code to
static void *embperl_merge_dir_config (pool *p, void *basev, void *addv)
{
+ if (!basev)
+ return addv ;
+
+{
tApacheDirConfig *mrg = (tApacheDirConfig *)ap_palloc (p,
sizeof(tApacheDirConfig));
tApacheDirConfig *base = (tApacheDirConfig *)basev;
tApacheDirConfig *add = (tApacheDirConfig *)addv;
memcpy (mrg, base, sizeof (*mrg)) ;
#include "epcfg.h"
if (add -> bUseEnv >= 0)
base -> bUseEnv = add -> bUseEnv ;
return mrg ;
+ }
}
> So why is it 0?
Is it possible that you don't have any Embperl configuration directives
outside of a virtual host? That would explain the behaviour and then the
above change, should fix it.
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Kee Hinckley <na...@somewhere.com>.
At 8:49 PM +0100 3/20/02, Gerald Richter wrote:
>Ok, this mean something with Apache config goes very wrong (That's also what
>the backtraces tell use). Things are not initilized, when they should be set
>to zero. Jochen reported yesterday some problems with setup inside of virual
>hosts. Do you use virtual hosts and have Embperl settings in more then one
>virtual host section ?
Yes, but removing them doesn't fix the problem. Here's my take on
the problem for tonight. Keep in mind that the last time I looked
into the Apache code was around 1996, so I'm doing a lot of guessing
here.
First of all, Embperl is the only PerlModule I'm loading, so I don't
have anything to compare it to.
Here's what's happening. In fixup_virtual_hosts, Apache is
repeatedly calling merge_server_configs and merge_per_dir_configs on
each virtual host. All is well until we get to the first one that
actually has a directive.
MSC: 0xCF390: index=34, embperl.c
MSC: 0xCF390: index=2, mod_perl.c
MSC: 0xCF390: index=33, mod_setenvif.c
...
MDC: 0xCF918: index=34, embperl.c
MDC: 0xCF918: index=2, mod_perl.c
MDC: 0xCF918: index=33, mod_setenvif.c
...
MSC: 0xCF390: index=34, embperl.c
mdc: 0x0, 0x3AA700, 332
Now we've got to very funny things here.
1. merge_server_configs is calling Embperl's directory merge call.
2. The basev value for the merge is 0.
So why is it 0? embperl_create_server_config is being called, but it
doesn't appear to have been called on particular configuration array
that's being passed to the merge. I *think* that chunk of memory is
the one initialized by calling ap_single_module_configure. The only
problem with that theory is that mod_perl doesn't get inserted in
that one either. At this point I think I'm becoming incoherent--it's
too late here. But maybe this is useful to someone.
For what it's worth, here's some of my debug output:
create_dir_config: .*\.html$
setting 0x3A9EE0[34] = 0x3AA438 (embperl.c)
create_server_config: 0x3AA588, 332
setting 0xDDF30[34] = 0x3AA588 (embperl.c)
MSC: 0xCF390: index=34, embperl.c
mdc: 0x0, 0x3AA588, 332
So we were called on the module_config array at CF390, but the only
place I ever see that being set is back here:
SING1 setting 0xCF390[3] = 0xCFD88 (mod_vhost_alias.c)
SING2 setting 0xCF918[4] = 0xCFDF8 (mod_env.c)
SING1 setting 0xCF390[5] = 0xD0028 (mod_log_config.c)
SING1 setting 0xCF390[6] = 0xD0120 (mod_mime_magic.c)
SING2 setting 0xCF918[7] = 0xD0190 (mod_mime.c)
That's in ap_single_module_configure, setting the server config.
So we never added an entry there for index #34, but we look *up*
index #34 in the merge code. Eventually we're going to hit a
non-null instance in that lookup (since it's the last item in the
array) and then we're going to call the routine with bad memory
references.
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Gerald Richter <ri...@ecos.de>.
>
> I tracked the problem down, but then I lose it. We're faulting on
> the sAppName value. For whatever reason
> embperl_GetApacheAppName
> is being called and in it
> pDirCfg->AppConfig.sAppName=0x14
> which obviously isn't correct.
>
Ok, this mean something with Apache config goes very wrong (That's also what
the backtraces tell use). Things are not initilized, when they should be set
to zero. Jochen reported yesterday some problems with setup inside of virual
hosts. Do you use virtual hosts and have Embperl settings in more then one
virtual host section ?
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Kee Hinckley <na...@somewhere.com>.
Okay, that's gotten me past the duplicate symbol errors. Now there's
the general problem of just running.
I tracked the problem down, but then I lose it. We're faulting on
the sAppName value. For whatever reason
embperl_GetApacheAppName
is being called and in it
pDirCfg->AppConfig.sAppName=0x14
which obviously isn't correct.
I made a wild guess and set EMBPERL_APPNAME to a value in the config
file, but that resulted in the second traceback here. Suggestions on
where to look next?
Date/Time: 2002-03-20 13:27:44 -0500
OS Version: 10.1.3 (Build 5Q45)
Host: wraith.somewhere.com
Command: httpd
PID: 2184
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000014
Thread 0 Crashed:
#0 0x70000a50 in strlen
#1 0x00437ef0 in EMBPERL2_GetHashValueUInt
#2 0x0043e48c in embperl_SetupApp
#3 0x00442e6c in embperl_InitRequest
#4 0x00443214 in embperl_InitRequestComponent
#5 0x004356c4 in embperl_ExecuteRequest
#6 0x0042d554 in XS_Embperl__Req_ExecuteRequest
#7 0x4be5b5e4 in Perl_pp_entersub
#8 0x4be53e28 in Perl_runops_standard
#9 0x4be042a4 in S_call_body
#10 0x4be03f50 in perl_call_sv
#11 0x0000573c in perl_call_handler
#12 0x00004f44 in perl_run_stacked_handlers
#13 0x00003560 in perl_handler
#14 0x0003a808 in ap_invoke_handler
#15 0x00052758 in process_request_internal
#16 0x000527e8 in ap_process_request
#17 0x00029624 in child_main
#18 0x00029928 in make_child
#19 0x00029a3c in startup_children
#20 0x0002a380 in standalone_main
#21 0x0002aec8 in main
#22 0x00001f10 in _start
#23 0x00001d40 in start
PPC Thread State:
srr0: 0x70000a50 srr1: 0x0200f030 vrsave: 0x00000000
xer: 0x0000000c lr: 0x00437ef0 ctr: 0x70000a40 mq: 0x00000000
r0: 0x00437ef0 r1: 0xbfffea00 r2: 0x003713f0 r3: 0x00000014
r4: 0x0000000c r5: 0x00000014 r6: 0x00000000 r7: 0x000e2d60
r8: 0x4bec5eb0 r9: 0x00000088 r10: 0xff8eab74 r11: 0x00482730
r12: 0x70000a40 r13: 0x00000000 r14: 0x00000000 r15: 0x00000000
r16: 0x00000000 r17: 0x00000000 r18: 0x00000000 r19: 0x00000001
r20: 0x00000000 r21: 0x00000000 r22: 0x000e09c4 r23: 0x0084d048
r24: 0xbfffeaf0 r25: 0x004a70a8 r26: 0x00000000 r27: 0x00000014
r28: 0x0036e13c r29: 0x00000014 r30: 0x00000000 r31: 0x0043e3f8
Date/Time: 2002-03-20 13:53:08 -0500
OS Version: 10.1.3 (Build 5Q45)
Host: wraith.somewhere.com
Command: httpd
PID: 2526
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
Thread 0 Crashed:
#0 0x70003e64 in memmove
#1 0x0043b444 in embperl_merge_dir_config
#2 0x00039c60 in merge_server_configs
#3 0x0003d214 in fixup_virtual_hosts
#4 0x0003d854 in ap_read_config
#5 0x0002ada8 in main
#6 0x00001f10 in _start
#7 0x00001d40 in start
PPC Thread State:
srr0: 0x70003e64 srr1: 0x0200f030 vrsave: 0xff000000
xer: 0x00000008 lr: 0x0043b444 ctr: 0x70003a00 mq: 0x00000000
r0: 0x00000008 r1: 0xbffff3b0 r2: 0x004a1b48 r3: 0x004a1b48
r4: 0x00000000 r5: 0x00000144 r6: 0x00000000 r7: 0x00000008
r8: 0xffb5e4b8 r9: 0xff000000 r10: 0x00000088 r11: 0x00482764
r12: 0x70003a00 r13: 0x00000000 r14: 0x00000000 r15: 0x00000000
r16: 0x00000000 r17: 0x00000000 r18: 0x00000000 r19: 0x00000000
r20: 0x00000000 r21: 0x00000000 r22: 0x00000000 r23: 0x00000000
r24: 0x00000000 r25: 0x00000000 r26: 0xbffff628 r27: 0x00000008
r28: 0x00000000 r29: 0x003c2000 r30: 0x004a1b48 r31: 0x00039b78
**********
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Gerald Richter <ri...@ecos.de>.
> >Never seen this errror message, but the stack backtraces looks like there
> >are more name clashes, so I expect it to work when you only load one of
> >them.
>
> OSX has an option for building shared libraries using multiple name
> spaces. I haven't explored it. It's the default, and typically it
> just gets in the way, but it might be the right solution here.
> Anyway, I'll do some more exploring tomorrow.
Would be nice to get it working without such special options. I have
checked, there is still one symbol that is the same in 1.3.4 and 2.0b6. I
append you the epnames.h file, which solve this issue. I am not sure if this
solves the problem but it worth a try. If it doesn't work, please try to
load only 2.0b6 and see if it works without 1.3.4 loaded.
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
Re: Errors enabling Embperl 2.0b6
Posted by Kee Hinckley <na...@somewhere.com>.
At 8:08 PM +0100 3/19/02, Gerald Richter wrote:
>Never seen this errror message, but the stack backtraces looks like there
>are more name clashes, so I expect it to work when you only load one of
>them.
OSX has an option for building shared libraries using multiple name
spaces. I haven't explored it. It's the default, and typically it
just gets in the way, but it might be the right solution here.
Anyway, I'll do some more exploring tomorrow.
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Gerald Richter <ri...@ecos.de>.
> At 7:06 PM +0100 3/19/02, Gerald Richter wrote:
> > > Now when I access an HTML::Embperl driven site, I get:
> >>
> >> dyld: /usr/local/apache/bin/httpd multiple definitions of symbol
> >> _EMBPERL_mgGetEscMode
> >
> >Use the appended epmacro.h file and rebuild Embperl (make clean before).
> >This will solve the name clash
>
> That got me a step further, but I get this in the log file when
> Embperl is loaded (but not used).
>
> From the error log:
> [Tue Mar 19 13:16:53 2002] [error] perl_call did not return a status
> arg, assuming OK
>
Never seen this errror message, but the stack backtraces looks like there
are more name clashes, so I expect it to work when you only load one of
them.
I try to find out more about what symbols may clash tomorrow
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Kee Hinckley <na...@somewhere.com>.
At 7:06 PM +0100 3/19/02, Gerald Richter wrote:
> > Now when I access an HTML::Embperl driven site, I get:
>>
>> dyld: /usr/local/apache/bin/httpd multiple definitions of symbol
>> _EMBPERL_mgGetEscMode
>
>Use the appended epmacro.h file and rebuild Embperl (make clean before).
>This will solve the name clash
That got me a step further, but I get this in the log file when
Embperl is loaded (but not used).
From the error log:
[Tue Mar 19 13:16:53 2002] [error] perl_call did not return a status
arg, assuming OK
And when I try and use it, neither it nor HTML::Embperl work. When I
get a chance I'll see if I can get it to work without HTML::Embperl
loaded.
Date/Time: 2002-03-19 13:22:41 -0500
OS Version: 10.1.3 (Build 5Q45)
Host: wraith.somewhere.com
Command: httpd
PID: 12006
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x0000001c
Thread 0 Crashed:
#0 0x0093f934 in HtmlEndtable
#1 0x0093e338 in ProcessAllCmds
#2 0x0093e428 in EMBPERL_ProcessCmd
#3 0x00938e84 in ScanHtmlTag
#4 0x0093c674 in EMBPERL_ProcessBlock
#5 0x00943fe4 in EMBPERL_EvalMain
#6 0x0093c2e0 in ProcessFile
#7 0x0093cbf4 in EMBPERL_ExecuteReq
#8 0x00933e68 in XS_HTML__Embperl__Req_ExecuteReq
#9 0x4be5b5e4 in Perl_pp_entersub
#10 0x4be53e28 in Perl_runops_standard
#11 0x4be042a4 in S_call_body
#12 0x4be03f50 in perl_call_sv
#13 0x0000573c in perl_call_handler
#14 0x00004f44 in perl_run_stacked_handlers
#15 0x00003560 in perl_handler
#16 0x0003a808 in ap_invoke_handler
#17 0x00052758 in process_request_internal
#18 0x000527e8 in ap_process_request
#19 0x00029624 in child_main
#20 0x00029928 in make_child
#21 0x00029a3c in startup_children
#22 0x0002a380 in standalone_main
#23 0x0002aec8 in main
#24 0x00001f10 in _start
#25 0x00001d40 in start
PPC Thread State:
srr0: 0x0093f934 srr1: 0x0200f030 vrsave: 0x00000000
xer: 0x20000020 lr: 0x0093f928 ctr: 0x00000000 mq: 0x00000000
r0: 0x00000000 r1: 0xbfffdff0 r2: 0x00e64fe1 r3: 0x008f2d34
r4: 0x0000001c r5: 0x000003ff r6: 0x008f2c34 r7: 0x0093dfc8
r8: 0xbfffe128 r9: 0x00000000 r10: 0x0000003c r11: 0x008f3133
r12: 0x70004f40 r13: 0x00000000 r14: 0x00000000 r15: 0x00000000
r16: 0x00000000 r17: 0x00000000 r18: 0x00000000 r19: 0x00000001
r20: 0x00000002 r21: 0x00f9e604 r22: 0x00fa2757 r23: 0x00000000
r24: 0x0000003e r25: 0x008f2c34 r26: 0x008f2b80 r27: 0x0094ad40
r28: 0x00fa0f09 r29: 0x008f2c3c r30: 0x008f2b80 r31: 0x0093f8e8
**********
Date/Time: 2002-03-19 13:19:35 -0500
OS Version: 10.1.3 (Build 5Q45)
Host: wraith.somewhere.com
Command: httpd
PID: 11979
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000014
Thread 0 Crashed:
#0 0x70000a50 in strlen
#1 0x00436ef0 in EMBPERL2_GetHashValueUInt
#2 0x0043d48c in embperl_SetupApp
#3 0x00441e6c in embperl_InitRequest
#4 0x00442214 in embperl_InitRequestComponent
#5 0x004346c4 in embperl_ExecuteRequest
#6 0x0042c554 in XS_Embperl__Req_ExecuteRequest
#7 0x4be5b5e4 in Perl_pp_entersub
#8 0x4be53e28 in Perl_runops_standard
#9 0x4be042a4 in S_call_body
#10 0x4be03f50 in perl_call_sv
#11 0x0000573c in perl_call_handler
#12 0x00004f44 in perl_run_stacked_handlers
#13 0x00003560 in perl_handler
#14 0x0003a808 in ap_invoke_handler
#15 0x00052758 in process_request_internal
#16 0x00052c90 in ap_internal_redirect
#17 0x00114c38 in handle_dir
#18 0x0003a808 in ap_invoke_handler
#19 0x00052758 in process_request_internal
#20 0x000527e8 in ap_process_request
#21 0x00029624 in child_main
#22 0x00029928 in make_child
#23 0x00029e24 in perform_idle_server_maintenance
#24 0x0002a620 in standalone_main
#25 0x0002aec8 in main
#26 0x00001f10 in _start
#27 0x00001d40 in start
PPC Thread State:
srr0: 0x70000a50 srr1: 0x0200f030 vrsave: 0x00000000
xer: 0x0000000c lr: 0x00436ef0 ctr: 0x70000a40 mq: 0x00000000
r0: 0x00436ef0 r1: 0xbfffe810 r2: 0x0082fe50 r3: 0x00000014
r4: 0x0000000c r5: 0x00000014 r6: 0x00000000 r7: 0x000e2d60
r8: 0x4bec5eb0 r9: 0x00000088 r10: 0xff8eb144 r11: 0x00481730
r12: 0x70000a40 r13: 0x00000000 r14: 0x00000000 r15: 0x00000000
r16: 0x00000000 r17: 0x00000000 r18: 0x00000000 r19: 0x00000001
r20: 0x00000000 r21: 0x00000000 r22: 0x000e09c4 r23: 0x0084fe70
r24: 0xbfffe900 r25: 0x004a50a8 r26: 0x00000000 r27: 0x00000014
r28: 0x000e3650 r29: 0x00000014 r30: 0x00000000 r31: 0x0043d3f8
**********
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Errors enabling Embperl 2.0b6
Posted by Gerald Richter <ri...@ecos.de>.
> Now when I access an HTML::Embperl driven site, I get:
>
> dyld: /usr/local/apache/bin/httpd multiple definitions of symbol
> _EMBPERL_mgGetEscMode
Use the appended epmacro.h file and rebuild Embperl (make clean before).
This will solve the name clash
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------