Help needed to identify golang fork / memory corruption issue on FreeBSD

Mark Millard markmi at dsl-only.net
Mon Mar 27 20:43:41 UTC 2017


On 2017-Mar-27, at 9:49 AM, Konstantin Belousov <kostikbel at gmail.com> 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 
>> copy-on-write.
>>                  * Immediately copy these pages into the new map by 
>> simulating
>>                  * page faults.  The new pages are pageable.
>>                  */
>>                 vm_fault_copy_entry(dst_map, src_map, dst_entry, src_entry,
>>                     fork_charge);
>> 
>> 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?


===
Mark Millard
markmi at dsl-only.net



More information about the freebsd-hackers mailing list