From owner-svn-src-all@freebsd.org Fri Apr 14 21:10:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F301D3E5EC for ; Fri, 14 Apr 2017 21:10:58 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 338CC6E8 for ; Fri, 14 Apr 2017 21:10:58 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-io0-x22f.google.com with SMTP id a103so120282868ioj.1 for ; Fri, 14 Apr 2017 14:10:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=omPZ9aZno4X4MatDoAzosacGpeYjIkg4UH5YgK8z+IY=; b=fz4Z3Svqy78+ACqjb0f+HJYUYRp2D3KIuonqFuhlRk+S9uxj/8380xkmeJLYAZrarQ aPHcveF3uySDvbo1Ds0irFD3DF42hujY8DUVqTb05itLFhyv2UUew2vdJ1CZkEq9sjSZ Ej23ArpwuAUJm2n/QrT/7T+VY+F3wplWAlgXkIo7Ag4GCYcW3Y+fzlaS54L4DYIfa0HQ OQ1HvyvghJVTHG+9vExeMPJV6bqEaArd770qi33bBoeBqzWU6D7Q/a8Xq2JDyxz459UP BQ3gwSUmBbtCKQMvv2cfLd/zkdX3XGwQnHJR9Raecd1BZ3w0NSVybf57NTsY5I11BgjM 7icA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=omPZ9aZno4X4MatDoAzosacGpeYjIkg4UH5YgK8z+IY=; b=C6PmUn4VoBKqGOjNP8wmfdV71n2VPaMy9p82F3XRscFRcNJVORId8DNlWLRv/9NkGm Io5zXYpjNJYHPi/7BzcbiyjqgjMxoMWu0fhTRRtGyJfTiEZH5okbCC6Hhkz+WbKAcKqL eHXQaeyAhFEQw3H4X9NxVhyO5yFAyc1C++x0CqLueBkvCm70AUMdVCp+yIC7htYAjyBi byTp2so/41l/dmFoeGKjAPOX9AaYuLrgvBwPcA9Q+SyQ9wbYVMfCEQQFRRQtX1yICH53 cayL1YMEciE0J63ajveGsDW9CE2454FFV0pg9z1wkO2wHB5PT1bwR8SyymA8cGbSb9Dn KO/g== X-Gm-Message-State: AN3rC/7tdpItytOhChhR0ULSAT2KFA/rCv6HNMFIC+PSgcdqoLQCUHcQ urOa8NMMPQx6QwSXPhll3pmu73P3EBlt X-Received: by 10.107.128.69 with SMTP id b66mr13293094iod.25.1492204257567; Fri, 14 Apr 2017 14:10:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.104.135 with HTTP; Fri, 14 Apr 2017 14:10:56 -0700 (PDT) In-Reply-To: <513B1846-02E3-49E0-BAA2-CA923EDC5DFF@gmail.com> References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <12133324.zHp9vo75vZ@overcee.wemm.org> <6942092.OsECkgAp13@overcee.wemm.org> <513B1846-02E3-49E0-BAA2-CA923EDC5DFF@gmail.com> From: Maxim Sobolev Date: Fri, 14 Apr 2017 14:10:56 -0700 Message-ID: Subject: Re: svn commit: r316874 - head/sys/kern To: "Ngie Cooper (yaneurabeya)" Cc: Peter Wemm , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Hiren Panchasara Content-Type: multipart/mixed; boundary=001a113f8c6cb4eaad054d26e0ee X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 21:10:58 -0000 --001a113f8c6cb4eaad054d26e0ee Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Peter, Ngie, Looks like out of that refactoring came a logical bug that is present in the head, which causes syslod to first to shutdown the socket for reading and then try to select/recv on it (which is somewhat stupid). And that issue has been masked by shutdown() on datagram socket becoming effectively a NOP in 11 & head 20 months ago. It only affects head though, 11-stable still has the old code which does not include that half-closed socket into the select list. Attached patch is expected to fix head, Peter, it would be nice if you can give it a try (restoring latest changes into uipc_sockets.c) and let me know if it helps. Thanks! On Fri, Apr 14, 2017 at 12:48 PM, Ngie Cooper (yaneurabeya) < yaneurabeya@gmail.com> wrote: > > > On Apr 14, 2017, at 12:46, Peter Wemm wrote: > > > > On Friday, April 14, 2017 12:41:52 PM Maxim Sobolev wrote: > >> Thanks, Peter. I will try to look into this asap. > > > > I don't understand what is going on yet. Presumably there must be other > > changes in play that affect udp/select sometime between the original 20= 15 > > change and this. The syslogd -s code is Old(TM). I'm also wondering > whether > > the -s code even works at all since the 2015 / r285910 change... > > syslogd has been refactored a lot on ^/head. I don=E2=80=99t think it=E2= =80=99s safe to > say that the ^/head and ^/stable/11 and earlier copies will function the > same. > Thanks, > -Ngie > --=20 Maksym Sobolyev Sippy Software, Inc. Internet Telephony (VoIP) Experts Tel (Canada): +1-778-783-0474 Tel (Toll-Free): +1-855-747-7779 Fax: +1-866-857-6942 Web: http://www.sippysoft.com MSN: sales@sippysoft.com Skype: SippySoft --001a113f8c6cb4eaad054d26e0ee Content-Type: text/plain; charset=US-ASCII; name="syslogd.diff" Content-Disposition: attachment; filename="syslogd.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j1ibuchu1 SW5kZXg6IHN5c2xvZ2QuYwo9PT09PT09PT09PT09PT09PT09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