FYI
-------- Original Message --------
Subject: KASSERT in vm_map.c
Date: Thu, 27 Feb 2014 09:51:02 +0100
From: Hans Petter Selasky <hps at bitfrost.no>
To: Konstantin Belousov <kib at FreeBSD.org>
Hi,
Using 9-stable I hit a KASSERT when EHCI is loading:
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -2301,9 +2301,11 @@ vm_map_unwire(vm_map_t map, vm_offset_t start,
vm_offset_t end,
* Mark the entry in case the map lock is released. (See
* above.)
*/
+#if 0
KASSERT((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0
&&
entry->wiring_thread == NULL,
("owned map entry %p", entry));
+#endif
entry->eflags |= MAP_ENTRY_IN_TRANSITION;
entry->wiring_thread = curthread;
/*
Is the KASSERT() wrong or is my USB code wrong.
Simply add to GENERIC:
> +options INVARIANTS # Enable calls of extra sanity
checking
> +options INVARIANT_SUPPORT # Extra sanity checks of internal
structures, required by INVARIANTS
> +options WITNESS # Enable checks to detect
deadlocks and cycles
> +options WITNESS_SKIPSPIN # Don't run witness on
spinlocks for speed
> +
Should be trivial to reproduce.
Thank you!
--HPS
On Thursday, March 06, 2014 2:07:45 am Hans Petter Selasky wrote:> FYI > > -------- Original Message -------- > Subject: KASSERT in vm_map.c > Date: Thu, 27 Feb 2014 09:51:02 +0100 > From: Hans Petter Selasky <hps at bitfrost.no> > To: Konstantin Belousov <kib at FreeBSD.org> > > Hi, > > Using 9-stable I hit a KASSERT when EHCI is loading: > > --- a/sys/vm/vm_map.c > +++ b/sys/vm/vm_map.c > @@ -2301,9 +2301,11 @@ vm_map_unwire(vm_map_t map, vm_offset_t start, > vm_offset_t end, > * Mark the entry in case the map lock is released. (See > * above.) > */ > +#if 0 > KASSERT((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 && > entry->wiring_thread == NULL, > ("owned map entry %p", entry)); > +#endif > entry->eflags |= MAP_ENTRY_IN_TRANSITION; > entry->wiring_thread = curthread; > /* > > > Is the KASSERT() wrong or is my USB code wrong.The KASSERT is correct. Can you provide more details from your panic? (Do you have a crash dump?) It sounds like two threads are mucking with the same vm_map_entry at the same time. -- John Baldwin