From owner-svn-src-head@freebsd.org Tue Jul 19 11:43:22 2016 Return-Path: Delivered-To: svn-src-head@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 F0D04B9C31E for ; Tue, 19 Jul 2016 11:43:22 +0000 (UTC) (envelope-from rrs@netflix.com) Received: from mail-pa0-x236.google.com (mail-pa0-x236.google.com [IPv6:2607:f8b0:400e:c03::236]) (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 C061D197D for ; Tue, 19 Jul 2016 11:43:22 +0000 (UTC) (envelope-from rrs@netflix.com) Received: by mail-pa0-x236.google.com with SMTP id iw10so6391502pac.2 for ; Tue, 19 Jul 2016 04:43:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=q+ZKOX2GyF3pn16UlA17jz1ZKERyNOGiN1CxLYT/AmI=; b=dvZyE7tlcCBLIlLxR6RzW8FRK+DaomO+lYCF76soAPRQ5L+VBsFKKZYWQ8ZkH50yD4 dIyqZ9PlJUtQlj16FL48UObmqzkqodr8RdbEiUBllD1a0bDA4g98f+k9hLGfXvbHLLIH JXKXKgYW1UyWMbxZuZVINr0jqWxUGcliTEgow= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=q+ZKOX2GyF3pn16UlA17jz1ZKERyNOGiN1CxLYT/AmI=; b=eui/gQlJPqBkLA/PQKEe00ABj/dPLHJ0V/PdgYIiqmQl1RFzX2PwvZRPMb3aYebHGF 9zi7M2RP3/i/3MWh1Bp2lSxcyzzYbRTOkLJpVPbwqFa1vwGGf9ET2akabyPNIn6xU9rm MAOPgWCt2c3fqmwl4NeRiUvc5fSuEYQYiKJfF3BKeyOVXFasSEmz8KuJ7fCIq+ePZN5G ZcEPMqljrXXrSGp+tVRi5XREo3co2HS7C1rzEgCd7vzo5FyfDrrr6bao+ydGOPsuN3PE 8l7QCtMVTJ3HXGN/QQD8H4P1CYqOptlGTvlrWdIhjormby91/GG4P0yTU4VwASg6vK/5 GhcA== X-Gm-Message-State: ALyK8tL8oA7YPIrhAPNBIZbxNBgFek0/2Q7GhjmJ6Na2TzeQ5Ob268mLpiT3dKpuW8xicQiQ X-Received: by 10.66.66.13 with SMTP id b13mr65166407pat.45.1468928601967; Tue, 19 Jul 2016 04:43:21 -0700 (PDT) Received: from [100.127.66.198] ([69.53.245.200]) by smtp.gmail.com with ESMTPSA id q14sm2877361pfi.76.2016.07.19.04.43.19 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Jul 2016 04:43:21 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r302998 - head/sys/kern From: Randall Stewart In-Reply-To: <58868615-8255-4D8B-BD9E-8E19A734CB6C@netflix.com> Date: Tue, 19 Jul 2016 13:43:16 +0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <5E551FA8-C779-45AE-B038-D8B51B53EEAA@netflix.com> References: <201607180929.u6I9T9Uw063705@repo.freebsd.org> <64C1543A-3EDE-4852-88EA-5B0B78FCF016@netflix.com> <58868615-8255-4D8B-BD9E-8E19A734CB6C@netflix.com> To: Gleb Smirnoff X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jul 2016 11:43:23 -0000 Gleb Ok I have now updated https://reviews.freebsd.org/D7135 You can take this or not=E2=80=A6 I really don=E2=80=99t care either = way=E2=80=A6 (you are welcome to own the kern_timeout.c code I hate it) :-) Basically when you went off and re-factored kern_timeout.c I had worked = in parallel on fixing the bugs you were seeing.. There were three distinct problems that I = fixed=E2=80=A6 but then you had refactored the stop() routine.. and I thought ok.. thats fine. I = had actually thought about doing something similar to what you did and was too chicken to poke that = much at it.. it has always had a nasty habit of biting back when you make a lot of changes = :-D I know my version has worked for quite some time in my testing so I = brought it back. Complete with its 3 return codes (I only recently switched to your = version and thus started having difficulties with leaks and crashes)=E2=80=A6. You are welcome not to use this.. I know it works (it ran on a number of machines at NF last night.. and we will of course = continue testing it as we finish our dev testing for the upcoming OCA software release).. = For now this is what will be going out into the OCA=E2=80=99s at least :-) R > On Jul 18, 2016, at 6:19 PM, Randall Stewart wrote: >=20 > I have worked out a fix of this in Netflix code base (I have the same = code running there). I > will get that tested tonight I will get the fixes in to restore the = behavior. >=20 > I will setup a phabricator shortly.. most likely I will update the one = I already > have on the one problem your earlier patch did not fix. >=20 > R >> On Jul 18, 2016, at 5:44 PM, Randall Stewart wrote: >>=20 >> Gleb: >>=20 >> This now leaks TCP-PCB=E2=80=99s since you have broken the return = codes with all your >> fixes that used to be in here. >>=20 >> It was >>=20 >> return 1 =E2=80=94 You stopped the callout >> return 0 =E2=80=94 The callout could not be stopped >> return -1 =E2=80=94 The callout was not running. >>=20 >> The LLRef code that was crashing in in.c depended on this to know to = free >> the memory.. i.e. if was > 0 then they needed to free the memory. >>=20 >> TCP depends on a return 0 to indicate the async-drain function will = be called back and >> thus increments a refcnt and waits for the callback. >>=20 >> You now return 0 when no timer was active.. which makes the stack = then wait >> for the not forth coming async-drain call. >>=20 >> R >>> On Jul 18, 2016, at 11:29 AM, Gleb Smirnoff = wrote: >>>=20 >>> Author: glebius >>> Date: Mon Jul 18 09:29:08 2016 >>> New Revision: 302998 >>> URL: https://svnweb.freebsd.org/changeset/base/302998 >>>=20 >>> Log: >>> Revert the last commit. It must get more review and testing first. >>>=20 >>> Modified: >>> head/sys/kern/kern_timeout.c >>>=20 >>> Modified: head/sys/kern/kern_timeout.c >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/sys/kern/kern_timeout.c Mon Jul 18 09:26:06 2016 = (r302997) >>> +++ head/sys/kern/kern_timeout.c Mon Jul 18 09:29:08 2016 = (r302998) >>> @@ -1381,7 +1381,7 @@ again: >>> CTR3(KTR_CALLOUT, "failed to stop %p func %p arg %p", >>> c, c->c_func, c->c_arg); >>> CC_UNLOCK(cc); >>> - return (-1); >>> + return (0); >>> } >>>=20 >>> c->c_iflags &=3D ~CALLOUT_PENDING; >>>=20 >>=20 >> -------- >> Randall Stewart >> rrs@netflix.com >> 803-317-4952 >>=20 >>=20 >>=20 >>=20 >>=20 >=20 > -------- > Randall Stewart > rrs@netflix.com > 803-317-4952 >=20 >=20 >=20 >=20 >=20 -------- Randall Stewart rrs@netflix.com 803-317-4952