Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Dec 2013 22:01:44 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Antoine Brodin <antoine@FreeBSD.org>
Cc:        Marcel Moolenaar <marcel@freebsd.org>, Peter Wemm <peter@wemm.org>, Alan Cox <alc@freebsd.org>, Andriy Gapon <avg@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>, freebsd-java@freebsd.org
Subject:   Re: latest openjdk7 triggers kernel panic
Message-ID:  <20131226200144.GP59496@kib.kiev.ua>
In-Reply-To: <CAALwa8=yJ6c2bg-VrReEjXe88yF=9Qa_vXESQUzkg36chetvPg@mail.gmail.com>
References:  <52BC1B41.2060900@FreeBSD.org> <CAALwa8=gmPfQKp7FvGHBNY4wTPc%2BTVoGHMk=a5gRJB-ysCLrXQ@mail.gmail.com> <CAGE5yCrRfunbFhGrKgZHAXvOmPb6tUR2d_TEuju=sNKokHdx3Q@mail.gmail.com> <CAALwa8=yJ6c2bg-VrReEjXe88yF=9Qa_vXESQUzkg36chetvPg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--p2BUbKl1Fxnzi6Vs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Dec 26, 2013 at 07:51:45PM +0100, Antoine Brodin wrote:
> On Thu, Dec 26, 2013 at 7:33 PM, Peter Wemm <peter@wemm.org> wrote:
> > On Thu, Dec 26, 2013 at 7:39 AM, Antoine Brodin <antoine@freebsd.org> w=
rote:
> >> On Thu, Dec 26, 2013 at 1:04 PM, Andriy Gapon <avg@freebsd.org> wrote:
> > ...
> >> Hello,
> >>
> >> FWIW,  I had a similar panic today on 9.2-RELEASE with a GENERIC kerne=
l:
> >> panic: Bad entry start/end for new stack entry
> >> cpuid =3D 1
> >> KDB: stack backtrace:
> >> #0 0xffffffff80947986 at kdb_backtrace+0x66
> >> #1 0xffffffff8090d9ae at panic+0x1ce
> >> #2 0xffffffff80b81314 at vm_map_stack+0x274
> >> #3 0xffffffff80b83584 at vm_mmap+0x674
> >> #4 0xffffffff80b83d2f at sys_mmap+0x1cf
> >> #5 0xffffffff80cf187a at amd64_syscall+0x5ea
> >> #6 0xffffffff80cdbff7 at Xfast_syscall+0xf7
> >>
> >> It looks like the box was compiling java related ports (java/jaxen and
> >> devel/antlr) when it panic'ed.
> >
> > This is troubling.  I'm wondering what's changed and why we haven't
> > seen this before.
Well, if MAP_STACK was started used only with update, or the condition
for coalescing only holds due to changes in the update, this is not
much strange.

> >
> > Just so I'm clear, you're building 9.2 ports on a 9.2-REL kernel,
> > right?  and not something like building 9.2-REL ports inside a jail on
> > a 10.x or 11.x host?  10.x / 11.x are not involved and you're seeing
> > this?
>=20
>=20
> This is 9.2-REL host and kernel.
> The only thing "new" is the ports tree,  ports tree from 20 december
> didn't make the box panic while ports tree from 26 december does.
> (and there was an openjdk update between)

I can only repost the following patch.  It should be applicable to 9
as well.

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
@@ -1207,6 +1207,7 @@ charged:
 	}
 	else if ((prev_entry !=3D &map->header) &&
 		 (prev_entry->eflags =3D=3D protoeflags) &&
+		 (cow & (MAP_ENTRY_GROWS_DOWN | MAP_ENTRY_GROWS_UP)) =3D=3D 0 &&
 		 (prev_entry->end =3D=3D start) &&
 		 (prev_entry->wired_count =3D=3D 0) &&
 		 (prev_entry->cred =3D=3D cred ||
@@ -3339,7 +3340,6 @@ vm_map_stack(vm_map_t map, vm_offset_t addrbos, vm_si=
ze_t max_ssize,
 	 * NOTE: We explicitly allow bi-directional stacks.
 	 */
 	orient =3D cow & (MAP_STACK_GROWS_DOWN|MAP_STACK_GROWS_UP);
-	cow &=3D ~orient;
 	KASSERT(orient !=3D 0, ("No stack grow direction"));
=20
 	if (addrbos < vm_map_min(map) ||

--p2BUbKl1Fxnzi6Vs
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iQIcBAEBAgAGBQJSvIsnAAoJEJDCuSvBvK1BwfkP/i2CGur+KfR139SWuamvrEoa
fhTunJH6e9yzoLi81jeq8QTfCHGb9Hnd8XHYO8acu843bJBrv5Czc3at3phXFc/G
WrmsDCOzw3sMxAlmi+iiBg9H4QEMAFeClVlH5pPTdRRcOytKBw7n/Q7+tLuuBmDu
+L+hHZ8VlOhYuIZE/zZQGDjNlb5ZRbKCNZTed1Pl7Td0zy2l1VNIsu2DzL3rBpFU
HkRM4XzYPtCotPK3x3YsvQFWZTSyYx2/IfwBISa/7svIJwQQj/zsdurQPqPvYxpy
cmA4NORMWCFhaEtMXSNnhjRz3vYhLKW7KjqyGfhPVX9gwYeXe5XR1TZ7BEY01qHx
yp9sLRllrv8rjxwitZjeBks6DirxqfQbqnMNEJky4hWdbBrf2FkurgEvbebf6l+e
/X3nWFqTZpDyqmfVXkE5r0Wfna57WGO9Lh+bUjdxl4NWZ7BGuq1YeYatOOvqFu26
ox0+xFS2UUYcQCEz9lds/SPQZKI84fG0f7mZRE5UPW5HsMrLfyKcnoEwq4Rj9rDf
ps9RI9156IiJpM7zCtqmVc1tBZuH0AH8+nOIST8ebTs44PdLjSPYPKh+ZMHjx9s6
15Cfa6fUpwa8uZeVBRmCcTPN/EZuUzdI6gDAp9CmSzUY9RGtabMvi1L9ewnoY43M
X8+6j0KKdq108HP1PpL3
=YkbL
-----END PGP SIGNATURE-----

--p2BUbKl1Fxnzi6Vs--



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