Bug#658639: kfreebsd-9: 'write' system call violates POSIX standard
Sorry for replying so late On 08/02/2012 06:58, Benjamin Kaduk wrote: Perhaps freebsd-standa...@freebsd.org would be appropriate for this? Though perhaps -hackers would reach a larger audience. I have dropped an email today in freebsd-standa...@freebsd.org: http://lists.freebsd.org/pipermail/freebsd-standards/2012-February/002348.html I hope it will attract enough attention. Cheers, Nicolas signature.asc Description: OpenPGP digital signature
Bug#658639: kfreebsd-9: 'write' system call violates POSIX standard
forwarded 658639 http://www.freebsd.org/cgi/query-pr.cgi?pr=164793 thanks 2012/2/5, Nicolas Bourdaud nicolas.bourd...@gmail.com: Bug report opened upstream: http://www.freebsd.org/cgi/query-pr.cgi?pr=164793 Thanks! -- Robert Millan -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/caofdtxnwstdgqyghur+rrz0oaf6hfeeetmsay8nojwfzshy...@mail.gmail.com
Processed: Re: Bug#658639: kfreebsd-9: 'write' system call violates POSIX standard
Processing commands for cont...@bugs.debian.org: forwarded 658639 http://www.freebsd.org/cgi/query-pr.cgi?pr=164793 Bug #658639 [src:kfreebsd-9] kfreebsd-9: 'write' system call violates POSIX standard Set Bug forwarded-to-address to 'http://www.freebsd.org/cgi/query-pr.cgi?pr=164793'. thanks Stopping processing here. Please contact me if you need assistance. -- 658639: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658639 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/handler.s.c.132844520031674.transcr...@bugs.debian.org
Bug#658639: kfreebsd-9: 'write' system call violates POSIX standard
On 04/02/2012 21:07, Robert Millan wrote: Can you reproduce this with upstream kernel? (apt-get install kfreebsd-downloader) Yes it is reproducible with upstream kernel If it affects upstream, for this kind of reports it's much better to report them to FreeBSD PR database instead: http://www.freebsd.org/send-pr.html Bug report opened upstream: http://www.freebsd.org/cgi/query-pr.cgi?pr=164793 Cheers, Nicolass signature.asc Description: OpenPGP digital signature
Bug#658639: kfreebsd-9: 'write' system call violates POSIX standard
Source: kfreebsd-9 Severity: important Tags: upstream When a write() cannot transfer as many bytes as requested (because of a file limit), it fails instead of transferring as many bytes as there is room to write. This is a violation of the POSIX standard: http://pubs.opengroup.org/onlinepubs/007904975/functions/write.html fsize-lim.c (attached) illustrates the problem. With a freebsd kernel, the output is: failed when adding 27 bytes after 59994 bytes (error: File too large) The expected output (like with a linux kernel) should be: added 6 bytes instead of 27 bytes after 59994 bytes failed when adding 27 bytes after 6 bytes (error: File too large) -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing') Architecture: kfreebsd-amd64 (x86_64) Kernel: kFreeBSD 9.0-1-amd64 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/dash #include unistd.h #include sys/time.h #include sys/resource.h #include stdio.h #include sys/types.h #include sys/stat.h #include fcntl.h #include signal.h #include errno.h #include string.h #define TARGETSIZE 8 #define LIMSIZE 6 #define PATTSIZE 27 int main(void) { struct rlimit lim; int fd; ssize_t retc; size_t count = 0; const char pattern[PATTSIZE] = Hello world!; signal(SIGXFSZ, SIG_IGN); lim.rlim_cur = LIMSIZE; setrlimit(RLIMIT_FSIZE, lim); fd = open(result.txt, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR); while (count TARGETSIZE) { retc = write(fd, pattern, PATTSIZE); if (retc PATTSIZE retc 0) fprintf(stderr, added %zi bytes instead of %u bytes after %zu bytes\n, retc, PATTSIZE, count); else if (retc 0) { fprintf(stderr, failed when adding %u bytes after %zu bytes (error: %s)\n, PATTSIZE, count, strerror(errno)); break; } count += retc; } close(fd); return 0; }
Bug#658639: kfreebsd-9: 'write' system call violates POSIX standard
Hi Nicolas, El 4 de febrer de 2012 20:49, Nicolas Bourdaud nicolas.bourd...@gmail.com ha escrit: When a write() cannot transfer as many bytes as requested (because of a file limit), it fails instead of transferring as many bytes as there is room to write. This is a violation of the POSIX standard: http://pubs.opengroup.org/onlinepubs/007904975/functions/write.html Can you reproduce this with upstream kernel? (apt-get install kfreebsd-downloader) If it affects upstream, for this kind of reports it's much better to report them to FreeBSD PR database instead: http://www.freebsd.org/send-pr.html -- Robert Millan -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOfDtXMiTSVkebU__wth-YRn4xbJ=F9gRvX-x4=opqrbrv_...@mail.gmail.com