All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "Williams, Dan J" <dan.j.williams@intel.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [ndctl PATCH] test, device-dax: Fix intermittent poison handling failures
Date: Mon, 15 Oct 2018 22:59:14 +0000	[thread overview]
Message-ID: <4ceb4de847d5ede7d2a1c38e0cf6260109578b66.camel@intel.com> (raw)
In-Reply-To: <153940497244.1425803.2319137619591631976.stgit@dwillia2-desk3.amr.corp.intel.com>


On Fri, 2018-10-12 at 21:29 -0700, Dan Williams wrote:
> The device-dax unit test sometimes fails with the following kernel
> message signature:
> 
>      Memory failure: Unable to find user space address 204300 in lt-device-dax
>      Memory failure: 0x204300: forcibly killing lt-device-dax:1334 because of failure to unmap
> 
> This happens when there is a 3rd party vma in the rmap that has an entry
> at the same index as the currently failing page. While the test has
> munmap()'d the previous mapping we still trip over the fact that the
> kernel memory-failure code does not differentiate munmap vs mremap and
> upgrades the failure to process fatal.
> 
> The add_to_kill() routine in the kernel has a comment that says:
> 
>         /*
>          * In theory we don't have to kill when the page was
>          * munmaped. But it could be also a mremap. Since that's
>          * likely very rare kill anyways just out of paranoia, but use
>          * a SIGKILL because the error is not contained anymore.
>          */
> 
> ...when it is determining what to do when it can't find the given pfn
> mapped into the process at the given index.
> 
> Avoid this case by munmap()'ing *and* closing the file to trigger old /
> stale vma's to be reaped. With that the only vma that can be looked up
> is the one the error was injected, the lookup succeeds, and the test
> passes.
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
>  test/device-dax.c |   49 ++++++++++++++++++++++++++++++++++---------------
>  1 file changed, 34 insertions(+), 15 deletions(-)

Looks good, applied.

> 
> 

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

      reply	other threads:[~2018-10-15 22:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-13  4:29 [ndctl PATCH] test, device-dax: Fix intermittent poison handling failures Dan Williams
2018-10-15 22:59 ` Verma, Vishal L [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ceb4de847d5ede7d2a1c38e0cf6260109578b66.camel@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.