Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

Apache2 and mod_perl deployment issue

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


vendion at gmail

Nov 13, 2011, 6:55 PM

Post #1 of 16 (538 views)
Permalink
Apache2 and mod_perl deployment issue

I am trying to deploy my app using the Catalyst Runtime 5.90006 using
mod_perl 2.0.5 on apache 2.2.17. I have all my configurations in a
virtual host file, can be found here
http://cloud.vendion.net/apps/files_sharing/get.php?token=9e6836a8d9e633e2c81390d73423beb92df489aa
.

My app runs fine under the development server script that ships with
catalyst, but when I try to start Apache with this virtual host file it
crashes Apache. If I enable -Debug in my Catalyst app
I can see where the app is being loaded with Apache and that mod_perl is
working, and that the virtual host file passed the Syntax check. The only
clue that can find in my servers logs is:

httpd2-prefork[21582]: segfault at 7f1cac9f84c0 ip 00007f1cac9f84c0 sp
00007fffd98d11d8 error 14 in librt-2.11.3.so[7f1cae229000+8000]

Running Apache under gdb with debug symbols for apache and mod_perl
installed there is no stack trace generated but the only error I see is
this:

Syntax error on line 7 of /etc/apache2/vhosts.d/www.vendion.net.conf:
Invalid command 'PerlSwitches', perhaps misspelled or defined by a module
not included in the server configuration

Program exited with code 01.

This is beyond baffling to me and I'm not sure what is at fault or what is
wrong, at first I thought it was an Apache/mod_perl issue and asked in the
forums for my servers Linux distro but have not gotten
anywhere there. So now I turn to the list for help in this matter.


jorge.gonzalez at daikon

Nov 14, 2011, 12:33 AM

Post #2 of 16 (491 views)
Permalink
Re: Apache2 and mod_perl deployment issue [In reply to]

It looks like you haven't correctly activated the mod_perl module in
Apache config, since Apache can't understand one of mod_perl's config
directives. Do you have a line similar to the following somewhere in
httpd.conf?

LoadModule perl_module modules/mod_perl.so

BR
J.

El 14/11/11 03:55, Adam Jimerson escribió:
> I am trying to deploy my app using the Catalyst Runtime 5.90006 using
> mod_perl 2.0.5 on apache 2.2.17. I have all my configurations in a
> virtual host file, can be found here
> http://cloud.vendion.net/apps/files_sharing/get.php?token=9e6836a8d9e633e2c81390d73423beb92df489aa.
>
>
> My app runs fine under the development server script that ships with
> catalyst, but when I try to start Apache with this virtual host file
> it crashes Apache. If I enable -Debug in my Catalyst app
> I can see where the app is being loaded with Apache and that mod_perl
> is working, and that the virtual host file passed the Syntax check.
> The only clue that can find in my servers logs is:
>
> httpd2-prefork[21582]: segfault at 7f1cac9f84c0 ip 00007f1cac9f84c0 sp
> 00007fffd98d11d8 error 14 in librt-2.11.3.so
> <http://librt-2.11.3.so>[7f1cae229000+8000]
>
> Running Apache under gdb with debug symbols for apache and mod_perl
> installed there is no stack trace generated but the only error I see
> is this:
>
> Syntax error on line 7 of /etc/apache2/vhosts.d/www.vendion.net.conf:
> Invalid command 'PerlSwitches', perhaps misspelled or defined by a
> module not included in the server configuration
>
> Program exited with code 01.
>
> This is beyond baffling to me and I'm not sure what is at fault or
> what is wrong, at first I thought it was an Apache/mod_perl issue and
> asked in the forums for my servers Linux distro but have not gotten
> anywhere there. So now I turn to the list for help in this matter.
>
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/


peter at dragonstaff

Nov 14, 2011, 12:44 AM

Post #3 of 16 (483 views)
Permalink
Re: Apache2 and mod_perl deployment issue [In reply to]

As well as Jorge's good advice, try running apache using strace,it should
still crash unlike under gdb, and see what the last system call is.
Regards, Peter
On Nov 14, 2011 3:12 AM, "Adam Jimerson" <vendion [at] gmail> wrote:

> I am trying to deploy my app using the Catalyst Runtime 5.90006 using
> mod_perl 2.0.5 on apache 2.2.17. I have all my configurations in a
> virtual host file, can be found here
> http://cloud.vendion.net/apps/files_sharing/get.php?token=9e6836a8d9e633e2c81390d73423beb92df489aa
> .
>
> My app runs fine under the development server script that ships with
> catalyst, but when I try to start Apache with this virtual host file it
> crashes Apache. If I enable -Debug in my Catalyst app
> I can see where the app is being loaded with Apache and that mod_perl is
> working, and that the virtual host file passed the Syntax check. The only
> clue that can find in my servers logs is:
>
> httpd2-prefork[21582]: segfault at 7f1cac9f84c0 ip 00007f1cac9f84c0 sp
> 00007fffd98d11d8 error 14 in librt-2.11.3.so[7f1cae229000+8000]
>
> Running Apache under gdb with debug symbols for apache and mod_perl
> installed there is no stack trace generated but the only error I see is
> this:
>
> Syntax error on line 7 of /etc/apache2/vhosts.d/www.vendion.net.conf:
> Invalid command 'PerlSwitches', perhaps misspelled or defined by a module
> not included in the server configuration
>
> Program exited with code 01.
>
> This is beyond baffling to me and I'm not sure what is at fault or what is
> wrong, at first I thought it was an Apache/mod_perl issue and asked in the
> forums for my servers Linux distro but have not gotten
> anywhere there. So now I turn to the list for help in this matter.
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>
>


bobtfish at bobtfish

Nov 14, 2011, 1:21 AM

Post #4 of 16 (476 views)
Permalink
Re: Apache2 and mod_perl deployment issue [In reply to]

On 14 Nov 2011, at 02:55, Adam Jimerson wrote:

> I am trying to deploy my app using the Catalyst Runtime 5.90006
> using mod_perl 2.0.5 on apache 2.2.17. I have all my
> configurations in a virtual host file, can be found here http://cloud.vendion.net/apps/files_sharing/get.php?token=9e6836a8d9e633e2c81390d73423beb92df489aa
> .
>
> My app runs fine under the development server script that ships with
> catalyst, but when I try to start Apache with this virtual host file
> it crashes Apache. If I enable -Debug in my Catalyst app
> I can see where the app is being loaded with Apache and that
> mod_perl is working

You mean it is loading, not that it's working :)

> , and that the virtual host file passed the Syntax check. The only
> clue that can find in my servers logs is:
>
> httpd2-prefork[21582]: segfault at 7f1cac9f84c0 ip 00007f1cac9f84c0
> sp 00007fffd98d11d8 error 14 in librt-2.11.3.so[7f1cae229000+8000]

Hmm, that's not particularly nice.. But it's not crashing inside perl
- so I'd guess this is an issue with your apache and/or mod_perl,
rather than with the perl code itself.

> Running Apache under gdb with debug symbols for apache and mod_perl
> installed there is no stack trace generated but the only error I see
> is this:

This would be as apache forks, and the gdb doesn't follow that..

> Syntax error on line 7 of /etc/apache2/vhosts.d/www.vendion.net.conf:
> Invalid command 'PerlSwitches', perhaps misspelled or defined by a
> module not included in the server configuration

How much of the config can you remove (and still get the segfault?)

Does it only take the PerlSwitches line and/or the <Perl> block (if so
it's _definitely_ an issue with your mod_perl/Apache, as with the
'PerlModule' statement removed, no code except mod_perl is actually
being loaded.

Cheers
t0m


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


vendion at gmail

Nov 14, 2011, 11:24 AM

Post #5 of 16 (468 views)
Permalink
Re: Apache2 and mod_perl deployment issue [In reply to]

On Mon, Nov 14, 2011 at 4:21 AM, Tomas Doran <bobtfish [at] bobtfish> wrote:

>
> On 14 Nov 2011, at 02:55, Adam Jimerson wrote:
>
> I am trying to deploy my app using the Catalyst Runtime 5.90006 using
>> mod_perl 2.0.5 on apache 2.2.17. I have all my configurations in a
>> virtual host file, can be found here http://cloud.vendion.net/apps/**
>> files_sharing/get.php?token=**9e6836a8d9e633e2c81390d73423be**b92df489aa<http://cloud.vendion.net/apps/files_sharing/get.php?token=9e6836a8d9e633e2c81390d73423beb92df489aa>
>> .
>>
>> My app runs fine under the development server script that ships with
>> catalyst, but when I try to start Apache with this virtual host file it
>> crashes Apache. If I enable -Debug in my Catalyst app
>> I can see where the app is being loaded with Apache and that mod_perl is
>> working
>>
>
> You mean it is loading, not that it's working :)
>
>
Yea that is what I mean, and to answer an earlier question yes I do have a
LoadModule directive for mod_perl


>
> , and that the virtual host file passed the Syntax check. The only clue
>> that can find in my servers logs is:
>>
>> httpd2-prefork[21582]: segfault at 7f1cac9f84c0 ip 00007f1cac9f84c0 sp
>> 00007fffd98d11d8 error 14 in librt-2.11.3.so[7f1cae229000+**8000]
>>
>
> Hmm, that's not particularly nice.. But it's not crashing inside perl - so
> I'd guess this is an issue with your apache and/or mod_perl, rather than
> with the perl code itself.
>
>
>
That was my first thought as well, but not getting help from my Distros
support forums as far as server/module falls


> Running Apache under gdb with debug symbols for apache and mod_perl
>> installed there is no stack trace generated but the only error I see is
>> this:
>>
>
> This would be as apache forks, and the gdb doesn't follow that..
>
>
Would strace be able to follow the fork, or would I be in the same boat
there? The only thing that I can see that would be causing it is a couple
of lines like this:

rt_sigprocmask(SIG_BLOCK, [INT CHLD], [CHLD], 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7f6cc00c69d0) = 23938
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
close(3) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
rt_sigaction(SIGINT, {0x439950, [], SA_RESTORER|SA_RESTART,
0x7f6cbf4b9e10}, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f6cbf4b9e10}, 8)
= 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 23937
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 23938
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f6cbf4b9e10},
{0x439950, [], SA_RESTORER|SA_RESTART, 0x7f6cbf4b9e10}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
close(3) = -1 EBADF (Bad file descriptor)


>
> Syntax error on line 7 of /etc/apache2/vhosts.d/www.**vendion.net.conf:
>> Invalid command 'PerlSwitches', perhaps misspelled or defined by a module
>> not included in the server configuration
>>
>
> How much of the config can you remove (and still get the segfault?)
>
> Does it only take the PerlSwitches line and/or the <Perl> block (if so
> it's _definitely_ an issue with your mod_perl/Apache, as with the
> 'PerlModule' statement removed, no code except mod_perl is actually being
> loaded.
>
>
Without the <Perl> block I get this error when trying to start Apache2:

startproc: exit status of parent of /usr/sbin/httpd2-prefork: 1

Without the PerlSwitches line that is what causes it to segfault.


peter at dragonstaff

Nov 14, 2011, 12:28 PM

Post #6 of 16 (470 views)
Permalink
Re: Apache2 and mod_perl deployment issue [In reply to]

Hi if you run the Apache server in single threaded mode with the -X flag
you should be able to strace it or gdb it.
Regards, Peter
On Nov 14, 2011 7:34 PM, "Adam Jimerson" <vendion [at] gmail> wrote:

> On Mon, Nov 14, 2011 at 4:21 AM, Tomas Doran <bobtfish [at] bobtfish>wrote:
>
>>
>> On 14 Nov 2011, at 02:55, Adam Jimerson wrote:
>>
>> I am trying to deploy my app using the Catalyst Runtime 5.90006 using
>>> mod_perl 2.0.5 on apache 2.2.17. I have all my configurations in a
>>> virtual host file, can be found here http://cloud.vendion.net/apps/**
>>> files_sharing/get.php?token=**9e6836a8d9e633e2c81390d73423be**b92df489aa<http://cloud.vendion.net/apps/files_sharing/get.php?token=9e6836a8d9e633e2c81390d73423beb92df489aa>
>>> .
>>>
>>> My app runs fine under the development server script that ships with
>>> catalyst, but when I try to start Apache with this virtual host file it
>>> crashes Apache. If I enable -Debug in my Catalyst app
>>> I can see where the app is being loaded with Apache and that mod_perl is
>>> working
>>>
>>
>> You mean it is loading, not that it's working :)
>>
>>
> Yea that is what I mean, and to answer an earlier question yes I do have a
> LoadModule directive for mod_perl
>
>
>>
>> , and that the virtual host file passed the Syntax check. The only clue
>>> that can find in my servers logs is:
>>>
>>> httpd2-prefork[21582]: segfault at 7f1cac9f84c0 ip 00007f1cac9f84c0 sp
>>> 00007fffd98d11d8 error 14 in librt-2.11.3.so[7f1cae229000+**8000]
>>>
>>
>> Hmm, that's not particularly nice.. But it's not crashing inside perl -
>> so I'd guess this is an issue with your apache and/or mod_perl, rather than
>> with the perl code itself.
>>
>>
>>
> That was my first thought as well, but not getting help from my Distros
> support forums as far as server/module falls
>
>
>> Running Apache under gdb with debug symbols for apache and mod_perl
>>> installed there is no stack trace generated but the only error I see is
>>> this:
>>>
>>
>> This would be as apache forks, and the gdb doesn't follow that..
>>
>>
> Would strace be able to follow the fork, or would I be in the same boat
> there? The only thing that I can see that would be causing it is a couple
> of lines like this:
>
> rt_sigprocmask(SIG_BLOCK, [INT CHLD], [CHLD], 8) = 0
> clone(child_stack=0,
> flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
> child_tidptr=0x7f6cc00c69d0) = 23938
> rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
> close(3) = 0
> rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
> rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
> rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
> rt_sigaction(SIGINT, {0x439950, [], SA_RESTORER|SA_RESTART,
> 0x7f6cbf4b9e10}, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f6cbf4b9e10}, 8)
> = 0
> wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 23937
> wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 23938
> rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER|SA_RESTART,
> 0x7f6cbf4b9e10}, {0x439950, [], SA_RESTORER|SA_RESTART, 0x7f6cbf4b9e10}, 8)
> = 0
> rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
> close(3) = -1 EBADF (Bad file descriptor)
>
>
>>
>> Syntax error on line 7 of /etc/apache2/vhosts.d/www.**vendion.net.conf:
>>> Invalid command 'PerlSwitches', perhaps misspelled or defined by a
>>> module not included in the server configuration
>>>
>>
>> How much of the config can you remove (and still get the segfault?)
>>
>> Does it only take the PerlSwitches line and/or the <Perl> block (if so
>> it's _definitely_ an issue with your mod_perl/Apache, as with the
>> 'PerlModule' statement removed, no code except mod_perl is actually being
>> loaded.
>>
>>
> Without the <Perl> block I get this error when trying to start Apache2:
>
> startproc: exit status of parent of /usr/sbin/httpd2-prefork: 1
>
> Without the PerlSwitches line that is what causes it to segfault.
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>
>


vendion at gmail

Nov 14, 2011, 12:59 PM

Post #7 of 16 (470 views)
Permalink
Re: Apache2 and mod_perl deployment issue [In reply to]

I did use the -X flag on gdb and it didn't provide any useful information.
On Nov 14, 2011 3:30 PM, "Peter Edwards" <peter [at] dragonstaff> wrote:

> Hi if you run the Apache server in single threaded mode with the -X flag
> you should be able to strace it or gdb it.
> Regards, Peter
> On Nov 14, 2011 7:34 PM, "Adam Jimerson" <vendion [at] gmail> wrote:
>
>> On Mon, Nov 14, 2011 at 4:21 AM, Tomas Doran <bobtfish [at] bobtfish>wrote:
>>
>>>
>>> On 14 Nov 2011, at 02:55, Adam Jimerson wrote:
>>>
>>> I am trying to deploy my app using the Catalyst Runtime 5.90006 using
>>>> mod_perl 2.0.5 on apache 2.2.17. I have all my configurations in a
>>>> virtual host file, can be found here http://cloud.vendion.net/apps/**
>>>> files_sharing/get.php?token=**9e6836a8d9e633e2c81390d73423be**
>>>> b92df489aa<http://cloud.vendion.net/apps/files_sharing/get.php?token=9e6836a8d9e633e2c81390d73423beb92df489aa>
>>>> .
>>>>
>>>> My app runs fine under the development server script that ships with
>>>> catalyst, but when I try to start Apache with this virtual host file it
>>>> crashes Apache. If I enable -Debug in my Catalyst app
>>>> I can see where the app is being loaded with Apache and that mod_perl
>>>> is working
>>>>
>>>
>>> You mean it is loading, not that it's working :)
>>>
>>>
>> Yea that is what I mean, and to answer an earlier question yes I do have
>> a LoadModule directive for mod_perl
>>
>>
>>>
>>> , and that the virtual host file passed the Syntax check. The only
>>>> clue that can find in my servers logs is:
>>>>
>>>> httpd2-prefork[21582]: segfault at 7f1cac9f84c0 ip 00007f1cac9f84c0 sp
>>>> 00007fffd98d11d8 error 14 in librt-2.11.3.so[7f1cae229000+**8000]
>>>>
>>>
>>> Hmm, that's not particularly nice.. But it's not crashing inside perl -
>>> so I'd guess this is an issue with your apache and/or mod_perl, rather than
>>> with the perl code itself.
>>>
>>>
>>>
>> That was my first thought as well, but not getting help from my Distros
>> support forums as far as server/module falls
>>
>>
>>> Running Apache under gdb with debug symbols for apache and mod_perl
>>>> installed there is no stack trace generated but the only error I see is
>>>> this:
>>>>
>>>
>>> This would be as apache forks, and the gdb doesn't follow that..
>>>
>>>
>> Would strace be able to follow the fork, or would I be in the same boat
>> there? The only thing that I can see that would be causing it is a couple
>> of lines like this:
>>
>> rt_sigprocmask(SIG_BLOCK, [INT CHLD], [CHLD], 8) = 0
>> clone(child_stack=0,
>> flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
>> child_tidptr=0x7f6cc00c69d0) = 23938
>> rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
>> close(3) = 0
>> rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
>> rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
>> rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
>> rt_sigaction(SIGINT, {0x439950, [], SA_RESTORER|SA_RESTART,
>> 0x7f6cbf4b9e10}, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f6cbf4b9e10}, 8)
>> = 0
>> wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 23937
>> wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 23938
>> rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER|SA_RESTART,
>> 0x7f6cbf4b9e10}, {0x439950, [], SA_RESTORER|SA_RESTART, 0x7f6cbf4b9e10}, 8)
>> = 0
>> rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
>> close(3) = -1 EBADF (Bad file descriptor)
>>
>>
>>>
>>> Syntax error on line 7 of /etc/apache2/vhosts.d/www.**vendion.net.conf:
>>>> Invalid command 'PerlSwitches', perhaps misspelled or defined by a
>>>> module not included in the server configuration
>>>>
>>>
>>> How much of the config can you remove (and still get the segfault?)
>>>
>>> Does it only take the PerlSwitches line and/or the <Perl> block (if so
>>> it's _definitely_ an issue with your mod_perl/Apache, as with the
>>> 'PerlModule' statement removed, no code except mod_perl is actually being
>>> loaded.
>>>
>>>
>> Without the <Perl> block I get this error when trying to start Apache2:
>>
>> startproc: exit status of parent of /usr/sbin/httpd2-prefork: 1
>>
>> Without the PerlSwitches line that is what causes it to segfault.
>>
>> _______________________________________________
>> List: Catalyst [at] lists
>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive:
>> http://www.mail-archive.com/catalyst [at] lists/
>> Dev site: http://dev.catalyst.perl.org/
>>
>>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>
>


bobtfish at bobtfish

Nov 14, 2011, 2:31 PM

Post #8 of 16 (470 views)
Permalink
Re: Apache2 and mod_perl deployment issue [In reply to]

On 14 Nov 2011, at 19:24, Adam Jimerson wrote:
> Would strace be able to follow the fork, or would I be in the same
> boat there? The only thing that I can see that would be causing it
> is a couple of lines like this:


Yes, it totally is (strace -f) - you just get the PID added..

> {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f6cbf4b9e10}, 8) = 0
> wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 23937
> wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 23938

Right - to it's waiting for child processes (as you're only seeing the
parent without -f)

> Without the <Perl> block I get this error when trying to start
> Apache2:
>
> startproc: exit status of parent of /usr/sbin/httpd2-prefork: 1
>
> Without the PerlSwitches line that is what causes it to segfault.

This is just totally broken. You can segfault your apache/mod_perl by
pushing onto @INC or similar..

You are using the prefork mpm, right?

Assuming you are - your distro's mod_perl is totally broken. Try their
mod_fastcgi instead? Why are you deploying with mod_perl anyway?

Cheers
t0m


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


bobtfish at bobtfish

Nov 14, 2011, 2:32 PM

Post #9 of 16 (474 views)
Permalink
Re: Apache2 and mod_perl deployment issue [In reply to]

On 14 Nov 2011, at 20:59, Adam Jimerson wrote:

> I did use the -X flag on gdb and it didn't provide any useful
> information.
>

Can you still get it to segfault?

What's the backtrace look like?

Cheers
t0m



_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


vendion at gmail

Nov 14, 2011, 4:22 PM

Post #10 of 16 (476 views)
Permalink
Re: Apache2 and mod_perl deployment issue [In reply to]

On Mon, Nov 14, 2011 at 5:31 PM, Tomas Doran <bobtfish [at] bobtfish> wrote:

>
> On 14 Nov 2011, at 19:24, Adam Jimerson wrote:
>
>> Would strace be able to follow the fork, or would I be in the same boat
>> there? The only thing that I can see that would be causing it is a couple
>> of lines like this:
>>
>
>
> Yes, it totally is (strace -f) - you just get the PID added..
>
>
> {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f6cbf4b9e10}, 8) = 0
>> wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 23937
>> wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 23938
>>
>
> Right - to it's waiting for child processes (as you're only seeing the
> parent without -f)


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)

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)



>
> Without the <Perl> block I get this error when trying to start Apache2:
>>
>> startproc: exit status of parent of /usr/sbin/httpd2-prefork: 1
>>
>> Without the PerlSwitches line that is what causes it to segfault.
>>
>
> This is just totally broken. You can segfault your apache/mod_perl by
> pushing onto @INC or similar..
>
> You are using the prefork mpm, right?
>
> Assuming you are - your distro's mod_perl is totally broken. Try their
> mod_fastcgi instead? Why are you deploying with mod_perl anyway?
>
>
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 and shared memory that mod_perl deployment had over
fastcgi, assuming of course this still holds true
http://search.cpan.org/~hkclark/Catalyst-Manual-5.9002/lib/Catalyst/Manual/Deployment/Apache/mod_perl.pod#Pros.


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.


vendion at gmail

Nov 14, 2011, 5:49 PM

Post #11 of 16 (485 views)
Permalink
Re: Apache2 and mod_perl deployment issue [In reply to]

>
> On Mon, Nov 14, 2011 at 5:31 PM, Tomas Doran <bobtfish [at] bobtfish>wrote:
>
>>

> Why are you deploying with mod_perl anyway?
>>
>
>>
>
After looking into deploying under mod_fastcgi turns out the closest thing
openSUSE ships with is mod_fcgid version 2.3.6 and I'm not sure if this is
good enough for
Catalyst deployment. The virtual host that I was able to get to do more
than spit out syntax errors using this module differs than the one shown as
an example in the Catalyst Manual, can be found here
http://cloud.vendion.net/apps/files_sharing/get.php?token=7fd021c437069ea9bf72cb104499da16d7ba19a5.
When testing I get a 500 error and in the error_log I see this:

Couldn't load class (Ickarus) because: Open of share file
/tmp/ickarus/session_data failed: Permission denied at
/usr/lib/perl5/site_perl/5.14.2/x86_64-linux-thread-multi/Cache/FastMmap.pm
line 640.

The session_data file was created by the server as such: -rw-r----- 1 root
root 5832704 Nov 9 13:07 /tmp/ickarus/session_data

On the plus side Apache isn't segfaulting :)


bobtfish at bobtfish

Nov 16, 2011, 9:10 AM

Post #12 of 16 (477 views)
Permalink
Re: Apache2 and mod_perl deployment issue [In reply to]

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



_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


bobtfish at bobtfish

Nov 16, 2011, 9:13 AM

Post #13 of 16 (482 views)
Permalink
Re: Apache2 and mod_perl deployment issue [In reply to]

On 15 Nov 2011, at 01:49, Adam Jimerson wrote:

> On Mon, Nov 14, 2011 at 5:31 PM, Tomas Doran <bobtfish [at] bobtfish>
> wrote:
>
> Why are you deploying with mod_perl anyway?
>
>
>
> After looking into deploying under mod_fastcgi turns out the closest
> thing openSUSE ships with is mod_fcgid version 2.3.6 and I'm not
> sure if this is good enough for
> Catalyst deployment.

There isn't really a 'good enough' here, mod_fcgid is 'dynamic'
fastcgi, which IMO isn't as good as being able to run the fcgi servers
in external mode, but works fine..

> Couldn't load class (Ickarus) because: Open of share file /tmp/
> ickarus/session_data failed: Permission denied at /usr/lib/perl5/
> site_perl/5.14.2/x86_64-linux-thread-multi/Cache/FastMmap.pm line 640.
>
> The session_data file was created by the server as such: -rw-r-----
> 1 root root 5832704 Nov 9 13:07 /tmp/ickarus/session_data

Cache::FastMmap is another brilliant way to get really annoyed and
enjoy the benefits of segfaulting.

It's also fast.

Which do you prefer? :)

(You can probably just get away with unfucking the permissions however).

Cheers
t0m


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


vendion at gmail

Nov 16, 2011, 10:51 AM

Post #14 of 16 (471 views)
Permalink
Re: Apache2 and mod_perl deployment issue [In reply to]

On Wed, Nov 16, 2011 at 12:10 PM, Tomas Doran <bobtfish [at] bobtfish> wrote:

>
>> 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?
>
>
Not a half dozen but would more than likely end up running at least two
apps on the server.


> 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' :_)
>
>
If that is wrong then they is there this section of the manual
http://search.cpan.org/~hkclark/Catalyst-Manual-5.9002/lib/Catalyst/Manual/Deployment/Apache/FastCGI.pod#Authorization_header_with_mod_fastcgi_or_mod_cgi
I was able to deploy my app using mod_fcgid, and I wasn't able to
authenticate until I added the rewrite rules to the vhost file, so if there
is a non mod_rewrite way of doing that then please share. It would also be
helpful if the doc listed the pros between Standalone server mode, static
mod, and dynamic mode if there are any.


bobtfish at bobtfish

Nov 17, 2011, 1:23 AM

Post #15 of 16 (470 views)
Permalink
Re: Apache2 and mod_perl deployment issue [In reply to]

On 16 Nov 2011, at 18:51, Adam Jimerson wrote:

> On Wed, Nov 16, 2011 at 12:10 PM, Tomas Doran
> <bobtfish [at] bobtfish> wrote:
>
> 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?
>
>
> Not a half dozen but would more than likely end up running at least
> two apps on the server.

I'd take the ability to restart them separately (this being the main
advantage of external mode) and the fact that they can depend on
different (and incompatible) versions of libraries (with their own
local::lib each) over any theoretical memory saving..

> If that is wrong then they is there this section of the manual http://search.cpan.org/~hkclark/Catalyst-Manual-5.9002/lib/Catalyst/Manual/Deployment/Apache/FastCGI.pod#Authorization_header_with_mod_fastcgi_or_mod_cgi
> I was able to deploy my app using mod_fcgid, and I wasn't able to
> authenticate until I added the rewrite rules to the vhost file, so
> if there is a non mod_rewrite way of doing that then please share.

Right, but this is only if you're doing basic auth (which is
relatively uncommon), and due to an issue in Apache core itself (you
don't need to do this for any other web server)...

> It would also be helpful if the doc listed the pros between
> Standalone server mode, static mod, and dynamic mode if there are any.

Yes, yes it would. Patches would be very welcome for this - I'll try
to do it when I next get a tuit, but my TODO list is massive :)

I should also have noted - re speed - that unless you're putting your
mod_perl behind a front-end web server that's proxying and serving the
static content for you, then fastcgi is _extremely likely_ to
_trounce_ mod_perl in real world speed.

The separation you get between 'web application building a page' and
'web server serving a page to a slow user' means that you need only
very few (big) fcgi processes, and more (light) web server processes -
whereas with mod_perl, your app is loaded in every process - so you're
using memory allocated in the perl interpreter just to send bytes down
the wire (slowly)...

Cheers
t0m


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


dhoworth at mrc-lmb

Nov 17, 2011, 3:00 AM

Post #16 of 16 (473 views)
Permalink
Re: Apache2 and mod_perl deployment issue [In reply to]

Adam Jimerson wrote:
> After looking into deploying under mod_fastcgi turns out the closest thing
> openSUSE ships with is mod_fcgid version 2.3.6

To find opensuse packages, the usual method is to search via
<http://software.opensuse.org/> or via equivalent search facilities in YaST.

Searching for 'fastcgi' turns up many packages, including
apache2-mod_fastcgi, which I think is what you would need (it's in the
Apache:Modules/openSUSE_12.1 repository, and I believe is also available
for earlier releases).

Cheers, Dave

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.