traversing vma on nommu
Hajime Tazaki
thehajime at gmail.com
Wed Nov 6 21:40:41 PST 2024
On Thu, 07 Nov 2024 12:23:50 +0900,
Liam R. Howlett wrote:
> > > > Can you add some (totally untested) debug to the exit path in
> > > > kernel/acct.c?
> > > >
> > > > +#include <linux/maple_tree.h>
> > > >
> > > > ...
> > > > mmap_read_lock(mm);
> >
> > I probably should have suggested adding:
> >
> > if (!strcmp(current->comm, "apk")) {
> > > > + mt_dump(&mm->mm_mt, mt_dump_hex);
> > > > + mt_validate(&mm->mm_mt);
> > }
> >
> > > > for_each_vma(vmi, vma)
> > > > vsize += vma->vm_end - vma->vm_start;
> > > > mmap_read_unlock(mm);
thanks for looking into detail.
indeed, the log I put shows a lot of text generated from other
processes. The process of interest (causing crash) is "PID: 38 Comm:
apk", but other processes (PID: 31 Comm: ip, and PID: 35 Comm: sh)
also shows "Sequential nulls end at xxxx" message.
And there is one message "BUG at mas_validate_gaps", which is from
"apk" command.
> > > > You will need to enable CONFIG_DEBUG_MAPLE_TREE on the kernel.
> > >
> > > I quickly added the code and here is the just part of the output.
> > > It's being so long; I put the full output at below.
> > >
> > > https://gist.github.com/thehajime/30485f105ab78a09b66691eb024dc011
> > >
> > > # I'm not yet looking at carefully the log but will do.
> >
> > I think it's probably more important to try a real build. I'm surprised
> > it gets as far as it does with the sequential nulls.
> >
> > We have 32b testing in userspace for the maple tree, and it works.
> > maple_tree: 139594121 of 139594121 tests passed
> >
> > So at least that much is known to work.
> >
> > As you are probably finding out, building a nommu test system is a pain
> > (or you probably already know and want to stop doing it and use UML..).
> >
> > I'll give my m68k build a go against v6.12-rc6.
>
> I was able to build 6.12.0-rc6 for m68k nommu (m5208). It boots and
> tests the maple tree fine:
>
> TEST STARTING
>
> maple_tree: 3808238 of 3808238 tests passed
>
> # uname -a
> uClinux buildroot 6.12.0-rc6 #2 Wed Nov 6 22:14:42 EST 2024 m68k GNU/Linux
thanks.
I have also tested with riscv64 nommu arch with buildroot but wasn't
seeing any issues so far (tested with "ip" command, etc).
~ # uname -a
Linux buildroot 6.12.0-rc2 #1 Wed Nov 6 17:09:21 JST 2024 riscv64 GNU/Linux
I'd also like to test with what you've done: how can I test to
generate the message below ?
> maple_tree: 3808238 of 3808238 tests passed
> > I had a look at your patches and nothing seems to pop out against
> > any vma specific code changes in there?
Indeed, my patches have no intentions to change any vma specific
behavior.
-- Hajime
More information about the maple-tree
mailing list