Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 543972

Summary: sys-libs/uclibc: fclose(stdout) does not throw ENOSPC when piped to /dev/full.
Product: Gentoo Linux Reporter: René Rhéaume <rene.rheaume>
Component: [OLD] Core systemAssignee: Embedded Gentoo Team <embedded>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 570544    
Attachments: emerge --info output
build.log from portage
tests/test-suite.log inside work directory

Description René Rhéaume 2015-03-21 00:10:52 UTC
Created attachment 399328 [details]
emerge --info output

As part of a system update, gzip should be updated to version 1.6. However, it fails in its test suite.

Steps to reproduce :
1. FEATURES="test" emerge -1 app-arch/gzip
Comment 1 René Rhéaume 2015-03-21 00:12:10 UTC
Created attachment 399330 [details]
build.log from portage
Comment 2 René Rhéaume 2015-03-21 00:13:52 UTC
Created attachment 399332 [details]
tests/test-suite.log inside work directory
Comment 3 Anthony Basile gentoo-dev 2015-04-21 15:16:00 UTC
For reasons I don't yet understand, its failing the disk full test.

On glibc I get:

# gzip --help >/dev/full 2>/dev/null ; echo $?
1
# gzip --version >/dev/full 2>/dev/null ; echo $?
1


On uclibc I get:

# gzip --help >/dev/full 2>/dev/null ; echo $?
0
# gzip --version >/dev/full 2>/dev/null ; echo $?
0

It fails the same way for all the built functions:

gzip gunzip gzexe zcat zforce zless zmore znew gzip gunzip gzexe zcat zforce zless zmore znew gzip gunzip gzexe zcat zforce zless zmore znew
Comment 4 Anthony Basile gentoo-dev 2015-04-21 15:20:25 UTC
More succinctly you can see the problem with:

glibc:

# echo "hi" > /dev/full
-bash: echo: write error: No space left on device
#  gzip --version > /dev/full
gzip: write error: No space left on device
#

uclibc:

# echo "hi" > /dev/full
-su: echo: write error: No space left on device
# gzip --version > /dev/full
# 


So >/dev/full is working on uclibc, just not for gzip.
Comment 5 Anthony Basile gentoo-dev 2015-04-25 20:03:14 UTC
The following reduced code show the problem:

#include <stdio.h>
#include <errno.h>

int main() {
        printf("sutff\n");
        if (fclose (stdout) != 0)
                error (0, errno, "");
        return 0;
}


On glibc, building this program and running gives

# ./test > /dev/full
./test: : No space left on device
#

while on uclibc it is silent:

# ./test > /dev/full
#
Comment 6 David Seifert gentoo-dev 2022-01-02 10:26:14 UTC
uclibc support in Gentoo has been removed.