Re: panic: assertion "!cpu_softintr_p()" failed

2023-10-02 Thread Andrew Doran
Hi,

On Sun, Oct 01, 2023 at 10:12:47AM +0200, Thomas Klausner wrote:

> panic: kernel diagnostic assertion "!cpu_softintr_p()" failed: file 
> "/usr/src/sys/kern/subr_kmem.c", line 451

Sorry about that.  Should be fixed by:

/cvsroot/src/sys/kern/kern_mutex_obj.c,v  <--  kern_mutex_obj.c
new revision: 1.15; previous revision: 1.14
/cvsroot/src/sys/kern/kern_rwlock_obj.c,v  <--  kern_rwlock_obj.c
new revision: 1.13; previous revision: 1.12

Cheers,
Andrew


Re: panic: assertion "!cpu_softintr_p()" failed

2023-10-02 Thread Thomas Klausner
On Mon, Oct 02, 2023 at 09:23:59AM +1100, Matthew Green wrote:
> Thomas Klausner writes:
> > panic: kernel diagnostic assertion "!cpu_softintr_p()" failed: file 
> > "/usr/src/sys/kern/subr_kmem.c", line 451
> >
> > gdb says:
> >
> > #10 0x80e3551e in vpanic (fmt=0x813a1880 "kernel 
> > %sassertion \"%s\" failed: file \"%s\", line %d ", 
> > ap=ap@entry=0xae2110a93e08)
> > at /usr/src/sys/kern/subr_prf.c:286
> > #11 0x80ffab6f in kern_assert (fmt=fmt@entry=0x813a1880 
> > "kernel %sassertion \"%s\" failed: file \"%s\", line %d ")
> > at /usr/src/sys/lib/libkern/kern_assert.c:51
> > #12 0x80e27e15 in kmem_free (p=0x9afa82af5b80, size=64) at 
> > /usr/src/sys/kern/subr_kmem.c:451
> > #13 0x80df5960 in rw_obj_free (lock=0x9afa82af5b80) at 
> > /usr/src/sys/kern/kern_rwlock_obj.c:127
> > #14 0x80d825d3 in uvm_anon_release (anon=) at 
> > /usr/src/sys/uvm/uvm_anon.c:385
> 
> i think this is a new bug.  this line changed from:
> 
> 1.11 (ad   12-Sep-23):  pool_cache_put(rw_obj_cache, ro);
> 
> to
> 
> 1.12 (ad   23-Sep-23):  kmem_free(ro, sizeof(*ro));
> 
> i guess it just should be kmem_free_intr(), as pool_cache
> is intr-safe as well.

Thanks, I'll try a kernel with the attached diff.
 Thomas
Index: kern_rwlock_obj.c
===
RCS file: /cvsroot/src/sys/kern/kern_rwlock_obj.c,v
retrieving revision 1.12
diff -u -r1.12 kern_rwlock_obj.c
--- kern_rwlock_obj.c   23 Sep 2023 18:21:11 -  1.12
+++ kern_rwlock_obj.c   2 Oct 2023 07:51:31 -
@@ -124,7 +124,7 @@
}
membar_acquire();
rw_destroy(>ro_lock);
-   kmem_free(ro, sizeof(*ro));
+   kmem_intr_free(ro, sizeof(*ro));
return true;
 }
 


re: panic: assertion "!cpu_softintr_p()" failed

2023-10-01 Thread matthew green
Thomas Klausner writes:
> panic: kernel diagnostic assertion "!cpu_softintr_p()" failed: file 
> "/usr/src/sys/kern/subr_kmem.c", line 451
>
> gdb says:
>
> #10 0x80e3551e in vpanic (fmt=0x813a1880 "kernel %sassertion 
> \"%s\" failed: file \"%s\", line %d ", ap=ap@entry=0xae2110a93e08)
> at /usr/src/sys/kern/subr_prf.c:286
> #11 0x80ffab6f in kern_assert (fmt=fmt@entry=0x813a1880 
> "kernel %sassertion \"%s\" failed: file \"%s\", line %d ")
> at /usr/src/sys/lib/libkern/kern_assert.c:51
> #12 0x80e27e15 in kmem_free (p=0x9afa82af5b80, size=64) at 
> /usr/src/sys/kern/subr_kmem.c:451
> #13 0x80df5960 in rw_obj_free (lock=0x9afa82af5b80) at 
> /usr/src/sys/kern/kern_rwlock_obj.c:127
> #14 0x80d825d3 in uvm_anon_release (anon=) at 
> /usr/src/sys/uvm/uvm_anon.c:385

i think this is a new bug.  this line changed from:

1.11 (ad   12-Sep-23):  pool_cache_put(rw_obj_cache, ro);

to

1.12 (ad   23-Sep-23):  kmem_free(ro, sizeof(*ro));

i guess it just should be kmem_free_intr(), as pool_cache
is intr-safe as well.


.mrg.


panic: assertion "!cpu_softintr_p()" failed

2023-10-01 Thread Thomas Klausner
Hi!

I've updated to 10.99.9 last night and started a bulk build, which
didn't get very far.

panic: kernel diagnostic assertion "!cpu_softintr_p()" failed: file 
"/usr/src/sys/kern/subr_kmem.c", line 451

gdb says:

#10 0x80e3551e in vpanic (fmt=0x813a1880 "kernel %sassertion 
\"%s\" failed: file \"%s\", line %d ", ap=ap@entry=0xae2110a93e08)
at /usr/src/sys/kern/subr_prf.c:286
#11 0x80ffab6f in kern_assert (fmt=fmt@entry=0x813a1880 "kernel 
%sassertion \"%s\" failed: file \"%s\", line %d ")
at /usr/src/sys/lib/libkern/kern_assert.c:51
#12 0x80e27e15 in kmem_free (p=0x9afa82af5b80, size=64) at 
/usr/src/sys/kern/subr_kmem.c:451
#13 0x80df5960 in rw_obj_free (lock=0x9afa82af5b80) at 
/usr/src/sys/kern/kern_rwlock_obj.c:127
#14 0x80d825d3 in uvm_anon_release (anon=) at 
/usr/src/sys/uvm/uvm_anon.c:385
#15 0x80d9e525 in uvm_aio_aiodone_pages 
(pgs=pgs@entry=0xae2110a93f30, npages=npages@entry=16, 
write=write@entry=true, error=error@entry=0)
at /usr/src/sys/uvm/uvm_pager.c:466
#16 0x80d9e954 in uvm_aio_aiodone (bp=0x9b158a500ed8) at 
/usr/src/sys/uvm/uvm_pager.c:526
#17 0x80ece109 in dkiodone (bp=) at 
/usr/src/sys/dev/dkwedge/dk.c:1658
#18 0x80e878a3 in biointr (cookie=) at 
/usr/src/sys/kern/vfs_bio.c:1737
#19 0x80dfd7bf in softint_execute (s=3, l=0x9b16c8abd8c0) at 
/usr/src/sys/kern/kern_softint.c:597
#20 softint_dispatch (pinned=, s=3) at 
/usr/src/sys/kern/kern_softint.c:842
#21 0x8023480c in Xsoftintr ()

 Thomas