Your message dated Wed, 10 Aug 2016 22:52:49 +0000 with message-id <[email protected]> and subject line Bug#774534: fixed in neon27 0.30.1-4 has caused the Debian Bug report #774534, regarding neon27: Racy redirect test 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.) -- 774534: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774534 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Source: neon27 Version: 0.30.1-1 Severity: important Hello, I have been having issues with running the neon27 testsuite, more precisely the redirect test. I'm getting this: no_redirect........... FAIL (did not get NE_REDIRECT) This was originally on hurd-i386, but debugging the issues shows that it can potentially happen on other OSes, it just depends on process scheduling getting lucky or not. This can be triggered by applying the attached "testcase" patch, which puts a couple of sleeps at the right places. Basically, what redirect.c's no_redirect is doing is the attached test.c: 1) the client sends a first request 2) the server gets the request 3) the server sends two response 4) the client gets the first server response and checks it 5) the server calls shutdown(SHUT_RD) 6) the server calls recv() in loop to flush the socket 7) the client sends a second request 8) the server closes the socket 9) the client gets the second server response and checks it And what fails is the latest step. This happens only when scheduling is unlucky enough that step 7 happens just between steps 6 and 8, but that *can* happen. In that case the server close() at step 6 will see that some data was received, and thus send a RST, which then turns into an ECONNRESET during step 9. One could have thought that shutdown(SHUT_RD) would stop data from getting in, and the recv() loop would flush them all without fearing that new data comes before close(), but it seems at least Linux does not do that, and thus we have a race. I haven't seen POSIX specifying the details of what happens at shutdown() more precisely than “The shutdown() function disables subsequent send and/or receive operations on a socket”... A safer way would of course to make the server in the test properly wait and consume the second request before emitting the second answer and shutting down the socket. Samuel -- System Information: Debian Release: 8.0 APT prefers testing APT policy: (990, 'testing'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.18.0 (SMP w/8 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Init: systemd (via /run/systemd/system)--- a/test/common/child.c +++ b/test/common/child.c @@ -154,6 +154,7 @@ static int close_socket(ne_socket *sock) shutdown(fd, 0); while (ne_sock_read(sock, buf, sizeof buf) > 0); + sleep(2); #endif return ne_sock_close(sock); } --- a/test/redirect.c +++ b/test/redirect.c @@ -181,6 +181,7 @@ static int no_redirect(void) ONN("redirect non-NULL after non-redir req", ne_redirect_location(sess)); + sleep(1); CALL(process_redir(sess, "/foo", &loc)); CALL(await_server()); @@ -189,11 +190,13 @@ static int no_redirect(void) } ne_test tests[] = { +#if 0 T(lookup_localhost), T(simple), T(non_absolute), T(relative_1), T(relative_2), +#endif T(no_redirect), T(NULL) };#include <sys/socket.h> #include <netinet/in.h> #include <unistd.h> #include <assert.h> int main(int argc, char *argv[]) { int list; int server, client; char buf[32]; struct sockaddr_in addr; int yes = 1; list = socket(AF_INET, SOCK_STREAM, 0); assert(list >= 0); addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl((in_addr_t) INADDR_LOOPBACK); addr.sin_port = htons(4000); setsockopt(list, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)); assert(bind(list, (struct sockaddr *)&addr, sizeof(addr)) == 0); assert(listen(list, 1) == 0); client = socket(AF_INET, SOCK_STREAM, 0); assert(client >= 0); assert(connect(client, (struct sockaddr *)&addr, sizeof(addr)) == 0); server = accept(list, NULL, 0); assert(server); // 1) assert(write(client, "GET1\n", 5) == 5); // 2) assert(read(server, buf, 5) == 5); // 3) assert(write(server, "OK1\nOK2\n", 8) == 8); // 4) assert(read(client, buf, 4) == 4); // 5) shutdown(server, SHUT_RD); // 6) while (read(server, buf, sizeof(buf))) ; // 7) assert(write(client, "GET2\n", 5) == 5); // 8) assert(close(server) == 0); // 9) assert(read(client, buf, 4) == 4); assert(read(client, buf, 4) == 0); return 0; }
--- End Message ---
--- Begin Message ---Source: neon27 Source-Version: 0.30.1-4 We believe that the bug you reported is fixed in the latest version of neon27, 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. Laszlo Boszormenyi (GCS) <[email protected]> (supplier of updated neon27 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: SHA256 Format: 1.8 Date: Wed, 10 Aug 2016 20:06:25 +0000 Source: neon27 Binary: libneon27 libneon27-dev libneon27-dbg libneon27-gnutls libneon27-gnutls-dev libneon27-gnutls-dbg Architecture: source amd64 Version: 0.30.1-4 Distribution: unstable Urgency: low Maintainer: Laszlo Boszormenyi (GCS) <[email protected]> Changed-By: Laszlo Boszormenyi (GCS) <[email protected]> Description: libneon27 - HTTP and WebDAV client library libneon27-dbg - Detached symbols for libneon27 libneon27-dev - Header and static library files for libneon27 libneon27-gnutls - HTTP and WebDAV client library (GnuTLS enabled) libneon27-gnutls-dbg - Detached symbols for libneon27 (GnuTLS enabled) libneon27-gnutls-dev - Header and static library files for libneon27 (GnuTLS enabled) Closes: 547203 774534 Changes: neon27 (0.30.1-4) unstable; urgency=low . * Make self tests non-fatal on kFreeBSD architectures (closes: #774534). * Enable GnuTLS self tests (closes: #547203). * Update Standards-Version to 3.9.8 . Checksums-Sha1: 53f6488d0e3f56c70a07f6b4f4b9525545a17d5d 2173 neon27_0.30.1-4.dsc 336099ad46dc9cdaf717e98bfca0144b8e25e929 12540 neon27_0.30.1-4.debian.tar.xz b72e4fbba5457d855769d171c81338263724dc01 225310 libneon27-dbg_0.30.1-4_amd64.deb 4565a11980c2455fe1b72ec26933ba5ae700c5f3 438098 libneon27-dev_0.30.1-4_amd64.deb 3889a8a892471c9fd1bcc49f5a9ec7f59f99cf9e 204128 libneon27-gnutls-dbg_0.30.1-4_amd64.deb d398b2fc444502c221482f9f0ac500311385708a 408170 libneon27-gnutls-dev_0.30.1-4_amd64.deb 86933fc7541077b65f527576503d1e34e160582d 134692 libneon27-gnutls_0.30.1-4_amd64.deb fe41c5b6c4b02dade8df15d5d9a6b0552c6bdc74 162856 libneon27_0.30.1-4_amd64.deb Checksums-Sha256: 3f1b0e5a0f0eb62519337edc8959089c250fc35e635c724fb9d1af26fd62949e 2173 neon27_0.30.1-4.dsc 496dc287e8f7afc5466ba38b976d1aae3798bff522f2da9662c2feac52ba94ba 12540 neon27_0.30.1-4.debian.tar.xz d291bea51d1e7affd6597c98323d26397555b59fb702ffaeed3c9c3de9607435 225310 libneon27-dbg_0.30.1-4_amd64.deb dcbcfc0eb0cd2b10159a1065effc6609f95e0dbee21d4514154052660971a461 438098 libneon27-dev_0.30.1-4_amd64.deb 6f0f1a0ca277eba20fa9bee88e2686d5ea6d6babee1deccba2e271f5b998c0fb 204128 libneon27-gnutls-dbg_0.30.1-4_amd64.deb ccbd84002857443ac8607911a12bef273edd6e2c53c8c60795c38f8ec4399be9 408170 libneon27-gnutls-dev_0.30.1-4_amd64.deb 6fb0eae56aa313a7f0b35a2740236546bdf6b954973955e7ea4c3102c55bcb08 134692 libneon27-gnutls_0.30.1-4_amd64.deb 42dae3f9dbcc45259cbe01246bd06bd8264d39ac4c97e366183524e899dfa13a 162856 libneon27_0.30.1-4_amd64.deb Files: 22ea4f5902aa4ffa5ba3437475235ace 2173 net optional neon27_0.30.1-4.dsc 3a6080a0501f422995a9ee0ffeb4a652 12540 net optional neon27_0.30.1-4.debian.tar.xz 8cc620dd9401b44091359549ea9e1b83 225310 debug extra libneon27-dbg_0.30.1-4_amd64.deb dade8f3b1a22a1768bbe23e11f15f71f 438098 libdevel optional libneon27-dev_0.30.1-4_amd64.deb a8f9b0dfe355b27d040f1ee82288bf6c 204128 debug extra libneon27-gnutls-dbg_0.30.1-4_amd64.deb 0ed2375f67c4aa7e03c4ded329c7a2e9 408170 libdevel optional libneon27-gnutls-dev_0.30.1-4_amd64.deb c0b9db6bc922825f21d9f66835c03530 134692 libs optional libneon27-gnutls_0.30.1-4_amd64.deb e917c8933f959bad32a15289d55262d0 162856 libs optional libneon27_0.30.1-4_amd64.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJXq5YTAAoJENzjEOeGTMi/Y2YP/09zbjOjAsFx0l868dnbaqe9 /EvL4ehTCfWm4jVVntcH+qXtsopiom5cKtNfOs7KgAV4nSYArq/hW0Z+0mDbzAhq uyOq45fVE0GFRbmZYzmn7VH47iuK/2RZt8xWxaIFKAngHZip2Wl9c9jTx+HzLvsN Qn0AWfQZR11nWV2DP+UYmgfMOs5c8Ba/8eNvxLQK77jatFcDN7AOrEf/wqK6pAzs kzk803acBRosrQ6dwvmCHQX2jY+y2wRHCkrkTf2/7ySIgyFcOpNDQYE3lQ2pfLE5 9Wp8euva/O0sZ2X4lCHYgg1IjAbBODtII7jBqo5AQlPgbmozQVrIa3fXRcWCK6UO UkA6tb9j99eKolDQeAhrtnXrt+xQRGHkuXt8pyfh8QoHBKwU1PrZxkaIL6KxrDUP k2m5/vKYdzwi6TszIokVeEBZI7lfPhoq5bVDM0Qrxv73JTgTucf3nfVKUGqcVeP8 5q+gnhRRZvsjyU/uTEdQT5sMctvRvnU3c2NneaV6HVN2mcb4QUomOOsm01JNZcve /a3oZU2DyQmCqJek63HWF+FutPUAOpGBWCOTy2mXHONWhPOB/8Z2TAS7DVyWUKIL x2TeBmAayPHiqE2Karyt+ih7pyf1rerooa2kNLw0gW5AOO02rtL92uIvqiWa1WZF G8sxzbbHDArxmzNRlS1c =rPFi -----END PGP SIGNATURE-----
--- End Message ---

