Your message dated Wed, 16 Mar 2016 16:49:38 +0000
with message-id <[email protected]>
and subject line Bug#797479: fixed in manpages 4.05-1
has caused the Debian Bug report #797479,
regarding write(2): returns success but discards the data
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
797479: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797479
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: src:linux
Version: 3.16.7-ckt11-1+deb8u3
Severity: grave
Justification: causes non-serious data loss

Dear Maintainer,

In certain circumstances, the write(2) syscall returns success, but the data
written is not seen on the other end of the fd.

For example:

   * What led up to the situation?

1. Run 'cat' in xterm
2. Type a single line with 4098 characters (including the newline), e.g.,
   by running `yes | head -2049 | xargs | xclip -i` and pasting the output.
3. Type ^D (EOF)

   * What was the outcome of this action?

4. The write(2) syscall in xterm indicates all 4098 bytes and the subsequent EOF
were written, but the read(2) syscall receives only 4096 bytes before the EOF.
Neither xterm nor cat reports an error.

straces are enclosed; compare lines 37-39 in the xterm xtrace to lines 3-5 in
the cat strace.

   * What outcome did you expect instead?

I expected the read(2) call on line 5 to read the two bytes "y\n", or failing
that the write(2) call on line 38 to return an error.

Cheers,

Daniel

P.S. I initially filed this as #796226 against coreutils.


strace of xterm:

     1  % strace -e write -p ...
     2  write(5, "c", 1)                        = 1
     3  write(5, "a", 1)                        = 1
     4  write(5, "t", 1)                        = 1
     5  write(5, "\r", 1)                       = 1
     6  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
     7  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
     8  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
     9  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    10  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    11  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    12  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    13  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    14  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    15  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    16  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    17  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    18  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    19  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    20  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    21  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    22  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    23  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    24  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    25  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    26  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    27  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    28  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    29  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    30  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    31  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    32  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    33  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    34  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    35  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    36  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    37  write(5, "y y y y y y y y y y y y y y y y "..., 128) = 128
    38  write(5, "y\r", 2)                      = 2
    39  write(5, "\4", 1)                       = 1

strace of cat:

     1  % strace -e trace=desc -p ...
     2  Process 4519 attached
     3  read(0, "y y y y y y y y y y y y y y y y "..., 131072) = 4096
     4  write(1, "y y y y y y y y y y y y y y y y "..., 4096) = 4096
     5  read(0, "", 131072)                     = 0
     6  close(0)                                = 0
     7  close(1)                                = 0
     8  close(2)                                = 0
     9  +++ exited with 0 +++



-- Package-specific info:
** Version:
Linux version 3.16.0-4-amd64 ([email protected]) (gcc version 
4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04)

-- System Information:
Debian Release: 8.1
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'testing-updates'), (500, 
'stable-updates'), (250, 'testing'), (200, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

--- End Message ---
--- Begin Message ---
Source: manpages
Source-Version: 4.05-1

We believe that the bug you reported is fixed in the latest version of
manpages, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dr. Tobias Quathamer <[email protected]> (supplier of updated manpages package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 16 Mar 2016 17:23:06 +0100
Source: manpages
Binary: manpages manpages-dev
Architecture: source all
Version: 4.05-1
Distribution: unstable
Urgency: medium
Maintainer: Martin Schulze <[email protected]>
Changed-By: Dr. Tobias Quathamer <[email protected]>
Description:
 manpages   - Manual pages about using a GNU/Linux system
 manpages-dev - Manual pages about using GNU/Linux for development
Closes: 285444 679323 756599 780544 794876 797479
Changes:
 manpages (4.05-1) unstable; urgency=medium
 .
   * Imported Upstream version 4.05
     - write.2: Document behaviour on tty devices. (Closes: #797479)
     - clearenv.3: Clarify the use and effect of clearenv(). (Closes: #679323)
     - perror.3: Suggest use of strerror(3) in place of deprecated
       'sys_errlist'. (Closes: #794876)
     - printf.3: Remove stray asterisk in "NAN*". (Closes: #756599)
     - unicode.7: Document "Private Use Areas". (Closes: #285444)
   * Do not install sk98lin.4 (Closes: #780544)
   * Refresh patches
   * Remove obsolete installation script
   * Update d/copyright and d/watch
Checksums-Sha1:
 85e65694045ac087c6c417b7cd55c7d997613572 1954 manpages_4.05-1.dsc
 629065a7d408bb272f6d605943341746e2cea3d9 1452936 manpages_4.05.orig.tar.xz
 d2d0096332f9f58b0eeb88a579071f74483dde54 74596 manpages_4.05-1.debian.tar.xz
 8a77706f318e19f9635dedccd5be4c5b8ae22727 2076882 manpages-dev_4.05-1_all.deb
 c8d4b68da8404413f5fdbcd42c19879bed8451ed 1133302 manpages_4.05-1_all.deb
Checksums-Sha256:
 80ec7e5a27ebb9825faf60de2486cd18463a5953dbf73ef479d014c1234b7820 1954 
manpages_4.05-1.dsc
 460051b94c2a0a4d158276e5d3f68e7114cb5782a050d878645e33b81f56a60d 1452936 
manpages_4.05.orig.tar.xz
 70a6261ff6c9f05c00597e1a1534f89f6e681a828ec8532cccca95dea0831807 74596 
manpages_4.05-1.debian.tar.xz
 a83b79f56d1a7bea87b9699bc6dc31040a79b4c24823648712e8e747d5df1ea5 2076882 
manpages-dev_4.05-1_all.deb
 68829d17643e3d2beba2c3b12d754a901489438d2e1986d70362e41e8f836bf1 1133302 
manpages_4.05-1_all.deb
Files:
 d3540f8a126aaa0eda7e88de3a55b966 1954 doc standard manpages_4.05-1.dsc
 9c32c8487d753f5894f6fba425b12add 1452936 doc standard manpages_4.05.orig.tar.xz
 e8dbb5b1ffbf90e0cf813aa80013131e 74596 doc standard 
manpages_4.05-1.debian.tar.xz
 a3096a735d46d56aed8184be1eccb9b1 2076882 doc optional 
manpages-dev_4.05-1_all.deb
 ed97fa7858e548a82a95f1b1bfbfeedf 1133302 doc standard manpages_4.05-1_all.deb

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJW6Y2VAAoJEBMC8fA26+sZ6hQP/ijEV8x4vCE/QIOaEL6Y1PA1
uEUQduS/H1u+rHBUckAet3+Oe+51Kl+Y8W5LbuuMJqvA+Mc2dr2w3ZtWANy2H13M
vHNoeLCFXgDW3j5vOF4l6v26Sar4S8AWxNHJDB5PABy7/YGpiZXCMCNxR9xZ3JsV
/mUv5RTymeamWUu5P9uZHxgz/atrxsnEpxbOdb/4jIaAjXi0A4CGy0sU6fbetAtr
W9vdXT6iGZg3jmqBcXPVeW8akAzTHaDl/9/CXpPpntGdjvlA16pOxpafaj2pGEP8
6bG55hg3KXcixB08dahem9lqhzzXU/GtZFRcdlwkiYTM6DKUT9oc6EMvN/KG+q8o
SACRGWdLdtM430Dp9cYGKrVLgj1cxDV66nhsi30Smz/mceIphKhyZaIhuH9PWB3n
hAYspkD96qXJ22Ib5SHz5i4nKX0O6ge2HrvD0cADzc1XcGxsox7aHiTcZcZlu3bx
nNUf78lbxiDBtwI8SwHjEpEwO/yzD6VSo7odkm+mX7S2zkdVSah/3N8blgk3CnY5
jf5bpzm/zC3J6+jw3lvcdQmlrynBKdBqfizuoEmNQjN9q9zqkPN9ms9/p8EHTQoV
1AHZ/rx3rYpEakmL2aaOVoYZDaTZ/eIv2NnCN+aNcjo11BqxsbkrZivebJXy2t1V
QgaZXgWZY6kNJ3AG0xqc
=g1WQ
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to