linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: SeongJae Park <sj@kernel.org>
Cc: Feng Tang <feng.tang@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	damon@lists.linux.dev
Subject: Re: [PATCH] mm/damon/core-test: Initialise context before test in damon_test_set_attrs()
Date: Tue, 18 Jul 2023 16:19:33 +0000	[thread overview]
Message-ID: <20230718161933.78949-1-sj@kernel.org> (raw)
In-Reply-To: <20230718161656.78877-1-sj@kernel.org>

Also, please note that it would be very helpful if you could Cc
damon@lists.linux.dev for all DAMON-related patches from the next time.  I'm
cc-ing the list.


Thanks,
SJ

On Tue, 18 Jul 2023 16:16:56 +0000 SeongJae Park <sj@kernel.org> wrote:

> Hi Feng Tang,
> 
> On Tue, 18 Jul 2023 13:28:11 +0800 Feng Tang <feng.tang@intel.com> wrote:
> 
> > Running kunit test for 6.5-rc1 hits one bug:
> > 
> >         ok 10 damon_test_update_monitoring_result
> >     general protection fault, probably for non-canonical address 0x1bffa5c419cfb81: 0000 [#1] PREEMPT SMP NOPTI
> >     CPU: 1 PID: 110 Comm: kunit_try_catch Tainted: G                 N 6.5.0-rc2 #15
> >     Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
> >     RIP: 0010:damon_set_attrs+0xb9/0x120
> >     Code: f8 00 00 00 4c 8d 58 e0 48 39 c3 74 ba 41 ba 59 17 b7 d1 49 8b 43 10 4d
> >     8d 4b 10 48 8d 70 e0 49 39 c1 74 50 49 8b 40 08 31 d2 <69> 4e 18 10 27 00 00
> >     49 f7 30 31 d2 48 89 c5 89 c8 f7 f5 31 d2 89
> >     RSP: 0000:ffffc900005bfd40 EFLAGS: 00010246
> >     RAX: ffffffff81159fc0 RBX: ffffc900005bfeb8 RCX: 0000000000000000
> >     RDX: 0000000000000000 RSI: 01bffa5c419cfb69 RDI: ffffc900005bfd70
> >     RBP: ffffc90000013c10 R08: ffffc900005bfdc0 R09: ffffffff81ff10ed
> >     R10: 00000000d1b71759 R11: ffffffff81ff10dd R12: ffffc90000013a78
> >     R13: ffff88810eb78180 R14: ffffffff818297c0 R15: ffffc90000013c28
> >     FS:  0000000000000000(0000) GS:ffff88813bd00000(0000) knlGS:0000000000000000
> >     CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> >     CR2: 0000000000000000 CR3: 0000000002a1c001 CR4: 0000000000370ee0
> >     DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> >     DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> >     Call Trace:
> >      <TASK>
> >      damon_test_set_attrs+0x63/0x1f0
> >      kunit_generic_run_threadfn_adapter+0x17/0x30
> >      kthread+0xfd/0x130
> 
> Great.  But it would be even greater if you could this kind of output after
> decoding the addreses using 'scripts/decode_stacktrace.sh` or
> 'scripts/faddr2line' from next time if possible.
> 
> > 
> > The problem seems to be related with the damon_ctx was used without
> > being initialized. Fix it by adding the initialization.
> 
> Somehow the test always passed on my test machine, but maybe that's due to some
> different behavior of my compiler.  I agree that could be the root cause
> because 'damon_set_attrs()' calls 'damon_update_monitoring_results()', which
> accesses the context's fields including the targets list.  Since the list is
> not initialized in this test code, it would cause such error.
> 
> > 
> > Fixes: aa13779be6b7 ("mm/damon/core-test: add a test for damon_set_attrs()")
> > Signed-off-by: Feng Tang <feng.tang@intel.com>
> 
> Reviewed-by: SeongJae Park <sj@kernel.org>
> 
> 
> Thanks,
> SJ
> 


  reply	other threads:[~2023-07-18 16:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18  5:28 [PATCH] mm/damon/core-test: Initialise context before test in damon_test_set_attrs() Feng Tang
2023-07-18 16:16 ` SeongJae Park
2023-07-18 16:19   ` SeongJae Park [this message]
2023-07-19  3:00   ` Feng Tang

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=20230718161933.78949-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=feng.tang@intel.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).