Re: [fuse-devel] Kernel panic under load

From: Johannes Weiner
Date: Fri Sep 09 2016 - 15:46:30 EST


Hi Miklos,

On Fri, Sep 09, 2016 at 04:32:49PM +0200, Miklos Szeredi wrote:
> On Fri, Sep 9, 2016 at 3:34 PM, Antonio SJ Musumeci <trapexit@xxxxxxxxxx> wrote:
> > https://gist.github.com/bauruine/3bc00075c4d0b5b3353071d208ded30f
> > https://github.com/trapexit/mergerfs/issues/295
> >
> > I've some users which are having issues with my filesystem where the
> > system's load increases and then the kernel panics.
> >
> > Has anyone seen this before?
>
> Quite possibly this is caused by fuse, but the BUG is deep in mm
> territory and I have zero clue about what it means.
>
> Hannes, can you please look a the above crash in mm/workingset.c?

The MM maintains a reclaimable list of page cache tree nodes that have
gone empty (all pages evicted) except for the shadow entries reclaimed
pages leave behind. When faulting a regular page back into such a node
the code in page_cache_tree_insert() removes it from the list again:

workingset_node_pages_inc(node);
/*
* Don't track node that contains actual pages.
*
* Avoid acquiring the list_lru lock if already
* untracked. The list_empty() test is safe as
* node->private_list is protected by
* mapping->tree_lock.
*/
if (!list_empty(&node->private_list))
list_lru_del(&workingset_shadow_nodes,
&node->private_list);

The BUG_ON() triggers when we later walk the reclaimable list and find
a radix tree node that has actual pages in it. This could happen when
pages are inserted into a mapping without using add_to_page_cache and
related functions. Does that maybe ring a bell?