You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Andre Landwehr <an...@gmx.net> on 2002/08/06 10:05:42 UTC
embperl 2 make test, session management
Hi everybody,
after a long period of Java hacking I'm back at Embperl for a
while now and I thought I try Embperl 2.0b8 now. One
problem seems to be "make test", maybe a minor problem.
But first of all the configuration of my machine:
- Debian (sid) Linux
- apache 1.3.26
- mod-perl 1.26
- libxml 2.4.23
- libxslt 1.0.18
- Embperl 2.0b8
- Apache::Session 1.54
- Digest::MD5 2.13
Compilation of Embperl is successfull, but make test fails with
#207 pod/pod.asc libxslt...
Error in Line 3
Is: > <head><
Should: ><head><
Everything before was ok. Since this looks like a minor error
for me I did make install anyways. The next problem I encountered
was session management. When starting Apache the expected message
about "Embperl Session Management started" did not appear.
My most simple test page consisting mainly of
udat counter: [+ $udat{usercounter}++ +]<br>
mdat counter: [+ $mdat{pagecounter}++ +]<br>
does not set a cookie.
Now, what's my mistake? ;-)
httpd.conf:
AddType text/html;charset=ISO-8859-15 .epl
AddType text/html;charset=ISO-8859-15 .epo
PerlModule MD5
PerlModule Embperl
PerlModule Apache::DBI
Embperl_Debug 7888893
Embperl_Escmode 0
Embperl_Options 16914
Embperl_Session_Classes "File Semaphore"
Embperl_Session_Args "Directory=/tmp"
Embperl_Cookie_Domain "ub40.nmt.bertelsmann.de"
Embperl_Cookie_Path "/"
<Files *.epo>
Embperl_Object_Base _base.epo
Embperl_Object_App myapp
SetHandler perl-script
PerlHandler Embperl::Object
Options ExecCGI
</Files>
Andre
--
"The inside of a computer is as dumb as hell, but it goes like mad!"
(Physicist Richard Feynman)
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: embperl 2 session management
Posted by Andre Landwehr <an...@gmx.net>.
On Thu, Aug 22, 2002 at 11:53:32AM +0200, Gerald Richter - ecos gmbh wrote:
> Apache::Session uses a hash function to select a semaphore out of a array.
> It may cause the the deadlock if both %udat and %mdat use the same one. If I
> have it right in mind per default we have 32 semaphores, to which all ids
> are mapped.
>
> I will checkout this more in detail, but have to do some other stuff first
No problem since I barely use %mdat at all. It was just a test if
my setup is correct.
Andre
--
"The inside of a computer is as dumb as hell, but it goes like mad!"
(Physicist Richard Feynman)
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: embperl 2 session management
Posted by Gerald Richter - ecos gmbh <ri...@ecos.de>.
>> [+ $mdat{cnt}++ +]
>>
>> Does it work or do you get the same problems?
>Ah, ok, that works. But the problem returns as soon as I have
>both udat and mdat in the page. Maybe it is Apache::Session or
>Apache::SessionX getting confused about having two session id's for
>one page and only one semaphore for it or something like that?
Apache::Session uses a hash function to select a semaphore out of a array.
It may cause the the deadlock if both %udat and %mdat use the same one. If I
have it right in mind per default we have 32 semaphores, to which all ids
are mapped.
I will checkout this more in detail, but have to do some other stuff first
Gerald
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: embperl 2 session management
Posted by Andre Landwehr <an...@gmx.net>.
On Thu, Aug 22, 2002 at 06:52:45AM +0200, Gerald Richter wrote:
> Strange, %udat and %mdat are handled excatly the same, they just get a
> different session id.
>
> If you make a very simple page which just contains
>
> [+ $mdat{cnt}++ +]
>
> Does it work or do you get the same problems?
Ah, ok, that works. But the problem returns as soon as I have
both udat and mdat in the page. Maybe it is Apache::Session or
Apache::SessionX getting confused about having two session id's for
one page and only one semaphore for it or something like that?
Andre
--
"The inside of a computer is as dumb as hell, but it goes like mad!"
(Physicist Richard Feynman)
Re: embperl 2 session management
Posted by Gerald Richter <ri...@ecos.de>.
>>
>> Seems like a problem with semaphores inside of Apache::Session. You may
try
>> to remove the semaphore with ipcrm so it gets recreated (you can view it
>> with ipcs).
>
>Well, exactly that seems to be the case. As soon as I kill the
>semaphore with ipcrm the page is displayed correctly, even the
>test counter $mdat{count} is incremented. The weird
>thing is that the problem only exists when I use %mdat, no
>problems at all with %udat (thankfully, for that is the one I use
>most ;-))
>
Strange, %udat and %mdat are handled excatly the same, they just get a
different session id.
If you make a very simple page which just contains
[+ $mdat{cnt}++ +]
Does it work or do you get the same problems?
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: embperl 2 session management
Posted by Andre Landwehr <an...@gmx.net>.
On Tue, Aug 06, 2002 at 06:36:02PM +0200, Gerald Richter wrote:
> > I have Apache::SessionX installed and
> > Embperl_Session_Config "File Semaphore"
>
> You don't need this when you have made it the default during
> Apache::SessionX Makefile.PL run
>
> > as the only session configuration option now. File Semaphore is
> > also the only thing configured for Apache::SessionX. But a request to my
> > testpage hangs, and the embperl.log says the following, which
> > to me looks as if everything was ok with the request.
>
> It Compiles the page, but hangs during run.
>
> Seems like a problem with semaphores inside of Apache::Session. You may try
> to remove the semaphore with ipcrm so it gets recreated (you can view it
> with ipcs).
Well, exactly that seems to be the case. As soon as I kill the
semaphore with ipcrm the page is displayed correctly, even the
test counter $mdat{count} is incremented. The weird
thing is that the problem only exists when I use %mdat, no
problems at all with %udat (thankfully, for that is the one I use
most ;-))
Is the problem reproducable (File Semaphore locking was used) for
anybody? Does it happen with other storage mechanisms as well?
Andre
--
"The inside of a computer is as dumb as hell, but it goes like mad!"
(Physicist Richard Feynman)
Re: embperl 2 session management
Posted by Gerald Richter <ri...@ecos.de>.
> I have Apache::SessionX installed and
> Embperl_Session_Config "File Semaphore"
You don't need this when you have made it the default during
Apache::SessionX Makefile.PL run
> as the only session configuration option now. File Semaphore is
> also the only thing configured for Apache::SessionX. But a request to my
> testpage hangs, and the embperl.log says the following, which
> to me looks as if everything was ok with the request.
It Compiles the page, but hangs during run.
Seems like a problem with semaphores inside of Apache::Session. You may try
to remove the semaphore with ipcrm so it gets recreated (you can view it
with ipcs).
Gerald
P.S. I am out of office for the next days, so I won't read any email before
monday :-)
-------------------------------------------------------------
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: embperl 2 session management
Posted by Andre Landwehr <an...@gmx.net>.
On Tue, Aug 06, 2002 at 11:16:47AM +0200, Gerald Richter - ecos gmbh wrote:
> You need to install Apache::SessionX or set Embperl_Session_Handler_CLass
> Embperl::Session
>
> see README.v2
Ok, I admit it, reading is difficult ;-)
I have Apache::SessionX installed and
Embperl_Session_Config "File Semaphore"
as the only session configuration option now. File Semaphore is
also the only thing configured for Apache::SessionX. But a request to my
testpage hangs, and the embperl.log says the following, which
to me looks as if everything was ok with the request. Any idea
about that? Thanks a lot...
_ep_rp(9,scalar($mdat{pagecounter}++ ));
# Include here any cleanup code
$DB::single = 0 ;
_ep_cp(2) ;
[1439]PERF: Compile Start Time: 50 ms
[1439]PERF: Compile End Time: 50 ms
[1439]PERF: After Compile Exec End Time: 50 ms
[1439]PERF: Perl Compile End Time: 50 ms
[1439]PERF: Compile Time: 0 ms
[1439]PERF: DOMSTAT: MemUsage = 68176 Bytes numNodes = 11
numLevelLookup = 0 numLevelLookupItem = 0 numStr = 79
numReplace = 0
[1439]EVAL< <unknown>
Andre
--
"The inside of a computer is as dumb as hell, but it goes like mad!"
(Physicist Richard Feynman)
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: embperl 2 make test, session management
Posted by Gerald Richter - ecos gmbh <ri...@ecos.de>.
>
> Compilation of Embperl is successfull, but make test fails with
> #207 pod/pod.asc libxslt...
> Error in Line 3
> Is: > <head><
> Should: ><head><
>
> Everything before was ok. Since this looks like a minor error
> for me I did make install anyways.
Yes, you can safely ignore this.
> The next problem I encountered
> was session management. When starting Apache the expected message
> about "Embperl Session Management started" did not appear.
No, it has gone away in 2.0b6
> My most simple test page consisting mainly of
> udat counter: [+ $udat{usercounter}++ +]<br>
> mdat counter: [+ $mdat{pagecounter}++ +]<br>
> does not set a cookie.
> Now, what's my mistake? ;-)
>
You need to install Apache::SessionX or set Embperl_Session_Handler_CLass
Embperl::Session
see README.v2
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