Bug 520867 - glibc should call pselect() and ppoll() on ia64 kernel
Summary: glibc should call pselect() and ppoll() on ia64 kernel
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.3
Hardware: ia64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Prarit Bhargava
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks: 533192 526775
TreeView+ depends on / blocked
 
Reported: 2009-09-02 18:07 UTC by Fabio Olive Leite
Modified: 2018-10-27 15:55 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 07:38:47 UTC


Attachments (Terms of Use)
Simple reproducer. (1013 bytes, text/plain)
2009-09-02 18:07 UTC, Fabio Olive Leite
no flags Details
Correct x86_64 pselect() call. (2.20 KB, text/plain)
2009-09-02 18:08 UTC, Fabio Olive Leite
no flags Details
Incorrect ia64 pselect() emulated by glibc. (2.05 KB, text/plain)
2009-09-02 18:09 UTC, Fabio Olive Leite
no flags Details
RHEL5 fix for this issue (481 bytes, patch)
2009-09-17 15:37 UTC, Prarit Bhargava
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0178 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.5 kernel security and bug fix update 2010-03-29 12:18:21 UTC

Description Fabio Olive Leite 2009-09-02 18:07:59 UTC
Created attachment 359564 [details]
Simple reproducer.

Description of problem:

Since bug 206806 was fixed in 2.6.18-98.el5 the ia64 kernel implements the pselect() and ppoll() syscalls. glibc is still not using them as of RHEL-5.3 and instead emulates it with the racy equivalent.

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

glibc-2.5-34

How reproducible:

Always.

Steps to Reproduce:

1. Compile and run test program attached.

Actual results:

Pending signals are caught at sigprocmask() time and then select() may block forever, in the racy pselect() "equivalent".

Expected results:

Use the actual pselect() syscall that will then return pending signals and not block forever.

Additional info:

x86_64 and ia64 straces of the test program will be attached.

Comment 1 Fabio Olive Leite 2009-09-02 18:08:41 UTC
Created attachment 359565 [details]
Correct x86_64 pselect() call.

Comment 2 Fabio Olive Leite 2009-09-02 18:09:41 UTC
Created attachment 359566 [details]
Incorrect ia64 pselect() emulated by glibc.

Comment 3 Andreas Schwab 2009-09-03 09:06:40 UTC
This is a bug in kernel-headers, it needs to define the syscalls.
glibc then just needs to be rebuilt against the fixed kernel-headers and it will magically pick up the syscalls.

Comment 5 Prarit Bhargava 2009-09-17 15:37:54 UTC
Created attachment 361518 [details]
RHEL5 fix for this issue

Patch that resolves this issue.

Tested by doing

1.  compile reproducer with existing glibc.  Test fails.

2.  apply patch to tree, and install kernel-headers.

3.  rebuild glibc rpms

4.  reinstall glibc rpms

5.  compile reproducer.  Test succeeds:

[root@altix4 tmp]# ./doit 
Calling pselect.
Test succeeded.

Comment 10 RHEL Product and Program Management 2009-09-25 17:38:14 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 11 Don Zickus 2009-10-06 19:39:15 UTC
in kernel-2.6.18-168.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.

Comment 14 Chris Ward 2010-02-11 10:25:43 UTC
~~ Attention Customers and Partners - RHEL 5.5 Beta is now available on RHN ~~

RHEL 5.5 Beta has been released! There should be a fix present in this 
release that addresses your request. Please test and report back results 
here, by March 3rd 2010 (2010-03-03) or sooner.

Upon successful verification of this request, post your results and update 
the Verified field in Bugzilla with the appropriate value.

If you encounter any issues while testing, please describe them and set 
this bug into NEED_INFO. If you encounter new defects or have additional 
patch(es) to request for inclusion, please clone this bug per each request
and escalate through your support representative.

Comment 17 Prarit Bhargava 2010-03-28 12:27:59 UTC
Clearing stale NEEDINFO request.

Comment 18 errata-xmlrpc 2010-03-30 07:38:47 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0178.html


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