Bug 559832 - perl 5.8.8 has dup FD's limited to 2048 and mod_perl scripts doesn't run if httpd FD's > 2048
Summary: perl 5.8.8 has dup FD's limited to 2048 and mod_perl scripts doesn't run if h...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: perl
Version: 5.4
Hardware: i686
OS: Linux
low
urgent
Target Milestone: rc
: ---
Assignee: perl-maint-list
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On: 641320
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-29 06:04 UTC by guilherme m. schroeder
Modified: 2011-04-08 11:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-08 11:58:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.