From owner-freebsd-hackers@freebsd.org Mon Mar 27 20:43:41 2017 Return-Path: Delivered-To: freebsd-hackers@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 A16AED20F7E for ; Mon, 27 Mar 2017 20:43:41 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-172.reflexion.net [208.70.211.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50A3B8AD for ; Mon, 27 Mar 2017 20:43:40 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 31255 invoked from network); 27 Mar 2017 20:43:39 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 27 Mar 2017 20:43:39 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.30.2) with SMTP; Mon, 27 Mar 2017 16:43:39 -0400 (EDT) Received: (qmail 29684 invoked from network); 27 Mar 2017 20:43:39 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 27 Mar 2017 20:43:39 -0000 Received: from [192.168.1.111] (c-67-170-167-181.hsd1.or.comcast.net [67.170.167.181]) by iron2.pdx.net (Postfix) with ESMTPSA id CE981EC81E0; Mon, 27 Mar 2017 13:43:38 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: Help needed to identify golang fork / memory corruption issue on FreeBSD From: Mark Millard In-Reply-To: <20170327164905.GN43712@kib.kiev.ua> Date: Mon, 27 Mar 2017 13:43:38 -0700 Cc: Steven Hartland , "freebsd-hackers@freebsd.org" , "K. Macy" Content-Transfer-Encoding: quoted-printable Message-Id: <065E68C9-C9D5-4702-98A0-42E1A4FA8187@dsl-only.net> References: <20161206143532.GR54029@kib.kiev.ua> <18b40a69-4460-faf2-c0ce-7491eca92782@multiplay.co.uk> <20170317082333.GP16105@kib.kiev.ua> <180a601b-5481-bb41-f7fc-67976aabe451@multiplay.co.uk> <20170317124437.GR16105@kib.kiev.ua> <5ba92447-945e-6fea-ad4f-f58ac2a0012e@multiplay.co.uk> <20170327161833.GL43712@kib.kiev.ua> <3ec35a46-ae70-35cd-29f8-82e7cebb0eb6@multiplay.co.uk> <20170327164905.GN43712@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.3259) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 20:43:41 -0000 On 2017-Mar-27, at 9:49 AM, Konstantin Belousov = wrote: > On Mon, Mar 27, 2017 at 05:33:49PM +0100, Steven Hartland wrote: >> On 27/03/2017 17:18, Konstantin Belousov wrote: . . . >> I noticed in vm_map_copy_entry the following: >> /* >> * We don't want to make writeable wired pages=20 >> copy-on-write. >> * Immediately copy these pages into the new map by=20= >> simulating >> * page faults. The new pages are pageable. >> */ >> vm_fault_copy_entry(dst_map, src_map, dst_entry, = src_entry, >> fork_charge); >>=20 >> I wondered if I could use vm_fault_copy_entry to force the copy on = fork? > No, the vm_fault_copy_entry() only works with wired entries, e.g. it = cannot > page in not yet touched page, and the result is also wired. . . . I'm confused by the comment vs. the above note: Comment: The new pages are pageable. This note: the result is also wired So pagable wired pages? Incorrect comment? Comment that needs more context specified so the interpretation is clearer? =3D=3D=3D Mark Millard markmi at dsl-only.net