You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jason Bodnar <jb...@tivoli.com> on 2000/04/14 19:39:11 UTC

SOLVED: Segfault with Embperl, Apache::Session (piece of %@#!*)

Fickle, fickle machines.

The segfault problem with Embperl and Apache::Session can be fixed with about 3
keystrokes in emacs.

When I was getting the segfault error I had:

# BEGIN EMBPERL SESSION HANDLING
PerlSetEnv EMBPERL_SESSION_CLASSES "DBIStore SysVSemaphoreLocker"
PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:sessions UserName=root" 
PerlRequire startup.pl

PerlModule Apache::AuthenDBI
PerlModule HTML::Embperl



If you move the PerlRequire below PerlModule HTML::Embperl everything works. Of
course, it makes sense because startup.pl has the line for setting nsems for
Apache::Session::SysVSemaphoreLocker and Embperl loads that module for you so
startup.pl needs to load after Embperl.

The interesting thing is that with perl5.004 I was getting segfaults. After
building perl5.005 and rebuilding all the modules, apache and mod_perl I no
longer got segfaults but got Invalid argument errors from SysVSemaphoreLocker.
Either perl5.005 or the newer versions of Apache::Session or IPC::Semaphore are
a little bit more tolerant to misplaced parameters.

Gerald, if it's not on the wish list already, could you add a request for the
ability to set nsems in EMBPERL_SESSION_ARGS. Or maybe I should just get off my
butt and make a patch.

-- 
Jason Bodnar + jbodnar@tivoli.com + Tivoli Systems

Homer:  We always have one good kid and one lousy kid.  Why can't both 
        our kids be good?

Marge:  We have three kids, Homer.

                   Separate Vacations


RE: SOLVED: Segfault with Embperl, Apache::Session (piece of %@#!*)

Posted by Gerald Richter <ri...@ecos.de>.
>
> Gerald, if it's not on the wish list already, could you add a
> request for the
> ability to set nsems in EMBPERL_SESSION_ARGS. Or maybe I should
> just get off my
> butt and make a patch.
>

This works already. You can give any arguments to EMBPERL_SESSION_ARGS that
a Store or Locker module accepts. Embperl only pass them thru. e.g.

PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:sessions UserName=root
NSems=16"

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 925151
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------


RE: SOLVED: Segfault with Embperl, Apache::Session (piece of %@#!*)

Posted by Gerald Richter <ri...@ecos.de>.
>
> Gerald, if it's not on the wish list already, could you add a
> request for the
> ability to set nsems in EMBPERL_SESSION_ARGS. Or maybe I should
> just get off my
> butt and make a patch.
>

This works already. You can give any arguments to EMBPERL_SESSION_ARGS that
a Store or Locker module accepts. Embperl only pass them thru. e.g.

PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:sessions UserName=root
NSems=16"

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 925151
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------