Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 559832

Summary: perl 5.8.8 has dup FD's limited to 2048 and mod_perl scripts doesn't run if httpd FD's > 2048
Product: Red Hat Enterprise Linux 5 Reporter: guilherme m. schroeder <skanabiz>
Component: perlAssignee: perl-maint-list
Status: CLOSED WONTFIX QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: urgent Docs Contact:
Priority: low    
Version: 5.4CC: ppisar, psabata, rvokal, skanabiz
Target Milestone: rc   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-08 11:58:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 641320    
Bug Blocks:    

Description guilherme m. schroeder 2010-01-29 06:04:45 UTC
Description of problem:

When httpd open more than 2048 FD's (more than 2k vhosts with error and custom logs, for example), mod_perl stops running perl scripts because perl version 5.8.8 has limited I/O FD's of 2048.

Version-Release number of selected component (if applicable):

Perl 5.8.8-27
mod_perl 2.0.4-6
httpd 2.2.3-31

How reproducible:

100%

Steps to Reproduce:

1. Create 2k vhosts on httpd with error and custom logs for everyone,  so httpd you open more than 2048 FD's.
2. Run a simple perl.pl 'hello world' and watch.
  
Actual results:

httpd child will die with this message on error_log:

Failed to dup STDIN: No such file or directory.

Expected results:

I expect to run perl scripts even if i've more than 2k vhosts on httpd.

Additional info:

Solution? I just got perl 5.8.8-27 SRPM and changed a little bit to 5.8.9. Compiled it and recompiled mod_ssl against. Right now my httpd process has 2102 FD's opened and my 'hello world' perl script runs fine.

Perl 5.8.9 doesn't have this limitation.

Look at perl-5.8.8/perlio.c:

#define PERLIO_MAX_REFCOUNTABLE_FD 2048

Then, at PerlIOUnix_dup()

   if (fd >= 0 && fd < PERLIO_MAX_REFCOUNTABLE_FD)

perl-5.8.9/perlio.c, same function:

   if (fd >= 0)

Could you please update perl version? or at least backport this change from 5.8.9.

I didn't test it with x86_64 neither other architectures, but i think shares the same limitation.

Thanks in advance.

Comment 1 Marcela Mašláňová 2010-02-01 09:53:31 UTC
Thank you for your thorough investigation. I suppose much more probable is using patch if it will be easy fix and easy to test.

Comment 2 Marcela Mašláňová 2010-02-01 10:01:28 UTC
The patch which should probably fix it is git commit 22c96fc102ce8ee52778a2d8a7fced27b492c1ee
but is quite probable there will be needed more patches because lot of changes between RHEL-5 perl-5.8.8 and perl-5.8.9.

Comment 3 guilherme m. schroeder 2010-03-30 16:49:07 UTC
So, RedHat 5.5 is out and we still have this bug?

Comment 4 Marcela Mašláňová 2010-03-31 06:58:13 UTC
So, as I said in comment#2, it's unlikely to fix it properly by this one commit. I suggest contact our support for finding the best solution: https://www.redhat.com/apps/support/

Comment 6 RHEL Program Management 2010-08-09 18:18:12 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 10 RHEL Program Management 2011-01-11 20:13:09 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 11 RHEL Program Management 2011-01-11 23:21:24 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 12 Marcela Mašláňová 2011-04-08 11:58:18 UTC
Fix this bug would mean hundreds of changes or better rebase to 5.8.9 #641320. Both possibilities are too intrusive for minor update of RHEL.
Closing as wontfix.