Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Dec 2013 16:31:59 +0200
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Alan Cox <alc@FreeBSD.org>, FreeBSD Current <freebsd-current@FreeBSD.org>, peter@FreeBSD.org, Marcel Moolenaar <marcel@FreeBSD.org>, freebsd-java@FreeBSD.org
Subject:   Re: latest openjdk7 triggers kernel panic
Message-ID:  <52BC3DDF.4060503@FreeBSD.org>
In-Reply-To: <20131226140500.GM59496@kib.kiev.ua>
References:  <52BC1B41.2060900@FreeBSD.org> <20131226140500.GM59496@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52BC3DDF.4060503>