linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Hillf Danton <dhillf@gmail.com>
Cc: linux-mm@kvack.org, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: unused swap offset / bad page map.
Date: Wed, 7 Aug 2013 11:30:30 -0400	[thread overview]
Message-ID: <20130807153030.GA25515@redhat.com> (raw)
In-Reply-To: <CAJd=RBCJv7=Qj6dPW2Ha=nq6JctnK3r7wYCAZTm=REVOZUNowg@mail.gmail.com>

On Wed, Aug 07, 2013 at 06:04:20PM +0800, Hillf Danton wrote:
 > > There were a slew of these. same trace, different addr/anon_vma/index.
 > > mapping always null.
 > >
 > Would you please run again with the debug info added?
 > ---
 > --- a/mm/swapfile.c	Wed Aug  7 17:27:22 2013
 > +++ b/mm/swapfile.c	Wed Aug  7 17:57:20 2013
 > @@ -509,6 +509,7 @@ static struct swap_info_struct *swap_inf
 >  {
 >  	struct swap_info_struct *p;
 >  	unsigned long offset, type;
 > +	int race = 0;
 > 
 >  	if (!entry.val)
 >  		goto out;
 > @@ -524,10 +525,17 @@ static struct swap_info_struct *swap_inf
 >  	if (!p->swap_map[offset])
 >  		goto bad_free;
 >  	spin_lock(&p->lock);
 > +	if (!p->swap_map[offset]) {
 > +		race = 1;
 > +		spin_unlock(&p->lock);
 > +		goto bad_free;
 > +	}
 >  	return p;
 > 
 >  bad_free:
 >  	printk(KERN_ERR "swap_free: %s%08lx\n", Unused_offset, entry.val);
 > +	if (race)
 > +		printk(KERN_ERR "but due to race\n");
 >  	goto out;
 >  bad_offset:
 >  	printk(KERN_ERR "swap_free: %s%08lx\n", Bad_offset, entry.val);
 > --

printk didn't trigger.
This time around the oom killer was going off the same time.
I'm wondering if we have some allocations somewhere in the swap code that
don't handle failure correctly.

	Dave


  reply	other threads:[~2013-08-07 15:30 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07  5:51 unused swap offset / bad page map Dave Jones
2013-08-07 10:04 ` Hillf Danton
2013-08-07 15:30   ` Dave Jones [this message]
2013-08-08 15:20     ` Hillf Danton
2013-08-08 15:36       ` Dave Jones
2013-08-19 23:18       ` Dave Jones
2013-08-20  4:39         ` Hillf Danton
2013-08-21 20:49           ` Dave Jones
2013-08-22  0:35             ` Hillf Danton
2013-08-22  3:21             ` Hillf Danton
2013-08-23  3:21               ` Dave Jones
     [not found]                 ` <CAJd=RBArkh3sKVoOJUZBLngXtJubjx4-a3G6s7Tn0N=Pr1gU4g@mail.gmail.com>
2013-08-23  3:53                   ` Dave Jones
2013-08-26  3:45                     ` Hillf Danton
2013-08-26 19:08                       ` Dave Jones
2013-08-26 20:15                         ` Linus Torvalds
2013-08-26 20:46                           ` Linus Torvalds
2013-08-26 22:08                             ` Hugh Dickins
2013-08-26 22:28                               ` Dave Jones
2013-08-27  8:37                                 ` Cyrill Gorcunov
2013-08-27 16:24                                   ` Dave Jones
2013-08-27 16:32                                     ` Cyrill Gorcunov
2013-08-26 23:15                               ` Linus Torvalds
2013-08-27  5:44                                 ` Cyrill Gorcunov
2013-08-26 20:18                         ` Cyrill Gorcunov
2013-08-26 20:37                           ` Dave Jones
2013-08-26 20:42                             ` Cyrill Gorcunov
2013-08-26 21:37                               ` Cyrill Gorcunov
2013-08-26 21:42                                 ` Dave Jones
2013-08-26 21:49                                   ` Cyrill Gorcunov
2013-08-26 21:59                                     ` Dave Jones
2013-08-07 15:54   ` Dave Jones

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=20130807153030.GA25515@redhat.com \
    --to=davej@redhat.com \
    --cc=dhillf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).