Linux block layer
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: Jens Axboe <axboe@kernel.dk>, Yi Zhang <yi.zhang@redhat.com>
Cc: linux-block <linux-block@vger.kernel.org>,
	CKI Project <cki-project@redhat.com>,
	Bruno Goncalves <bgoncalv@redhat.com>
Subject: Re: [bisected]kernel BUG at lib/list_debug.c:30! (list_add corruption. prev->next should be nex)
Date: Sat, 26 Nov 2022 17:54:27 -0500	[thread overview]
Message-ID: <43d93aa6-4846-bf03-e7b0-bcab6ba8a49e@redhat.com> (raw)
In-Reply-To: <3f346cf0-1a3a-b884-5a21-f0508d02981d@kernel.dk>


On 11/26/22 10:53, Jens Axboe wrote:
> On 11/26/22 7:29 AM, Yi Zhang wrote:
>> Hi Jens
>> Sorry for the delay as I couldn't reproduce it with the original
>> for-6.2/block branch.
>> Finally, I rebased the for-6.2/block branch on 6.1-rc6 and was able to
>> bisect it:
>>
>>
>> 951d1e94801f95a3fc1c75ff342431c9f519dd14 is the first bad commit
>> commit 951d1e94801f95a3fc1c75ff342431c9f519dd14
>> Author: Waiman Long <longman@redhat.com>
>> Date:   Fri Nov 4 20:59:02 2022 -0400
>>
>>      blk-cgroup: Flush stats at blkgs destruction path
>>
>>      As noted by Michal, the blkg_iostat_set's in the lockless list
>>      hold reference to blkg's to protect against their removal. Those
>>      blkg's hold reference to blkcg. When a cgroup is being destroyed,
>>      cgroup_rstat_flush() is only called at css_release_work_fn() which is
>>      called when the blkcg reference count reaches 0. This circular dependency
>>      will prevent blkcg from being freed until some other events cause
>>      cgroup_rstat_flush() to be called to flush out the pending blkcg stats.
>>
>>      To prevent this delayed blkcg removal, add a new cgroup_rstat_css_flush()
>>      function to flush stats for a given css and cpu and call it at the blkgs
>>      destruction path, blkcg_destroy_blkgs(), whenever there are still some
>>      pending stats to be flushed. This will ensure that blkcg reference
>>      count can reach 0 ASAP.
>>
>>      Signed-off-by: Waiman Long <longman@redhat.com>
>>      Acked-by: Tejun Heo <tj@kernel.org>
>>      Link: https://lore.kernel.org/r/20221105005902.407297-4-longman@redhat.com
>>      Signed-off-by: Jens Axboe <axboe@kernel.dk>
> Waiman, let me know if you have an idea what is going on here and can
> send in a fix, or if I need to revert this one. From looking at the
> lists of commits after these reports came in, I did suspect this
> commit. But I don't know enough about this area to render an opinion
> on a fix without spending more time on it.
>
Sure. I will take a closer look at that. Will let you know my 
investigation result ASAP.

Thanks,
Longman


  reply	other threads:[~2022-11-26 22:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23  8:48 kernel BUG at lib/list_debug.c:30! (list_add corruption. prev->next should be nex) Bruno Goncalves
2022-11-23 13:46 ` Jens Axboe
2022-11-24 14:57   ` Bruno Goncalves
2022-11-25  8:38     ` Yi Zhang
2022-11-26 14:29       ` [bisected]kernel " Yi Zhang
2022-11-26 15:53         ` Jens Axboe
2022-11-26 22:54           ` Waiman Long [this message]
2022-11-27  4:13             ` Waiman Long
2022-11-28 18:55         ` Bart Van Assche

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=43d93aa6-4846-bf03-e7b0-bcab6ba8a49e@redhat.com \
    --to=longman@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=bgoncalv@redhat.com \
    --cc=cki-project@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=yi.zhang@redhat.com \
    /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