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 604887

Summary: sysfs_poll() does not treat /sys as regular files
Product: Red Hat Enterprise Linux 5 Reporter: Ian Meyer <ianmmeyer>
Component: kernelAssignee: Red Hat Kernel Manager <kernel-mgr>
kernel sub component: Other QA Contact: Red Hat Kernel QE team <kernel-qe>
Status: CLOSED WONTFIX Docs Contact:
Severity: medium    
Priority: low CC: alexey, ianmmeyer, kernel-mgr, mkent
Version: 5.5   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-02 13:22:33 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:

Description Ian Meyer 2010-06-16 23:05:06 UTC
Description of problem:

Using http://gist.github.com/raw/441278/491762a02acddff9374c026fd3fe81221109e695/gistfile3.h on a RHEL 5.5 system exhibits the bad behavior.

Version-Release number of selected component (if applicable):
kernel 2.6.18-194.3.1.el5

How reproducible:
Always.

Steps to Reproduce:
1. Download and compile http://gist.github.com/raw/441278/491762a02acddff9374c026fd3fe81221109e695/gistfile3.h
2. Execute compiled binary

Alternatively with ruby:
1. ruby -e 'IO.select([File.open("/sys/block/hda/size")], nil, nil, nil)'

On a fixed system, that ruby call will return instantly, on a broken system, it will hang indefinitely.
  
Actual results:
➜  ~  ./blah hda 
fd = 3
selret = 0
FD_ISSET(3) is 0
time elapsed = 4.999650 seconds

Expected results:
fd = 3
selret = 1
FD_ISSET(3) is 1
time elapsed = 0.000024 seconds

Additional info:

This was fixed in commit 1af3557abdef34ee036a6de4cb79e24468544b8d of kernel 2.6.30

Comment 1 Matthew Kent 2010-06-16 23:10:09 UTC
Seeing this on 2.6.18-164 as well, verified it's fixed in 2.6.30 on another server.

Comment 2 Oleksiy Kovyrin 2011-12-04 07:57:27 UTC
I was wondering if there is any progress on this bug. We experience it too on our rhel5 servers and really need a solution that does not boil down to "do not call select() on /proc or /sys files".

Comment 3 RHEL Program Management 2014-03-07 13:54:43 UTC
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.

Comment 4 Ian Meyer 2014-03-07 20:00:13 UTC
Why is this going to be closed as WONTFIX? I'm not sure what other information I need to provide here per the email request of "needinfo".

Comment 5 RHEL Program Management 2014-06-02 13:22:33 UTC
Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in RHEL5 stream. If the issue is critical for your business, please provide additional business justification through the appropriate support channels (https://access.redhat.com/site/support).

Comment 6 Red Hat Bugzilla 2023-09-14 01:21:29 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days