From nobody Fri Nov 26 13:25:30 2021 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 F2C0E18B5DBB for ; Fri, 26 Nov 2021 13:25:30 +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 4J0wV24XVNz3pSw for ; Fri, 26 Nov 2021 13:25:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 795C810DC for ; Fri, 26 Nov 2021 13:25:30 +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 1AQDPUtJ046902 for ; Fri, 26 Nov 2021 13:25:30 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1AQDPUd7046901 for bugs@FreeBSD.org; Fri, 26 Nov 2021 13:25:30 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 260055] recvmsg / IP_RECVDSTADDR issue Date: Fri, 26 Nov 2021 13:25:30 +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: 12.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: eugen@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637933130; 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=ZqFglCBg2shml5CcMCJ6IPfMXMDLXPXMhRl8h/UEAwI=; b=oXFACbLQmQb1QAP0oZW6sDhB0fVpXV2gLdhA2B6L0KUASj1wdeDOG40i5A+3YbPckKe8ai b52VInlc/B4CB9ImC0v9ZDw5N6xP+H0ttExWz5m9rFzu+w1TYD03a0c3H42kiJU2MOcngl 3eXslX8FNWBxT0iuipdgsoMdjBQN7SS/MddmVXkyQu45+2R71pIXFCAb7xpdY7ykt+Jcfd KyEPLZYAw5sG17gGohQAiBLM2Vepb8dpt6Beuxs+JVrg7/DizO9CChpX+xHncB3fQCWJqZ kYJBe20mm86Xh4L0FDNUD8vC33Q3E14HjecadOj7TgaMnSkfcWIYtPCRe1/jQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637933130; a=rsa-sha256; cv=none; b=kSVGGf1jQOH83DZX64gg2NNnerYO+OQf0DqRdM9CwQ4xs8Gb2RuVfHzZavrh1liQozTCI0 GzUKpgtWs2l2EfsmqpC/Rky3RfieTwRn/wJ592ZxVCxePOUPwP78A/eeKtE4/MfWO0ly2t ME+c3qR1LotfXfFiiXL/JkSSAhJFo2SktZpymZJwk59p2EWF/CUZHIlmv65opSTt2xUO+r h5xV4niREz+DhmpbCW5zG68nvYOidDglRbaDxLfnpQ3VQgCXC1KW5O27cWyEwjMy+wxeL4 oiaNs4ePtTT0+nsjXNBhRoht5TL+jHY8FWtLwVVR0ktT+aJptLT+CFO3dkOnaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260055 --- Comment #2 from Eugene Grosbein --- (In reply to Konstantin Belousov from comment #1) mpd5 uses additional threads to talk with RADIUS server only and these additional threads are short-lived. The output of "thread apply all bt" in = this PR was not redacted, so there was only single thread 1 at the moment. The socket is IPv4 UDP created by incoming L2TP over UDP request. It is in blocking read mode. > That said, GetSockDstAddress() is strange. From its name, it seems that the purpose of the function is to obtain the destination address, as the control message. But it also tries to read some data from the socket, and the data is discarded. I coded the function GetSockDstAddress(). It is called just once after sock= et creation in case L2TP server "self" address not specified in the mpd.conf You are right, the purpose is to receive control message with destination address from the kernel and it is my first attempt to programm this. I beli= eved this is right way to do that without reading payload data from the socket.= =20 Maybe there is some application logic error if some payload data is discard= ed, but recvmsg() still has control message to return because of IP_RECVDSTADDR socket option, hasn't it? So it should not block just after first UDP datag= ramm arrived, I believe. I am interested in fixing the problem and will add more information you requested. However, I need also to minimize impact on this production serve= r, so please show exact command I should use to catch the kernel-side backtrac= e. This my machine still uses FreeBSD 11.4-STABLE/i386 r365547 (September 2020= ). --=20 You are receiving this mail because: You are the assignee for the bug.=