You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ken Simpson <ks...@larch.mailchannels.com> on 2004/08/25 18:54:12 UTC

mod_perl 1.99_16 tests fail on OpenBSD due to low open files limit

FYI, I just discovered after much pain and suffering that the mod_perl
test suite fails to run on OpenBSD 3.5 because it tries to open more
than 64 files at once.

To duplicate, try this on your OpenBSD box:

$ sudo ktrace -d /usr/local/apache2.0.50-modperl1.99_16/bin/httpd -d \
   /export/src/mod_perl-1.99_16/t -f
   /export/src/mod_perl-1.99_16/t/conf/httpd.conf -D APACHE2 -X

[Wed Aug 25 09:49:40 2004] [info] 26 Apache:: modules loaded
[Wed Aug 25 09:49:40 2004] [info] 7 APR:: modules loaded
[Wed Aug 25 09:49:40 2004] [info] base server + 20 vhosts ready to run
tests
[Wed Aug 25 09:49:40 2004] [error] Can't locate TestFilter/in_str_consume.pm in @INC (@INC contains:
/export/src/mod_perl-1.99_16/t/lib
/export/src/mod_perl-1.99_16/Apache-Test/lib
/export/src/mod_perl-1.99_16/t/response
/export/src/mod_perl-1.99_16/t/protocol
/export/src/mod_perl-1.99_16/t/preconnection
/export/src/mod_perl-1.99_16/t/hooks
/export/src/mod_perl-1.99_16/t/filter /export/src/mod_perl-1.99_16/t
/export/src/mod_perl-1.99_16/t/htdocs/testdirective/main
/export/src/mod_perl-1.99_16/t/htdocs/testdirective/perlmodule-vh
/export/src/mod_perl-1.99_16/t/
/export/src/mod_perl-1.99_16/t/lib/perl
/export/src/mod_perl-1.99_16/blib/lib
/export/src/mod_perl-1.99_16/blib/arch
/usr/local/lib/perl5/5.8.4/OpenBSD.i386-openbsd
/usr/local/lib/perl5/5.8.4
/usr/local/lib/perl5/site_perl/5.8.4/OpenBSD.i386-openbsd
/usr/local/lib/perl5/site_perl/5.8.4
/usr/local/lib/perl5/site_perl/5.8.2/OpenBSD.i386-openbsd
/usr/local/lib/perl5/site_perl/5.8.2 /usr/local/lib/perl5/site_perl) at (eval 65) line 3.\n
[Wed Aug 25 09:49:40 2004] [error] Can't load Perl module TestFilter::in_str_consume for server localhost.orslut.com:8529, exiting...

---

Perl can't load TestFilter/in_str_consume.pm because it can't open
the file -- as evidenced in the ktrace dump:

 16641 httpd    NAMI "/export/src/mod_perl-1.99_16/t/lib/TestFilter/in_str_consume.pmc"
 16641 httpd    RET   stat -1 errno 2 No such file or directory
 16641 httpd    CALL  open(0x3cdae100,0,0)
 16641 httpd    RET   open -1 errno 24 Too many open files

This problem can be resolved by increasing the open file limit to 128:

 $ ulimit -n 128

I hope this helps someone down the road!

Regards,
Ken


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: mod_perl 1.99_16 tests fail on OpenBSD due to low open files limit

Posted by Stas Bekman <st...@stason.org>.
Ken Simpson wrote:
> FYI, I just discovered after much pain and suffering that the mod_perl
> test suite fails to run on OpenBSD 3.5 because it tries to open more
> than 64 files at once.
[...]
> Perl can't load TestFilter/in_str_consume.pm because it can't open
> the file -- as evidenced in the ktrace dump:
> 
>  16641 httpd    NAMI "/export/src/mod_perl-1.99_16/t/lib/TestFilter/in_str_consume.pmc"
>  16641 httpd    RET   stat -1 errno 2 No such file or directory
>  16641 httpd    CALL  open(0x3cdae100,0,0)
>  16641 httpd    RET   open -1 errno 24 Too many open files
> 
> This problem can be resolved by increasing the open file limit to 128:
> 
>  $ ulimit -n 128
> 
> I hope this helps someone down the road!

Thanks Ken. I've adopted your report in the troubleshooting section:
http://perl.apache.org/docs/2.0/user/troubleshooting/troubleshooting.html#Can_t_locate_F_TestFilter_in_str_consume_pm__in_C__INC____


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: mod_perl 1.99_16 tests fail on OpenBSD due to low open files limit

Posted by Ken Simpson <ks...@larch.mailchannels.com>.
> >But the test scripts do set non blocking mode. I wonder if perhaps
> >it's not working inside Apache?
> 
> I'm not following you, Ken, what seems to be the problem?

Non blocking mode is not actually being set despite the call to
opt_set().

TTUL
Ken

-- 
MailChannels: Control Your Email
http://www.mailchannels.com

Ken Simpson, CEO
+1-604-729-1741

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: mod_perl 1.99_16 tests fail on OpenBSD due to low open files limit

Posted by Stas Bekman <st...@stason.org>.
Ken Simpson wrote:
> BTW -- just noticed that there's some documentation saying that the
> socket needs to be set to nonblocking mode to avoid this error (the
> "Resource temporarily unavailable" error).

On certain platforms, yes, introduced by Apache 2.0.50 I believe as a fix 
to some security issue.

> But the test scripts do set non blocking mode. I wonder if perhaps
> it's not working inside Apache?

I'm not following you, Ken, what seems to be the problem?


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: mod_perl 1.99_16 tests fail on OpenBSD due to low open files limit

Posted by Ken Simpson <ks...@larch.mailchannels.com>.
BTW -- just noticed that there's some documentation saying that the
socket needs to be set to nonblocking mode to avoid this error (the
"Resource temporarily unavailable" error).

But the test scripts do set non blocking mode. I wonder if perhaps
it's not working inside Apache?

TTUL
Ken

Ken Simpson [25/08/04 09:54 -0700]:
> FYI, I just discovered after much pain and suffering that the mod_perl
> test suite fails to run on OpenBSD 3.5 because it tries to open more
> than 64 files at once.
> 
> To duplicate, try this on your OpenBSD box:
> 
> $ sudo ktrace -d /usr/local/apache2.0.50-modperl1.99_16/bin/httpd -d \
>    /export/src/mod_perl-1.99_16/t -f
>    /export/src/mod_perl-1.99_16/t/conf/httpd.conf -D APACHE2 -X
> 
> [Wed Aug 25 09:49:40 2004] [info] 26 Apache:: modules loaded
> [Wed Aug 25 09:49:40 2004] [info] 7 APR:: modules loaded
> [Wed Aug 25 09:49:40 2004] [info] base server + 20 vhosts ready to run
> tests
> [Wed Aug 25 09:49:40 2004] [error] Can't locate TestFilter/in_str_consume.pm in @INC (@INC contains:
> /export/src/mod_perl-1.99_16/t/lib
> /export/src/mod_perl-1.99_16/Apache-Test/lib
> /export/src/mod_perl-1.99_16/t/response
> /export/src/mod_perl-1.99_16/t/protocol
> /export/src/mod_perl-1.99_16/t/preconnection
> /export/src/mod_perl-1.99_16/t/hooks
> /export/src/mod_perl-1.99_16/t/filter /export/src/mod_perl-1.99_16/t
> /export/src/mod_perl-1.99_16/t/htdocs/testdirective/main
> /export/src/mod_perl-1.99_16/t/htdocs/testdirective/perlmodule-vh
> /export/src/mod_perl-1.99_16/t/
> /export/src/mod_perl-1.99_16/t/lib/perl
> /export/src/mod_perl-1.99_16/blib/lib
> /export/src/mod_perl-1.99_16/blib/arch
> /usr/local/lib/perl5/5.8.4/OpenBSD.i386-openbsd
> /usr/local/lib/perl5/5.8.4
> /usr/local/lib/perl5/site_perl/5.8.4/OpenBSD.i386-openbsd
> /usr/local/lib/perl5/site_perl/5.8.4
> /usr/local/lib/perl5/site_perl/5.8.2/OpenBSD.i386-openbsd
> /usr/local/lib/perl5/site_perl/5.8.2 /usr/local/lib/perl5/site_perl) at (eval 65) line 3.\n
> [Wed Aug 25 09:49:40 2004] [error] Can't load Perl module TestFilter::in_str_consume for server localhost.orslut.com:8529, exiting...
> 
> ---
> 
> Perl can't load TestFilter/in_str_consume.pm because it can't open
> the file -- as evidenced in the ktrace dump:
> 
>  16641 httpd    NAMI "/export/src/mod_perl-1.99_16/t/lib/TestFilter/in_str_consume.pmc"
>  16641 httpd    RET   stat -1 errno 2 No such file or directory
>  16641 httpd    CALL  open(0x3cdae100,0,0)
>  16641 httpd    RET   open -1 errno 24 Too many open files
> 
> This problem can be resolved by increasing the open file limit to 128:
> 
>  $ ulimit -n 128
> 
> I hope this helps someone down the road!
> 
> Regards,
> Ken
> 
> 
> -- 
> Report problems: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
> List etiquette: http://perl.apache.org/maillist/email-etiquette.html
> 

-- 
MailChannels: Control Your Email
http://www.mailchannels.com

Ken Simpson, CEO
+1-604-729-1741

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html