From nobody Thu Aug 31 16:07:43 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rc5fS1D5bz4rKlN for ; Thu, 31 Aug 2023 16:07:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rc5fS0709z4Js2 for ; Thu, 31 Aug 2023 16:07:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693498064; a=rsa-sha256; cv=none; b=ef+X7oVewpCyz7xWEN/pMNgSyAzxxW1TxIgJzpzgnbLvn1YuAv3oaEXSwtswZY/nGhp3WC wLe9fKwvYbija2299yl23N0n1ZzKL5U3+pD7TykEWxXaR6KO/SeTBB0hi6iosm3anQEXyQ SzCMaHSbSnR/h0cr+K7Z7e/F/DW04mKfrzOO/d0HQxCEDijx69gErYzW2M+LXqMg/sGZEW RBKhls3HXEfBltS7BFcQsdkVZpdm553/L/LRdxMPdELpPgccJCtALLHe5MQpKEDQs4xjVu 7iFuJrhIp5fsQGGADXzTaxJxLBN6CUtO+QsYRjGn1z5l56TjYOvcpegkXpp/1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693498064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9kHUmVmS1HN3ZP4yHitBaYxrnccYvdJrXvOF9UNr1jE=; b=rAVRKGqZdj/4/beP/m4diPhAoX2Kqg3ptjvXckHPs8ehyEKnXQjig825gmv6GGxS+UQ7tH suMnFKUiT+tc5cH5VfZtULwyrv7HxhyhIAlbrX5K3UXIHbI5jyos161+rZ7vIJHIqlwSok NCRgIN3bjyFgig4ig9fiS8lOv5vGa9KmV2c+DUvRNPpewulBTuKombQcgsJFixhp9fKNrd oCrmpo7KFAr47jwuoAX2TJEHUIpw7qfZEPUEf1fC5/VjIKPzgYnsLY5Zj2C1/iK3GD8HYo 4zJXspnbRzQEUG/6ubdHLVxNCuKa5jFRSBpExLG0nt4bSiCiU4zrOSTfeSsGfQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rc5fR6KKCz9Bp for ; Thu, 31 Aug 2023 16:07:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 37VG7hPD004545 for ; Thu, 31 Aug 2023 16:07:43 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 37VG7hmN004544 for bugs@FreeBSD.org; Thu, 31 Aug 2023 16:07:43 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 212716] recv() with MSG_WAITALL doesn't always unblock on EOF Date: Thu, 31 Aug 2023 16:07:43 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: markj@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D212716 Mark Johnston changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open CC| |markj@FreeBSD.org --- Comment #9 from Mark Johnston --- (In reply to Greg Becker from comment #6) In addition, sbwait() should probably assert that SBS_CANTRECVMORE and SBS_CANTSENDMORE are not set for SO_RCV and SO_SND directions, respectively. Regarding the patch, the new check should happen in the "pr->pr_flags & PR_WANTRCVD" block, since that's where the sockbuf lock is dropped. Otherw= ise the existing check is effectively duplicated. The general behaviour of soreceive_generic() appears to be to consume data = as long as it's present, even in the face of SBS_CANTRECVMORE and socket error= s; see the "goto dontblock" statements near the beginning of the function.=20 soreceive_stream() similarly drains the receive buffer before handling termination. I'd argue for the same approach in the MSG_WAITALL loop. --=20 You are receiving this mail because: You are the assignee for the bug.=