Bug 2359737

Summary: glibc: Review and resolve stdio flushing issues
Product: [Fedora] Fedora Reporter: Frédéric Bérat <fberat>
Component: glibcAssignee: Frédéric Bérat <fberat>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 41CC: arjun, codonell, dj, fberat, fweimer, jlaw, josmyers, mcermak, mcoufal, mfabian, pfrankli, sipoyare, skolosov, suraj.ghimire7
Target Milestone: ---Flags: fberat: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: glibc-2.41-4.fc42 glibc-2.40-24.fc41 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-05-22 07:36:31 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 Frédéric Bérat 2025-04-15 12:31:08 UTC
The original ticket was to review and resolve the following upstream issues:

https://sourceware.org/bugzilla/show_bug.cgi?id=5994
https://sourceware.org/bugzilla/show_bug.cgi?id=12724
https://sourceware.org/bugzilla/show_bug.cgi?id=12799
https://sourceware.org/bugzilla/show_bug.cgi?id=32369

Since these have been fixed, backport the following fixes downstream:

921690512946d73bf66a8c495baff31316e4489f support: Add the xstatx function
e7c14e542d8d858b824b5df4f4e3dc93695e6171 support: Use macros for *stat wrappers
04b1eb161fdc8b88876bf78b34d2bb92584aba45 support: Add xdup
377e9733b50ce41e496c467ddcc112f73c88f3bd Fix fflush after ungetc on input file (bug 5994)
be6818be31e756398e45f70e2819d78be0961223 Make fclose seek input file to right offset (bug 12724)
94251ae99edaa911f4cb8056748dca0874ea268c Make fflush (NULL) flush input files (bug 32369)
0dcc0b2f63051863187dc678964eb17761b1a820 Fix fseek handling for mmap files after ungetc or fflush (bug 32529)
3ff3b9997cfef891ba33a14f1dcba0310d96369c Fix fflush handling for mmap files after ungetc (bug 32535)
203452a460143c2b0bf80e0e92027e0fd6e19fa4 Add test of input file flushing / offset issues
7b47b3dd214c8ff2c699f13efe5533941be53635 libio: Synthesize ESPIPE error if lseek returns 0 after reading bytes

Reproducible: Always

Comment 1 Fedora Update System 2025-04-25 16:20:13 UTC
FEDORA-2025-aaee130bc7 (glibc-2.41-4.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-aaee130bc7

Comment 2 Fedora Update System 2025-04-26 04:58:59 UTC
FEDORA-2025-aaee130bc7 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-aaee130bc7`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-aaee130bc7

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Fedora Update System 2025-04-27 03:11:06 UTC
FEDORA-2025-25ccf24fff has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-25ccf24fff`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-25ccf24fff

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2025-04-28 01:32:13 UTC
FEDORA-2025-25ccf24fff (glibc-2.41-5.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Florian Weimer 2025-05-16 13:08:57 UTC
Fedora 41 could still get fixed.

Comment 6 Florian Weimer 2025-05-22 07:36:31 UTC
Fixed in Fedora 41 after all.