Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1288662 - openat() && write() broken on i386 with _FILE_OFFSET_BITS 64
Summary: openat() && write() broken on i386 with _FILE_OFFSET_BITS 64
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 23
Hardware: i386
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Florian Weimer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-04 22:27 UTC by Pavel Raiskup
Modified: 2015-12-06 19:18 UTC (History)
8 users (show)

Fixed In Version: glibc-2.22-6.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-06 19:18:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Reproducer (srpm) (6.16 KB, application/octet-stream)
2015-12-04 22:32 UTC, Pavel Raiskup
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Sourceware 18781 0 None None None Never

Description Pavel Raiskup 2015-12-04 22:27:20 UTC
This issue breaks GNU tar for big files.  See:
https://copr.fedoraproject.org/coprs/praiskup/tar/monitor/

Reproducer (always fails with 'write: File too large'):

#define _FILE_OFFSET_BITS 64

#include <sys/types.h>
#include <unistd.h>

#include <fcntl.h>
#include <stdio.h>

int main()
{
  char buf[512];
#if 1
  /* this makes the following write() fail */
  int fd = openat (AT_FDCWD, "sparsefile", O_WRONLY | O_CREAT, 420);
#else
  /* this is OK */
  int fd = open ("sparsefile", O_WRONLY | O_CREAT, 420);
#endif
  if ((off_t)-1 == lseek (fd, 8589935104, SEEK_SET)) {
    perror ("lseek");
    return 1;
  }

  if ((ssize_t)-1 == write(fd, buf, 512)) {
    perror ("write");
    return 1;
  }

  return 0;
}

Comment 1 Pavel Raiskup 2015-12-04 22:32:06 UTC
Created attachment 1102452 [details]
Reproducer (srpm)

Build fail in copr:
https://copr-be.cloud.fedoraproject.org/results/praiskup/tar/fedora-23-i386/00144932-tar-git-vanilla/

Koji build fail with attached reproducer:
http://koji.fedoraproject.org/koji/taskinfo?taskID=12058344

Comment 2 Pavel Raiskup 2015-12-04 23:33:30 UTC
# rpm -q glibc
glibc-2.22-5.fc23.i686

Comment 3 Florian Weimer 2015-12-05 12:21:40 UTC
glibc-2.22-5.fc23.i686 confirmed as affected, but glibc-2.21-5.fc22.i686 is not.

Comment 4 Fedora Update System 2015-12-05 16:47:53 UTC
glibc-2.22-6.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-7174c4d68d

Comment 5 Fedora Update System 2015-12-06 17:20:41 UTC
glibc-2.22-6.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update glibc'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-7174c4d68d

Comment 6 Fedora Update System 2015-12-06 19:18:21 UTC
glibc-2.22-6.fc23 has been pushed to the Fedora 23 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.