On Thu, Dec 26, 2013 at 07:51:45PM +0100, Antoine Brodin wrote: > On Thu, Dec 26, 2013 at 7:33 PM, Peter Wemm <pe...@wemm.org> wrote: > > On Thu, Dec 26, 2013 at 7:39 AM, Antoine Brodin <anto...@freebsd.org> wrote: > >> On Thu, Dec 26, 2013 at 1:04 PM, Andriy Gapon <a...@freebsd.org> wrote: > > ... > >> Hello, > >> > >> FWIW, I had a similar panic today on 9.2-RELEASE with a GENERIC kernel: > >> panic: Bad entry start/end for new stack entry > >> cpuid = 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? > > > 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 != &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 || @@ -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) ||
Description: PGP signature