Re: kernel BUG at include/linux/swapops.h:LINE!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 27, 2020 at 08:59:50PM +0800, Hillf Danton wrote:
> Can you elaborate on the difference between the two dumps?

You didn't trim anything, so I have no idea which two dumps you mean.

I'll annotate below ...

> > > On Sun, Jul 26, 2020 at 05:49:04PM +0100, Matthew Wilcox wrote:
> > > > 1457 086 (20181): drop_caches: 3
> > > > 1457 page:00000000a216ae9a refcount:2 mapcount:0 mapping:000000009ba7bfed index:0x2227 pfn:0x229e7
> > > > 1457 aops:def_blk_aops ino:0
> > > > 1457 flags: 0x4000000000002030(lru|active|private)
> > > > 1457 raw: 4000000000002030 fffff5b4416b5a48 fffff5b4408a7988 ffff9e9c34848578
> > > > 1457 raw: 0000000000002227 ffff9e9bd18f0d00 00000002ffffffff 0000000000000000
> > > > 1457 page dumped because: not locked
> > > > 1457 swap entry 30.229e7

This is a dump of the page that was found when looking up the migration entry.

> On Mon, 27 Jul 2020 13:03:10 +0100 Matthew Wilcox wrote:
> > It's not mapped with a PMD.  I tweaked my debugging slightly:
> > 
> >  static inline swp_entry_t make_migration_entry(struct page *page, int write)
> >  {
> > -       BUG_ON(!PageLocked(compound_head(page)));
> > +       VM_BUG_ON_PAGE(!PageLocked(page), page);
> >  
> > +if (PageHead(page)) dump_page(page, "make entry");
> > +if (PageTail(page)) printk("pfn %lx order %d\n", page_to_pfn(page), thp_order(thp_head(page)));
> > 
> > 1523 page:0000000006f62206 refcount:490 mapcount:1 mapping:0000000000000000 index:0x562b12a00 pfn:0x1dc00
> > 1523 head:0000000006f62206 order:9 compound_mapcount:0 compound_pincount:0
> > 1523 anon flags: 0x400000000009003d(locked|uptodate|dirty|lru|active|head|swapbacked)
> > 1523 raw: 400000000009003d ffffecfd41301308 ffffecfd41b08008 ffff9e9971c00059
> > 1523 raw: 0000000562b12a00 0000000000000000 000001ea00000000 0000000000000000
> > 1523 page dumped because: make entry

This is dumping the page when we create the entry.

For completeness, here's the page that we find from the same run.

1523 page:00000000a18100e6 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x1ddde
1523 flags: 0x4000000000000000()
1523 raw: 4000000000000000 dead000000000100 dead000000000122 0000000000000000
1523 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000
1523 page dumped because: not locked

(an order-9 page will occupy PFNs 0x1dc00-0x1ddff)

It's clearly been freed and is still sitting on the per-CPU free list.
I've also seen them as PageBuddy and, as in the first example above,
reallocated to a different user.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux