[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#833557: marked as done (hurd: PF_LOCAL send/recv don't honor MSG_DONTWAIT)



Your message dated Wed, 10 Aug 2016 00:20:00 +0000
with message-id <E1bXHFY-0003Sl-Uo@franck.debian.org>
and subject line Bug#833557: fixed in hurd 1:0.8.git20160809-1
has caused the Debian Bug report #833557,
regarding hurd: PF_LOCAL send/recv don't honor MSG_DONTWAIT
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 owner@bugs.debian.org
immediately.)


-- 
833557: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833557
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: hurd
Version: 1:0.8.git20160522-4
Severity: normal
Tags: patch upstream

Dear Maintainer,

send/sendto/sendmsg/recv/recvfrom/recvmsg in combination with PF_LOCAL
sockets don't honor MSG_DONTWAIT. If specified, the operation will
block anyway. This is really bad if one has code that relies on the
fact that a recv* returns EAGAIN once all data has been read.

I've reported this to the debian-hurd and bug-hurd mailing lists, and
also provided a reproducer for this issue:
https://lists.gnu.org/archive/html/bug-hurd/2016-08/msg00000.html
https://lists.debian.org/debian-hurd/2016/08/msg00000.html

I've investigated further and found the culprit in hurd's
pflocal/socket.c. I've attached a patch that fixes the issue for me.
I've also sent the patch to both mailing lists:
https://lists.gnu.org/archive/html/bug-hurd/2016-08/msg00011.html
https://lists.debian.org/debian-hurd/2016/08/msg00008.html

Regards,
Christian

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: hurd-i386 (i686-AT386)

Kernel: GNU-Mach 1.7+git20160607-486/Hurd-0.8
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages hurd depends on:
ii  hurd-libs0.3  1:0.8.git20160522-4+b1
ii  libblkid1     2.28-6
ii  libbz2-1.0    1.0.6-8
ii  libc0.3       2.23-4
ii  libdaemon0    0.14-6
ii  libncursesw5  6.0+20160625-1+b1
ii  libtinfo5     6.0+20160625-1+b1
ii  libx11-6      2:1.6.3-1
ii  netdde        0.0.20150828-3
ii  sysv-rc       2.88dsf-59.8
ii  xkb-data      2.17-1
ii  zlib1g        1:1.2.8.dfsg-2

Versions of packages hurd recommends:
ii  bf-utf-source  0.07

Versions of packages hurd suggests:
pn  hurd-doc  <none>

-- Configuration Files:
/etc/default/hurd-console changed [not included]

-- no debconf information
Description: Support MSG_DONTWAIT in pflocal send/recv
Author: Christian Seiler <christian@iwakd.de>
Bug: https://lists.gnu.org/archive/html/bug-hurd/2016-08/msg00000.html
Last-Update: 2016-08-05
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/pflocal/socket.c
+++ b/pflocal/socket.c
@@ -282,6 +282,7 @@ S_socket_send (struct sock_user *user, s
 	       size_t *amount)
 {
   error_t err = 0;
+  int noblock;
   struct pipe *pipe;
   struct sock *sock, *dest_sock;
   struct addr *source_addr;
@@ -333,8 +334,9 @@ S_socket_send (struct sock_user *user, s
 	
       if (!err)
 	{
-	  err = pipe_send (pipe, sock->flags & PFLOCAL_SOCK_NONBLOCK,
-			   source_addr, data, data_len,
+	  noblock = (user->sock->flags & PFLOCAL_SOCK_NONBLOCK)
+		    || (flags & MSG_DONTWAIT);
+	  err = pipe_send (pipe, noblock, source_addr, data, data_len,
 			   control, control_len, ports, num_ports,
 			   amount);
 	  if (dest_sock)
@@ -373,6 +375,7 @@ S_socket_recv (struct sock_user *user,
 {
   error_t err;
   unsigned flags;
+  int noblock;
   struct pipe *pipe;
   void *source_addr = NULL;
 
@@ -398,10 +401,11 @@ S_socket_recv (struct sock_user *user,
     }
   else if (!err)
     {
+      noblock = (user->sock->flags & PFLOCAL_SOCK_NONBLOCK)
+		|| (in_flags & MSG_DONTWAIT);
       err =
-	pipe_recv (pipe, user->sock->flags & PFLOCAL_SOCK_NONBLOCK, &flags,
-		   &source_addr, data, data_len, amount,
-		   control, control_len, ports, num_ports);
+	pipe_recv (pipe, noblock, &flags, &source_addr, data, data_len,
+		   amount, control, control_len, ports, num_ports);
       pipe_release_reader (pipe);
     }
 

--- End Message ---
--- Begin Message ---
Source: hurd
Source-Version: 1:0.8.git20160809-1

We believe that the bug you reported is fixed in the latest version of
hurd, 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 833557@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Samuel Thibault <sthibault@debian.org> (supplier of updated hurd 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 ftpmaster@ftp-master.debian.org)


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

Format: 1.8
Date: Tue, 09 Aug 2016 21:54:42 +0000
Source: hurd
Binary: hurd-libs0.3 hurd hurd-prof hurd-dev hurd-doc hurd-libs0.3-udeb hurd-udeb
Architecture: source hurd-i386 all
Version: 1:0.8.git20160809-1
Distribution: unstable
Urgency: medium
Maintainer: GNU Hurd Maintainers <debian-hurd@lists.debian.org>
Changed-By: Samuel Thibault <sthibault@debian.org>
Description:
 hurd       - GNU Hurd
 hurd-dev   - GNU Hurd (development files)
 hurd-doc   - GNU Hurd manual
 hurd-libs0.3 - GNU Hurd (libraries)
 hurd-libs0.3-udeb - GNU Hurd (libraries) - udeb (udeb)
 hurd-prof  - GNU Hurd
 hurd-udeb  - GNU Hurd - udeb (udeb)
Closes: 833557
Changes:
 hurd (1:0.8.git20160809-1) unstable; urgency=medium
 .
   * New upstream snapshot. Closes: Bug#833557.
Checksums-Sha1:
 f69f2d3c4d49ef1e1efdf6b48827f8292ec6daf6 5151 hurd_0.8.git20160809-1.dsc
 daa93d74df7a2464b9b1609b699f6b5ba308abff 18084 hurd_0.8.git20160809.orig-eth-filter.tar.bz2
 e4c76bcf05b1419ec9d8c589f36db21acdac4883 16003 hurd_0.8.git20160809.orig-eth-multiplexer.tar.bz2
 9d1ef8c9796da2fe62fcb3abe16af367d6289354 10432 hurd_0.8.git20160809.orig-libbpf.tar.bz2
 0871ac46085dc120713fc52e852abc616e868661 3346313 hurd_0.8.git20160809.orig-libdde-linux26.tar.bz2
 5556f0ad8a706765f982d9c5c2007d21c7ac356f 20131 hurd_0.8.git20160809.orig-libddekit.tar.bz2
 99cd78b942052c72061625e01b69c27438993a48 22238 hurd_0.8.git20160809.orig-libmachdev.tar.bz2
 3f3159ac1de69fc8471277feb3c253c17a40a0f0 2032698 hurd_0.8.git20160809.orig.tar.bz2
 0c02e84dbf599db824ac64078d213d72eb6c467d 72797 hurd_0.8.git20160809-1.debian.tar.bz2
 8ba4f9b0676fc602b2dbad53b5f43f2fb0771885 6726656 hurd-dbgsym_0.8.git20160809-1_hurd-i386.deb
 5616479198eccbe385f9a4f10b3f62575114ac46 13494 hurd-dev-dbgsym_0.8.git20160809-1_hurd-i386.deb
 b49ea71da3c0feb97e04fdb540afec3c8aaf69a7 3145458 hurd-dev_0.8.git20160809-1_hurd-i386.deb
 f21ca0d01960763b2ee1e433b1d4a1bbf3feba12 170214 hurd-doc_0.8.git20160809-1_all.deb
 3e6d095d5965e6ca3c0eea59b825953014f44d4c 1800088 hurd-libs0.3-dbgsym_0.8.git20160809-1_hurd-i386.deb
 8c10e35abdd9d4dfbb2dc1f8abb63e7372b1c0b1 278660 hurd-libs0.3-udeb_0.8.git20160809-1_hurd-i386.udeb
 f69422f78ff87767671673c0a359f796be63cc7f 303554 hurd-libs0.3_0.8.git20160809-1_hurd-i386.deb
 724802ad245faf8b88c39685ab48f896f47e5990 3930458 hurd-prof_0.8.git20160809-1_hurd-i386.deb
 0375bb49295c0f8545d96e03575b7985fd05c0d3 1554848 hurd-udeb_0.8.git20160809-1_hurd-i386.udeb
 c481b594936eb7eeee75ccc651cd9ba296a53727 1487980 hurd_0.8.git20160809-1_hurd-i386.deb
Checksums-Sha256:
 c95b07fa563874bd53a41c61c24bff769fad0793f9fb9430d041265e2be80294 5151 hurd_0.8.git20160809-1.dsc
 492c618a3b0f03c6461c07d9c4bfc4f9b6b0e0efd958f18ecfd15d209c2521b9 18084 hurd_0.8.git20160809.orig-eth-filter.tar.bz2
 38a1643b846941115a8b089dc9170cf476f0123dd6881165e377b87e9ec157cb 16003 hurd_0.8.git20160809.orig-eth-multiplexer.tar.bz2
 4c8804539b6609ae9a582155062f59d61a159a537e4ba385ea5f4a606d30b38a 10432 hurd_0.8.git20160809.orig-libbpf.tar.bz2
 4e095c391f6a58004735208296a7b5b90c3589350cd5a51cdb06b7f06dc1c843 3346313 hurd_0.8.git20160809.orig-libdde-linux26.tar.bz2
 40305745a32c1e3ac42c108de27c30feff3a3295acf5165dbbb57a775fe627cf 20131 hurd_0.8.git20160809.orig-libddekit.tar.bz2
 5c476683dbf828094a745dac55720d2416c765033c4eb4bf336d695dac8ab845 22238 hurd_0.8.git20160809.orig-libmachdev.tar.bz2
 9031cb28eb265d88eb993e39bd0fae5def9ae7923d090e9fa8c7008be5f83b67 2032698 hurd_0.8.git20160809.orig.tar.bz2
 e3c3c80edd88a723c149ee26a89a3b10d484437c521b2483ec60eb470ec7b0b9 72797 hurd_0.8.git20160809-1.debian.tar.bz2
 4a91a0b134ff9add8c1d1b3acb384913bc948bac73be3355caf8afc7db6e521c 6726656 hurd-dbgsym_0.8.git20160809-1_hurd-i386.deb
 1d52e0c7ff8ad414dc8656f5cc27a68d2a6101100e44572d6fad3592a675dbaf 13494 hurd-dev-dbgsym_0.8.git20160809-1_hurd-i386.deb
 048729b4da5087cc9c090e2470c98d4f6c98e6a93f30fc04fa9c5e5fd166864b 3145458 hurd-dev_0.8.git20160809-1_hurd-i386.deb
 4e399eb929578d184778568fb2f6abc41649fd2727be981954185218e3dfa797 170214 hurd-doc_0.8.git20160809-1_all.deb
 53efa63c1dfd425d7514ca410000b1c99d634704ddd7cd2333a6ba5cfd4e2d5a 1800088 hurd-libs0.3-dbgsym_0.8.git20160809-1_hurd-i386.deb
 8cce47318d37b4006390fbe7e2b4d7a2fa96b5c137b488b999300b8cae35b61c 278660 hurd-libs0.3-udeb_0.8.git20160809-1_hurd-i386.udeb
 9bf5e54bb6dbfb32a417c7046390d8cdd5926139103d10977e6a4e7764d9b073 303554 hurd-libs0.3_0.8.git20160809-1_hurd-i386.deb
 2fdfe7e84defd52d738b761593dac2521d8eea38110b480dedffc8acbdb365db 3930458 hurd-prof_0.8.git20160809-1_hurd-i386.deb
 acca2b29ac54185cbea89aab63215e801542fabdfe9da655b31855679b365733 1554848 hurd-udeb_0.8.git20160809-1_hurd-i386.udeb
 cf81bc77f16b96bd750d3aeb47fdd5af93d140e1d7a3be3dc936cd8fc8320c3a 1487980 hurd_0.8.git20160809-1_hurd-i386.deb
Files:
 dd4d36f214d639b3a9be3b477588efa0 5151 admin required hurd_0.8.git20160809-1.dsc
 c2b432989bcca5059cba2c19178176a9 18084 admin required hurd_0.8.git20160809.orig-eth-filter.tar.bz2
 bd0d7eab108208bc5abad30d7f6c27ff 16003 admin required hurd_0.8.git20160809.orig-eth-multiplexer.tar.bz2
 709734c2dc6e9b3a38145b1fa978ca32 10432 admin required hurd_0.8.git20160809.orig-libbpf.tar.bz2
 a1646b9b9877ccd4517d4942cda56870 3346313 admin required hurd_0.8.git20160809.orig-libdde-linux26.tar.bz2
 3809be4611e0296b3100f53d193ed907 20131 admin required hurd_0.8.git20160809.orig-libddekit.tar.bz2
 8853e5c20df562cf3482f72b3f263c4f 22238 admin required hurd_0.8.git20160809.orig-libmachdev.tar.bz2
 7ea266736afff13833923a49b3c9dda3 2032698 admin required hurd_0.8.git20160809.orig.tar.bz2
 843ce31982f46f7a3d98b0c384111e27 72797 admin required hurd_0.8.git20160809-1.debian.tar.bz2
 5218436e2d96f1ac91d756849eb22834 6726656 debug extra hurd-dbgsym_0.8.git20160809-1_hurd-i386.deb
 a5daf5cdd087875c6a77ed6107119285 13494 debug extra hurd-dev-dbgsym_0.8.git20160809-1_hurd-i386.deb
 7903f648c9bba51faf495513dce45bc0 3145458 libdevel standard hurd-dev_0.8.git20160809-1_hurd-i386.deb
 5c5afda226fc906aeecc549be4092cfc 170214 doc optional hurd-doc_0.8.git20160809-1_all.deb
 ba282efb4133c5c74c4693f60130b763 1800088 debug extra hurd-libs0.3-dbgsym_0.8.git20160809-1_hurd-i386.deb
 9dda7077f4a325502341f5cd98be4ae6 278660 debian-installer optional hurd-libs0.3-udeb_0.8.git20160809-1_hurd-i386.udeb
 b68ebf2461dbf054b0a8200d82f8f659 303554 libs required hurd-libs0.3_0.8.git20160809-1_hurd-i386.deb
 012e5b3c069b320a4b50d3b406e5ce47 3930458 admin required hurd-prof_0.8.git20160809-1_hurd-i386.deb
 30077c22b3d43f31b86ed3b86dcfa62b 1554848 debian-installer optional hurd-udeb_0.8.git20160809-1_hurd-i386.udeb
 635e7be4ad213b743058f72e1f277eb8 1487980 admin required hurd_0.8.git20160809-1_hurd-i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJXqm+PAAoJEOPlHOj7ay8d0M0P/jUFNWnjam653n+hRSU1qwJO
nZ5ZhTrOKa/CrQmPQ8cIdPU9+dVDJcT5VfQ2IVCGvnH2ucbZ2h17Pe88li9Xrymf
u+CS5UhIes8wrUOxtQSZyAG1a6ppQqSTujmfW23N/xH+gBOZLNRiyG2U7kpRafiG
mak8p87NGOSPs7aeYOZbEnuaAe5F1ityK5zLu4FIjmD55v8DzkM7phGGzkPk2JZb
gSR/yrZad9VWA/tUT1IkSm4++hn0IGU3pQMQ+iNQwKpL5XBdEwUOmUjfhdGaiAtE
A8pyjh1vwtZG7KzZNAES1NzyU5Ay9zxQOc0OuAvIb3nBRJgXHG42ERHWZjexTP2x
4fH9N1DyNUyqTLGNypCSXLB5gFSaFmkeB0KQR0v0ojbI8KVLQk9q+5bj6w3fj1ty
ndWUuzUCM5KqcaNkpgAgdQNj/GVC9cJ7146xMwjXmBzs3ka0tHRI1s8wS6YppDtm
LufKtvJE71stBR3eXJiEiBDRCXfGIEF2TSTRGE6oc1wOfUAEfluZpKGeN3SnKUWx
bBKDViLsKyb1KRJAz7WDp9mpfgHA+RGDK4TnPdIMzr+fFUxihvn1IemfyS2yk8IV
iy9X1SHgizIFxIGXVvbBZdQPcswOMEw2fSoBESbSqswz8gn7Y0EkstApMJsTfmR+
1qzXl82XW2Pv8FVaHg8H
=Kzwz
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: