From nobody Fri Nov 21 20:52:29 2025 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dCnTq4f13z6HlGs for ; Fri, 21 Nov 2025 20:52:31 +0000 (UTC) (envelope-from mmel@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dCnTq130wz3tMJ; Fri, 21 Nov 2025 20:52:31 +0000 (UTC) (envelope-from mmel@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763758351; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MhQsteH2W899otZQmUW6bBAOJx1+djyom1hmn2YnjDw=; b=ogUQtQ3n1rjukrHKZndkMyeDVl1rKZd9ORXatn5qZNhjhZOOLSgprfMIHJkRFvDL6/UE5D eX9BbIItxZ+U9jXBoM91bN+dhct9AEkBBC7YMIsl294wes8EGIDYW03W4LcYeflilVPdgK //sG9Xc90yjZpxGsAc679ecu68HnIWShTCgOMoNGpD0GdPdScZraXNbocJIaSoyUBXfy4q rUIEdOtWv8AA8MMpsVhYGDGUzUghMGFzC3mnuTuQJgvFIy8W8ljfD14Mne9/6Frs9t1/nN BgOJOkqQhs56S0NYGhkeQlnGWJf7yWauXT+KuoJE84xECDKyCLIk+HNtbr5VeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763758351; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MhQsteH2W899otZQmUW6bBAOJx1+djyom1hmn2YnjDw=; b=n4dqAAAJL9bV8KHlZDyeOZnAZrumdcIPttn6MHSojhABprlvdlYunCcMrBd1g/C60tuPwK EJ4g0M1SKU+NcD522ANemNs49HVoKNVwcKtD1FdI/0yYREI4Rgbz/sxk2M7/I4gwdYZ15d 4KNA2SkptTyUQtdbt/fFWqf2Rca6hBIH90rYtxIMNd3JNlwAPsRQ4lDPo9MUPrDL1rqvTJ sAdXS31mDW0lAtWQV5I/0wkfvTEc2vZWoD0DL3DX7U7W0y/l9yAcdHt+Bxc0SmsKh/GGJ2 ANck4Kd20gv/jHR6VKe8ziOZIjZjARY3WBvc5RoetE3njAKWaOWSotYE/GtwAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763758351; a=rsa-sha256; cv=none; b=aGvkOdACK1KuySoSwdiNELMA7np9Ms6zXYW7PfRNrVE+J+QtPT4HJxAf1m+w2hiwrLkYYW 6qGmZNV+nENqfk1aN+aZbTDu8AnyqMG7tHx704B29GyGAoBDOg05uqHu9Z7nJ3vaz9y8Uh Rv2H4FIMzdZsPjOqC+MD2mmvpxoo2DEuCvrEwHcCXnaOmXQW4QgV7QnqBrXnXQ0Jrwl1h0 mxcF/jRVdXzpXlIrurNM9n+fkzC4feGNbYiiHRpRPKMhDTRMzlV2zURlMpNz+LUztgcCM1 wAG75Avw5eTr80BIQils/r5vmQ/kAU5UJR26mb+XFB1XHt0Oof/5n+oLLo0RUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [192.168.168.195] (internet-251.radiolinkplus.cz [109.205.241.251]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mmel/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dCnTp4cMzz9K1; Fri, 21 Nov 2025 20:52:30 +0000 (UTC) (envelope-from mmel@freebsd.org) Message-ID: <5f042521-03d7-41c0-95a2-5711595d0f62@freebsd.org> Date: Fri, 21 Nov 2025 21:52:29 +0100 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Michal Meloun Reply-To: mmel@FreeBSD.org Subject: Re: mmap( MAP_ANON) is broken on current. (was Still seeing Failed assertion: "p[i] == 0" on armv7 buildworld) To: Konstantin Belousov Cc: FreeBSD Current References: <8657a2f4-cb32-49a5-bbf6-cd5a4394c7be@FreeBSD.org> Content-Language: cs, en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 21.11.2025 21:02, Konstantin Belousov wrote: > On Fri, Nov 21, 2025 at 09:54:23PM +0200, Konstantin Belousov wrote: >> On Fri, Nov 21, 2025 at 08:08:47PM +0100, Michal Meloun wrote: >>> First, many thanks for your efforts, but this check doesn't trigger when the >>> problem occurs >>> >> Hm, ok. This is a data point, in fact. >> >>> >>> To be more precise, testing case >>> on fresh kernel(d8bfcacd12aba73188c44a157c707908e275825d) >>> with PMAP_DEBUG defined in pmap-v6.c and with >>> trivial zero check for first page at this place -> >>> https://cgit.freebsd.org/src/tree/contrib/jemalloc/src/pages.c#n281 >>> >>> causes this failure: >>> >>> __je_pages_map: addr: 0x0, ret: 0x3087b000, size: 4096, alignment: 4096, >>> prot: 0x00000003, flags: 0x0C001002 >>> __je_pages_map: i: 0, p[i]: 0xFFFFFFFF, p: 0x3087b000 >>> __je_pages_map: i: 23, p[i]: 0x308E5F94, p: 0x3087b000 >> >> Could you, please, when the failure is detected, spawn 'procstat -v ' >> and dump the memory map of the process? To be clear, I want to see all >> of this: >> - the address of the mapping returned by mmap >> - its size >> - the location of the first non-zero byte >> - memory map > > Also, regardless of the output above, please try this as a wild guess: > > diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c > index 5b4517d2bf0c..5c6ed51706bf 100644 > --- a/sys/vm/vm_object.c > +++ b/sys/vm/vm_object.c > @@ -2222,7 +2222,7 @@ vm_object_coalesce(vm_object_t prev_object, vm_ooffset_t prev_offset, > * Remove any pages that may still be in the object from a previous > * deallocation. > */ > - if (next_pindex < prev_object->size) { > + if (true || next_pindex < prev_object->size) { > vm_object_page_remove(prev_object, next_pindex, next_pindex + > next_size, 0); > #if 0 Unfortunately, this does not help either. Give me a moment to collect the required procstat.