From owner-freebsd-java@FreeBSD.ORG Thu Dec 26 14:33:00 2013 Return-Path: Delivered-To: freebsd-java@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D303854; Thu, 26 Dec 2013 14:33:00 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 9D4591554; Thu, 26 Dec 2013 14:32:58 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA25699; Thu, 26 Dec 2013 16:32:55 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VwBzb-0005CT-Ef; Thu, 26 Dec 2013 16:32:55 +0200 Message-ID: <52BC3DDF.4060503@FreeBSD.org> Date: Thu, 26 Dec 2013 16:31:59 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: latest openjdk7 triggers kernel panic References: <52BC1B41.2060900@FreeBSD.org> <20131226140500.GM59496@kib.kiev.ua> In-Reply-To: <20131226140500.GM59496@kib.kiev.ua> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Alan Cox , FreeBSD Current , peter@FreeBSD.org, Marcel Moolenaar , freebsd-java@FreeBSD.org X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 14:33:00 -0000 on 26/12/2013 16:05 Konstantin Belousov said the following: > I provided the following patch yesterday to Peter, after the similar mail. > > diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c > index e3842a3..51b60de 100644 > --- a/sys/vm/vm_map.c > +++ b/sys/vm/vm_map.c > @@ -1207,6 +1207,7 @@ charged: > } > else if ((prev_entry != &map->header) && > (prev_entry->eflags == protoeflags) && > + (cow & (MAP_ENTRY_GROWS_DOWN | MAP_ENTRY_GROWS_UP)) == 0 && > (prev_entry->end == start) && > (prev_entry->wired_count == 0) && > (prev_entry->cred == cred || > > But there were no core dump available, and I think that your note is also > valid. I do not see why cow should be cleared from the stack direction > bits. > > diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c > index e3842a3..e15e0ca 100644 > --- a/sys/vm/vm_map.c > +++ b/sys/vm/vm_map.c > @@ -3339,7 +3340,6 @@ vm_map_stack(vm_map_t map, vm_offset_t addrbos, vm_size_t max_ssize, > * NOTE: We explicitly allow bi-directional stacks. > */ > orient = cow & (MAP_STACK_GROWS_DOWN|MAP_STACK_GROWS_UP); > - cow &= ~orient; > KASSERT(orient != 0, ("No stack grow direction")); > > if (addrbos < vm_map_min(map) || > I can confirm that the patch fixes the problem for me. Thanks! -- Andriy Gapon