Bug 329141

Summary: Problem with write large buffer(>= 2Gb) under x86_64 kernel
Product: [Fedora] Fedora Reporter: ZHOU Xiaodong <zhoux>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 7CC: chris.brown, eparis, jakub
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-16 01:03:12 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 ZHOU Xiaodong 2007-10-12 07:49:30 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7

Description of problem:
I was told that we have made the decision there is 3 years to matche the
"upstream" behavior ( I think that means the 32-bits system behavoir).
If there is some improvement for supporting the real 64 bits IOs ?

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

How reproducible:
Always


Steps to Reproduce:
In a C progam, write a buffer with his size >= 2Gb

Actual Results:


Expected Results:


Additional info:

Comment 1 Chuck Ebbert 2007-10-12 23:30:34 UTC
I don't think this is a kernel problem.

And, you didn't report what actually happens.

Comment 2 ZHOU Xiaodong 2007-10-13 05:31:57 UTC
Under any kernel version >= 2.6.11 (x86_64 system),
the C function write() or fwrite() failed to write
a buffer when his size >= 2Gb

For the older kernel versions 2.6.x (x<11), the tests
passe successefully.


Comment 3 Christopher Brown 2008-01-14 18:39:56 UTC
Hello,

I'm reviewing this bug as part of the kernel bug triage project, an attempt to
isolate current bugs in the Fedora kernel.

http://fedoraproject.org/wiki/KernelBugTriage

I am CC'ing myself to this bug and will try and assist you in resolving it if I can.

There hasn't been much activity on this bug for a while. Could you tell me if
you are still having problems with the latest kernel?

If the problem no longer exists then please close this bug or I'll do so in a
few days if there is no additional information lodged.

Comment 4 ZHOU Xiaodong 2008-01-15 11:56:18 UTC
I jsut installed the most recently debian kernel in the kernel archive
"linux-image-2.6.23-1-amd64_2.6.23-3~snapshot.10051_amd64.deb"
on my debian etch amd64 system (sorry I don't have no more Fedora x86_64
system). And I compile the following program

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>


int main (int argc, char *argv[])
{
  int fd;
  size_t size_to_wrt;
  void *buffer_to_wrt;
  ssize_t size_wrten;

  size_to_wrt = 2147483648; /* can not beyond 2147483647 bytes */
  buffer_to_wrt = malloc(size_to_wrt);
  if(buffer_to_wrt == NULL) printf("Malloc error\n");
  
    
  fd  = open(argv[1],  O_CREAT | O_RDWR, S_IRUSR|S_IWUSR);
  size_wrten = write(fd, buffer_to_wrt, size_to_wrt);
  if(size_wrten != size_to_wrt)
   printf("Error message: %s\n", strerror(errno));
  free(buffer_to_wrt);
  close(fd);

  return 0;
}

$cc -o test_write test_write.c

and run as
$ test_write foo

program run without error but the file written (foo) has not the good size,
which is 2147479552 byes, ie, 4096 bytes (just one page size) less than the
requested one.

So we can not say this bug has been resolved yet.

Comment 5 Christopher Brown 2008-01-16 01:03:12 UTC
Zhou,

We cannot debug issues exhibited on another distribution. For a case such as
this I would strongly recommend you file at the upstream kernel.org bugzilla,
located at:

http://bugzilla.kernel.org

where it will receive the attention of the mainline kernel team. Thank you for
taking the time to file the bug however I am closing this NOTABUG.

Comment 6 ZHOU Xiaodong 2008-01-16 08:59:11 UTC
Whatever, I have just tested on a FC6 x86_64 system with kernel version
2.6.18-1.2798.fc6, there is exactely the identical behavior.

Comment 7 Christopher Brown 2008-01-16 13:26:37 UTC
FC6 is no longer supported - you should test with a Fedora 8 system but again,
please do file this upstream if you believe it to be a kernel bug.

Comment 8 ZHOU Xiaodong 2008-01-16 14:53:09 UTC
Ok, I'll report this to kernel bugzilla then. Sorry for the bothering.