[Catalyst] Apache2 and mod_perl deployment issue

Tomas Doran bobtfish at bobtfish.net
Wed Nov 16 17:10:36 GMT 2011


On 15 Nov 2011, at 00:22, Adam Jimerson wrote:
>
> Here is the last several lines from a backtrace with the -f flag http://pastie.org/2864471 
>  (the whole backtrace is quite large but I piped it to a file just  
> in case)
>

This is not a backtrace.

A backtrace is specifically a call stack dump (showing all the  
routines that have been entered in the code).

This is a list of all the syscalls the program has emitted, but  
doesn't imply the current state anywhere.

> In short I can find these errors:
>
> stat("/usr/lib/perl5/site_perl/x86_64-linux-thread-multi",  
> 0x7fff5f223030) = -1 ENOENT (No such file or directory)
> ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or  
> TCGETS, 0x7fff5f222d88) = -1 ENOTTY (Inappropriate ioctl for device)
> ...
> lseek(1, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
> ioctl(2, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or  
> TCGETS, 0x7fff5f222d98) = -1 ENOTTY (Inappropriate ioctl for device)
> ...
> stat("/usr/lib/perl5/site_perl/5.14.2/x86_64-linux-thread-multi/ 
> DynaLoader.pmc", 0x7fff5f222d50) = -1 ENOENT (No such file or  
> directory)
> stat("/usr/lib/perl5/site_perl/5.14.2/x86_64-linux-thread-multi/ 
> DynaLoader.pm", 0x7fff5f222cb0) = -1 ENOENT (No such file or  
> directory)

Why do you think any of these are errors? (They don't appear to be,  
from my reading.)

However that strace does make it clear that you segfault as soon as  
you start trying to require any perl code... (shortly after starting  
to read in Dynaloader.pm).

A backtrace would still be interesting, but it's kinda academic at  
this point..

> Yes I am using prefork mpm, I will open a bug report against the  
> mod_perl in my distro.  My reason for deploying with mod_perl rather  
> than fastcgi is the speed advantage

There isn't one generally. mod_perl is fast, so is fastcgi. In a lot  
of cases, fastcgi on nginx can be a hell of a lot faster than mod_perl  
on apache, for example :)

> and shared memory that mod_perl deployment had over fastcgi

This just isn't true unless you're deploying many applications (like  
the doc says). Are you trying to run half a dozen or more apps?

> Looking at the Catalyst Manual for FastCGI deployment one thing that  
> I don't quite agree with is that mod_fastcgi relies so much on  
> mod_rewrite rules, although mostly to elimitate the need for the  
> trailing forward slash or for authorization.  If my impression is  
> wrong please correct me.

You're wrong.

mod_rewrite is _one_ of the ways to alias things, you could also use,  
well, 'Alias' :_)

Cheers
t0m





More information about the Catalyst mailing list