From owner-freebsd-current@freebsd.org Sun Jul 12 17:51:58 2015 Return-Path: Delivered-To: freebsd-current@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 A883B99BFC6 for ; Sun, 12 Jul 2015 17:51:58 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oi0-x236.google.com (mail-oi0-x236.google.com [IPv6:2607:f8b0:4003:c06::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 6DD39189B for ; Sun, 12 Jul 2015 17:51:58 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by oibn4 with SMTP id n4so10033144oib.3 for ; Sun, 12 Jul 2015 10:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=6X+4bjtNkoRy2MMaEIvc00za38ecJAyNzWKbONcq6tQ=; b=IWPEkqo4+bTr7X3rRM3q/4i2oHQ7csGaDYmSa2qnyZvh7E3CE+A/+huepP4Y4jqzxo kJI7kBibRldB1ITzAyr0TQWashTlLLq88zvc6OZhr/yb1VDGLqNKfSutWYhrEWJ/ElNY AeqoOnRIosMVbjfa+p74I9lkUbKY3nMwI8BGevOtjvCH20rhING94DU7Tgj+oXVoLOPf qL6jSdigoYs92nBo+yrJ2aqN4XRSV++erYyFfddaruMQj7fsL8I6nm5kgxQoOvP7LpEG Fri4lMPSz+263rD6oOnrMYsjJedWdvQD58uvkN3kOkbRbazSUqCEpCoGyHiI/MYRPDGK i6bg== MIME-Version: 1.0 X-Received: by 10.182.250.195 with SMTP id ze3mr26798356obc.74.1436723517882; Sun, 12 Jul 2015 10:51:57 -0700 (PDT) Received: by 10.76.58.17 with HTTP; Sun, 12 Jul 2015 10:51:57 -0700 (PDT) Date: Sun, 12 Jul 2015 10:51:57 -0700 Message-ID: Subject: Re: unp gc vs socket close/shutdown race From: Conrad Meyer To: freebsd-current@freebsd.org Cc: Mateusz Guzik Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2015 17:51:58 -0000 Hi all, (Sorry In-Reply-To is wrong; gmail isn't the most flexible MUA and I was not subscribed to FreeBSD-Current until today.) I have a slightly cleaned up version of this patch in phabricator at https://reviews.freebsd.org/D3044 . My mentor thinks it looks ok, but we would appreciate any feedback y'all have. The PR is here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194264 . Primary changes from MJG's patch: * Rather than adding PR_DISPOSE2 flag, we just change dom_dispose KPI. Unix local domain is the only in-tree consumer. * Use unp_gcflag IGNORED flag to only skip scanning RIGHTS on a socket during GC mark phase. Unix sockets may refer to other sockets in the graph while being half shutdown (shutdown(SHUT_RD)), they just won't have valid RIGHTS. Thanks, Conrad