On Wed, Dec 24, 2025 at 12:01:40PM +0100, Martin Pieuchot wrote:
> On 24/12/25(Wed) 11:55, Martin Pieuchot wrote:
> > On 23/12/25(Tue) 22:49, Alexander Bluhm wrote:
> > > On Mon, Dec 22, 2025 at 11:04:59PM +0100, Alexander Bluhm wrote:
> > > > On Mon, Dec 15, 2025 at 06:15:35PM +0100, Alexander Bluhm wrote:
> > > > > On Mon, Dec 15, 2025 at 02:18:45PM +0100, Martin Pieuchot wrote:
> > > > > > Thanks for the report. Is your machine still in ddb? We're
> > > > > > missing the
> > > > > > trace of the CPU1 which is the one that paniced. Would you please
> > > > > > get it?
> > > >
> > > > It happend again. This time with trace of all CPUs. Note that I
> > > > did a make build with a kernel where I applied the "Make pdaemon
> > > > understandable" diff before.
> > >
> > > And here another one. This time with the fixed pgdemon diff.
> >
> > Thanks a lot Alexander. I have two hypothesis about this assert.
> > Either it is a race and the page is no longer on the active list by
> > the time the page daemon is trying to lock it or it is a corruption.
> >
> > Would you please try the diff below and look for the corresponding
> > message in dmesg? Thanks a lot!
>
> Now with the necessary include:
I cannot trigger it anymore. But note that the crash was not
reliable before.
At one point I messed up the testing diffs. I had claimed that the
bug happens with the fixed version of the "Make pdaemon understandable"
diff. Actually I had only tested the version with the bogous while
loop. So maybe this diff fixed something.
Anyway. Currently I cannot reproduce. I will keep an eye on it.
I will use the diff below if it happens again.
bluhm
> Index: uvm/uvm_pdaemon.c
> ===================================================================
> RCS file: /cvs/src/sys/uvm/uvm_pdaemon.c,v
> diff -u -p -r1.144 uvm_pdaemon.c
> --- uvm/uvm_pdaemon.c 24 Dec 2025 10:29:22 -0000 1.144
> +++ uvm/uvm_pdaemon.c 24 Dec 2025 10:59:19 -0000
> @@ -386,6 +386,8 @@ uvm_aiodone_daemon(void *arg)
> }
> }
>
> +#include <uvm/uvm_ddb.h>
> +
> /*
> * uvmpd_trylockowner: trylock the page's owner.
> *
> @@ -396,15 +398,21 @@ uvmpd_trylockowner(struct vm_page *pg)
> {
>
> struct uvm_object *uobj = pg->uobject;
> + struct vm_anon *anon = pg->uanon;
> struct rwlock *slock;
>
> if (uobj != NULL) {
> slock = uobj->vmobjlock;
> - } else {
> - struct vm_anon *anon = pg->uanon;
> -
> - KASSERT(anon != NULL);
> + KASSERTMSG(slock != NULL, "pg %p uobj %p, NULL lock", pg, uobj);
> + } else if (anon != NULL) {
> slock = anon->an_lock;
> + KASSERTMSG(slock != NULL, "pg %p anon %p, NULL lock", pg, anon);
> + } else {
> +#if 1
> + printf("page still active?");
> + uvm_page_printit(pg, 1, printf);
> +#endif
> + return NULL;
> }
>
> if (rw_enter(slock, RW_WRITE|RW_NOSLEEP)) {
>