public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894
@ 2015-12-24 17:12 Jeremiah Mahler
  2015-12-29 16:23 ` Michal Hocko
  2016-01-04 21:22 ` Andrew Morton
  0 siblings, 2 replies; 8+ messages in thread
From: Jeremiah Mahler @ 2015-12-24 17:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kees Cook, Andy Lutomirski, Will Drewry, Andrew Morton,
	Ingo Molnar, Tejun Heo

all,

I have started seeing a "Bad rss-counter" message in the logs with
the latest linux-next 20151222+.

  [  458.282192] BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894

I can test patches if anyone has any ideas.

-- 
- Jeremiah Mahler

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894
  2015-12-24 17:12 BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894 Jeremiah Mahler
@ 2015-12-29 16:23 ` Michal Hocko
  2015-12-29 18:30   ` Andrew Morton
  2016-01-04 21:22 ` Andrew Morton
  1 sibling, 1 reply; 8+ messages in thread
From: Michal Hocko @ 2015-12-29 16:23 UTC (permalink / raw)
  To: Jeremiah Mahler
  Cc: linux-kernel, Kees Cook, Andy Lutomirski, Will Drewry,
	Andrew Morton, Ingo Molnar, Tejun Heo

[CCing Andrew]

On Thu 24-12-15 09:12:53, Jeremiah Mahler wrote:
> all,
> 
> I have started seeing a "Bad rss-counter" message in the logs with
> the latest linux-next 20151222+.
> 
>   [  458.282192] BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894

This is MM_SHMEMPAGES so an "unamapped" shmem memory. One possible
reason might be an unitialized zap_details used from unmap_mapping_range
during truncate introduced by "mm, oom: introduce oom reaper" from the
mmotm tree. There is a fix for this which is still pending
http://lkml.kernel.org/r/1450487091-7822-1-git-send-email-sasha.levin%40oracle.com
-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894
  2015-12-29 16:23 ` Michal Hocko
@ 2015-12-29 18:30   ` Andrew Morton
  2015-12-29 18:57     ` Jeremiah Mahler
  2015-12-30 22:32     ` Stephen Rothwell
  0 siblings, 2 replies; 8+ messages in thread
From: Andrew Morton @ 2015-12-29 18:30 UTC (permalink / raw)
  To: Michal Hocko
  Cc: Jeremiah Mahler, linux-kernel, Kees Cook, Andy Lutomirski,
	Will Drewry, Ingo Molnar, Tejun Heo

On Tue, 29 Dec 2015 17:23:47 +0100 Michal Hocko <mhocko@kernel.org> wrote:

> [CCing Andrew]
> 
> On Thu 24-12-15 09:12:53, Jeremiah Mahler wrote:
> > all,
> > 
> > I have started seeing a "Bad rss-counter" message in the logs with
> > the latest linux-next 20151222+.
> > 
> >   [  458.282192] BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894
> 
> This is MM_SHMEMPAGES so an "unamapped" shmem memory. One possible
> reason might be an unitialized zap_details used from unmap_mapping_range
> during truncate introduced by "mm, oom: introduce oom reaper" from the
> mmotm tree. There is a fix for this which is still pending
> http://lkml.kernel.org/r/1450487091-7822-1-git-send-email-sasha.levin%40oracle.com

That won't be getting fixed until linux-next returns from holidays.

This:

--- a/mm/memory.c~mm-oom-introduce-oom-reaper-fix-5-fix
+++ a/mm/memory.c
@@ -2415,7 +2415,7 @@ static inline void unmap_mapping_range_t
 void unmap_mapping_range(struct address_space *mapping,
 		loff_t const holebegin, loff_t const holelen, int even_cows)
 {
-	struct zap_details details;
+	struct zap_details details = { };
 	pgoff_t hba = holebegin >> PAGE_SHIFT;
 	pgoff_t hlen = (holelen + PAGE_SIZE - 1) >> PAGE_SHIFT;
 
_


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894
  2015-12-29 18:30   ` Andrew Morton
@ 2015-12-29 18:57     ` Jeremiah Mahler
  2015-12-30 22:32     ` Stephen Rothwell
  1 sibling, 0 replies; 8+ messages in thread
From: Jeremiah Mahler @ 2015-12-29 18:57 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Michal Hocko, linux-kernel, Kees Cook, Andy Lutomirski,
	Will Drewry, Ingo Molnar, Tejun Heo

Andrew, Michal,

On Tue, Dec 29, 2015 at 10:30:37AM -0800, Andrew Morton wrote:
> On Tue, 29 Dec 2015 17:23:47 +0100 Michal Hocko <mhocko@kernel.org> wrote:
> 
> > [CCing Andrew]
> > 
> > On Thu 24-12-15 09:12:53, Jeremiah Mahler wrote:
> > > all,
> > > 
> > > I have started seeing a "Bad rss-counter" message in the logs with
> > > the latest linux-next 20151222+.
> > > 
> > >   [  458.282192] BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894
> > 
> > This is MM_SHMEMPAGES so an "unamapped" shmem memory. One possible
> > reason might be an unitialized zap_details used from unmap_mapping_range
> > during truncate introduced by "mm, oom: introduce oom reaper" from the
> > mmotm tree. There is a fix for this which is still pending
> > http://lkml.kernel.org/r/1450487091-7822-1-git-send-email-sasha.levin%40oracle.com
> 
> That won't be getting fixed until linux-next returns from holidays.
> 
> This:
> 
> --- a/mm/memory.c~mm-oom-introduce-oom-reaper-fix-5-fix
> +++ a/mm/memory.c
> @@ -2415,7 +2415,7 @@ static inline void unmap_mapping_range_t
>  void unmap_mapping_range(struct address_space *mapping,
>  		loff_t const holebegin, loff_t const holelen, int even_cows)
>  {
> -	struct zap_details details;
> +	struct zap_details details = { };
>  	pgoff_t hba = holebegin >> PAGE_SHIFT;
>  	pgoff_t hlen = (holelen + PAGE_SIZE - 1) >> PAGE_SHIFT;
>  
> _
> 

I tested both the patch that Michal mentioned as well as the change that
Andrew provided.  The both appear to fix the problem on my machine.

Thanks for the help :-)

-- 
- Jeremiah Mahler

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894
  2015-12-29 18:30   ` Andrew Morton
  2015-12-29 18:57     ` Jeremiah Mahler
@ 2015-12-30 22:32     ` Stephen Rothwell
  1 sibling, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2015-12-30 22:32 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Michal Hocko, Jeremiah Mahler, linux-kernel, Kees Cook,
	Andy Lutomirski, Will Drewry, Ingo Molnar, Tejun Heo

Hi Andrew,

On Tue, 29 Dec 2015 10:30:37 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Tue, 29 Dec 2015 17:23:47 +0100 Michal Hocko <mhocko@kernel.org> wrote:
> 
> > [CCing Andrew]
> > 
> > On Thu 24-12-15 09:12:53, Jeremiah Mahler wrote:  
> > > all,
> > > 
> > > I have started seeing a "Bad rss-counter" message in the logs with
> > > the latest linux-next 20151222+.
> > > 
> > >   [  458.282192] BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894  
> > 
> > This is MM_SHMEMPAGES so an "unamapped" shmem memory. One possible
> > reason might be an unitialized zap_details used from unmap_mapping_range
> > during truncate introduced by "mm, oom: introduce oom reaper" from the
> > mmotm tree. There is a fix for this which is still pending
> > http://lkml.kernel.org/r/1450487091-7822-1-git-send-email-sasha.levin%40oracle.com  
> 
> That won't be getting fixed until linux-next returns from holidays.
> 
> This:
> 
> --- a/mm/memory.c~mm-oom-introduce-oom-reaper-fix-5-fix
> +++ a/mm/memory.c
> @@ -2415,7 +2415,7 @@ static inline void unmap_mapping_range_t
>  void unmap_mapping_range(struct address_space *mapping,
>  		loff_t const holebegin, loff_t const holelen, int even_cows)
>  {
> -	struct zap_details details;
> +	struct zap_details details = { };
>  	pgoff_t hba = holebegin >> PAGE_SHIFT;
>  	pgoff_t hlen = (holelen + PAGE_SIZE - 1) >> PAGE_SHIFT;
>  

OK, I have added the following from mmots to linux-next today (though I
may not get a release done):

mm-oom-introduce-oom-reaper-fix-4-fix.patch
mm-oom-introduce-oom-reaper-fix-4.patch
mm-oom-introduce-oom-reaper-fix-5-fix.patch
mm-oom-introduce-oom-reaper-fix-5.patch
mm-oom-introduce-oom-reaper-fix-6.patch
mmoom-exclude-tif_memdie-processes-from-candidates.patch

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894
  2015-12-24 17:12 BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894 Jeremiah Mahler
  2015-12-29 16:23 ` Michal Hocko
@ 2016-01-04 21:22 ` Andrew Morton
  2016-01-04 22:46   ` Kirill A. Shutemov
  1 sibling, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2016-01-04 21:22 UTC (permalink / raw)
  To: Jeremiah Mahler
  Cc: linux-kernel, Kees Cook, Andy Lutomirski, Will Drewry,
	Ingo Molnar, Tejun Heo, linux-mm, Michal Hocko,
	Kirill A. Shutemov, Vlastimil Babka

On Thu, 24 Dec 2015 09:12:53 -0800 Jeremiah Mahler <jmmahler@gmail.com> wrote:

> all,
> 
> I have started seeing a "Bad rss-counter" message in the logs with
> the latest linux-next 20151222+.
> 
>   [  458.282192] BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894
> 
> I can test patches if anyone has any ideas.
> 
> -- 
> - Jeremiah Mahler

Thanks.  cc's added.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894
  2016-01-04 21:22 ` Andrew Morton
@ 2016-01-04 22:46   ` Kirill A. Shutemov
  2016-01-05  1:41     ` Jeremiah Mahler
  0 siblings, 1 reply; 8+ messages in thread
From: Kirill A. Shutemov @ 2016-01-04 22:46 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jeremiah Mahler, linux-kernel, Kees Cook, Andy Lutomirski,
	Will Drewry, Ingo Molnar, Tejun Heo, linux-mm, Michal Hocko,
	Vlastimil Babka

On Mon, Jan 04, 2016 at 01:22:03PM -0800, Andrew Morton wrote:
> On Thu, 24 Dec 2015 09:12:53 -0800 Jeremiah Mahler <jmmahler@gmail.com> wrote:
> 
> > all,
> > 
> > I have started seeing a "Bad rss-counter" message in the logs with
> > the latest linux-next 20151222+.
> > 
> >   [  458.282192] BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894
> > 
> > I can test patches if anyone has any ideas.
> > 
> > -- 
> > - Jeremiah Mahler
> 
> Thanks.  cc's added.

IIUC, it's been fixed already, no?

http://lkml.kernel.org/r/20151229185729.GA2209@hudson.localdomain

-- 
 Kirill A. Shutemov

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894
  2016-01-04 22:46   ` Kirill A. Shutemov
@ 2016-01-05  1:41     ` Jeremiah Mahler
  0 siblings, 0 replies; 8+ messages in thread
From: Jeremiah Mahler @ 2016-01-05  1:41 UTC (permalink / raw)
  To: Kirill A. Shutemov
  Cc: Andrew Morton, linux-kernel, Kees Cook, Andy Lutomirski,
	Will Drewry, Ingo Molnar, Tejun Heo, linux-mm, Michal Hocko,
	Vlastimil Babka

all,

On Tue, Jan 05, 2016 at 12:46:30AM +0200, Kirill A. Shutemov wrote:
> On Mon, Jan 04, 2016 at 01:22:03PM -0800, Andrew Morton wrote:
> > On Thu, 24 Dec 2015 09:12:53 -0800 Jeremiah Mahler <jmmahler@gmail.com> wrote:
> > 
> > > all,
> > > 
> > > I have started seeing a "Bad rss-counter" message in the logs with
> > > the latest linux-next 20151222+.
> > > 
> > >   [  458.282192] BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894
> > > 
> > > I can test patches if anyone has any ideas.
> > > 
> > > -- 
> > > - Jeremiah Mahler
> > 
> > Thanks.  cc's added.
> 
> IIUC, it's been fixed already, no?
> 
> http://lkml.kernel.org/r/20151229185729.GA2209@hudson.localdomain
> 
> -- 
>  Kirill A. Shutemov

Yes, it is fixed in the latest linux-next.

-- 
- Jeremiah Mahler

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-01-05  1:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-24 17:12 BUG: Bad rss-counter state mm:ffff8800c5a96000 idx:3 val:3894 Jeremiah Mahler
2015-12-29 16:23 ` Michal Hocko
2015-12-29 18:30   ` Andrew Morton
2015-12-29 18:57     ` Jeremiah Mahler
2015-12-30 22:32     ` Stephen Rothwell
2016-01-04 21:22 ` Andrew Morton
2016-01-04 22:46   ` Kirill A. Shutemov
2016-01-05  1:41     ` Jeremiah Mahler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox