Bug 977872 - fpathconf for a FIFO returns a different value than that for a directory
fpathconf for a FIFO returns a different value than that for a directory
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Siddhesh Poyarekar
Fedora Extras Quality Assurance
: Patch, Regression
Depends On:
  Show dependency treegraph
Reported: 2013-06-25 09:49 EDT by Siddhesh Poyarekar
Modified: 2016-11-24 07:12 EST (History)
10 users (show)

See Also:
Fixed In Version: glibc-2.17-11.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 916656
Last Closed: 2013-06-29 14:05:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Siddhesh Poyarekar 2013-06-25 09:49:54 EDT
+++ This bug was initially created as a clone of Bug #916656 +++

Description of problem:

this is a copy of F17 bug 879515.

pathconf for a FIFO returns a different value than fpathconf.

according to SUSv3, the result from fpathconf for a directory should be
the same as for a FIFO in that directory.

For more details see 

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

How reproducible:

Steps to Reproduce:
1. mkfifo fpathconf-t.15
2. mkfifo fpathconf-t.16
3. gcc fpathconf-t.c
4. ./a.out
Actual results:

On RHEL7 (and F17):
test15 PASS - fpathconf for 'fpathconf-t.15' (65536)  equals pathconf for 'fpathconf-t.15' (65536) 
test16 FAIL - fpathconf for '.' (4096)  does not equal fpathconf for 'fpathconf-t.16' (65536) 

Expected results:

test15 PASS - fpathconf for 'fpathconf-t.15' (4096)  equals pathconf for 'fpathconf-t.15' (4096) 
test16 PASS - fpathconf for '.' (4096)  equals fpathconf for 'fpathconf-t.16' (4096)

--- Additional comment from Karel Srot on 2013-03-01 03:01:41 EST ---

There seems to be similar problem with pathconf. From LSB test suite:

pathconf(".", _PC_PIPE_BUF) did not return same value as pathconf("pathconf-t.15", _PC_PIPE_BUF)
expected: 65536, observed: 4096

--- Additional comment from Siddhesh Poyarekar on 2013-03-01 08:36:02 EST ---

I've made another subtle change to the bz summary.  The standard doesn't say that the fifo pipe buffer is the same size as its containing directory.  What it says is that if the file/descriptor passed to {f}pathconf is a directory, then the buffer size returned could be for any FIFO that exists in it or could be created in it.  The only sane value for this is the default value of pipe buf size for Linux, since the value is dynamic on Linux (and the default is different form PIPE_BUF).  I've proposed a fix upstream:


--- Additional comment from Siddhesh Poyarekar on 2013-03-08 07:46:53 EST ---

This is what finally went upstream:


Code reverted to use PIPE_BUF since the linux pipe buffer size is not guaranteed to be the size of any atomic write and hence violates the spec.

--- Additional comment from Karel Srot on 2013-03-27 03:51:52 EDT ---

According to the latest comments from LSB bug this bug has to be fixed in 
distribution in order to be LSB compliant.

Comment 1 Fedora Update System 2013-06-25 13:31:16 EDT
glibc-2.17-11.fc19 has been submitted as an update for Fedora 19.
Comment 2 Fedora Update System 2013-06-26 13:09:42 EDT
Package glibc-2.17-11.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing glibc-2.17-11.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 3 Fedora Update System 2013-06-29 14:05:49 EDT
glibc-2.17-11.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

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