From: Jens Axboe <axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Tahsin Erdogan <tahsin-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org>,
Nauman Rafique <nauman-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Jan Kara <jack-IBi9RG/b67k@public.gmane.org>
Subject: Re: [PATCH block/for-4.5-fixes] writeback: keep superblock pinned during cgroup writeback association switches
Date: Tue, 16 Feb 2016 11:34:33 -0700 [thread overview]
Message-ID: <56C36BB9.5000104@kernel.dk> (raw)
In-Reply-To: <20160216182457.GO3741-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
On 02/16/2016 11:24 AM, Tejun Heo wrote:
> From 586afaa034bec88934bad4eb6ab38ba07031ec5a Mon Sep 17 00:00:00 2001
> From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Date: Tue, 16 Feb 2016 13:14:35 -0500
>
> If cgroup writeback is in use, an inode is associated with a cgroup
> for writeback. If the inode's main dirtier changes to another cgroup,
> the association gets updated asynchronously. Nothing was pinning the
> superblock while such switches are in progress and superblock could go
> away while async switching is pending or in progress leading to
> crashes like the following.
>
> kernel BUG at fs/jbd2/transaction.c:319!
> invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC
> CPU: 1 PID: 29158 Comm: kworker/1:10 Not tainted 4.5.0-rc3 #51
> Hardware name: Google Google, BIOS Google 01/01/2011
> Workqueue: events inode_switch_wbs_work_fn
> task: ffff880213dbbd40 ti: ffff880209264000 task.ti: ffff880209264000
> RIP: 0010:[<ffffffff803e6922>] [<ffffffff803e6922>] start_this_handle+0x382/0x3e0
> RSP: 0018:ffff880209267c30 EFLAGS: 00010202
> ...
> Call Trace:
> [<ffffffff803e6be4>] jbd2__journal_start+0xf4/0x190
> [<ffffffff803cfc7e>] __ext4_journal_start_sb+0x4e/0x70
> [<ffffffff803b31ec>] ext4_evict_inode+0x12c/0x3d0
> [<ffffffff8035338b>] evict+0xbb/0x190
> [<ffffffff80354190>] iput+0x130/0x190
> [<ffffffff80360223>] inode_switch_wbs_work_fn+0x343/0x4c0
> [<ffffffff80279819>] process_one_work+0x129/0x300
> [<ffffffff80279b16>] worker_thread+0x126/0x480
> [<ffffffff8027ed14>] kthread+0xc4/0xe0
> [<ffffffff809771df>] ret_from_fork+0x3f/0x70
>
> Fix it by bumping s_active while cgroup association switching is in
> flight.
Added for 4.5.
--
Jens Axboe
WARNING: multiple messages have this Message-ID (diff)
From: Jens Axboe <axboe@kernel.dk>
To: Tejun Heo <tj@kernel.org>, Tahsin Erdogan <tahsin@google.com>
Cc: cgroups@vger.kernel.org, "Theodore Ts'o" <tytso@mit.edu>,
Nauman Rafique <nauman@google.com>,
linux-kernel@vger.kernel.org, Jan Kara <jack@suse.com>
Subject: Re: [PATCH block/for-4.5-fixes] writeback: keep superblock pinned during cgroup writeback association switches
Date: Tue, 16 Feb 2016 11:34:33 -0700 [thread overview]
Message-ID: <56C36BB9.5000104@kernel.dk> (raw)
In-Reply-To: <20160216182457.GO3741@mtj.duckdns.org>
On 02/16/2016 11:24 AM, Tejun Heo wrote:
> From 586afaa034bec88934bad4eb6ab38ba07031ec5a Mon Sep 17 00:00:00 2001
> From: Tejun Heo <tj@kernel.org>
> Date: Tue, 16 Feb 2016 13:14:35 -0500
>
> If cgroup writeback is in use, an inode is associated with a cgroup
> for writeback. If the inode's main dirtier changes to another cgroup,
> the association gets updated asynchronously. Nothing was pinning the
> superblock while such switches are in progress and superblock could go
> away while async switching is pending or in progress leading to
> crashes like the following.
>
> kernel BUG at fs/jbd2/transaction.c:319!
> invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC
> CPU: 1 PID: 29158 Comm: kworker/1:10 Not tainted 4.5.0-rc3 #51
> Hardware name: Google Google, BIOS Google 01/01/2011
> Workqueue: events inode_switch_wbs_work_fn
> task: ffff880213dbbd40 ti: ffff880209264000 task.ti: ffff880209264000
> RIP: 0010:[<ffffffff803e6922>] [<ffffffff803e6922>] start_this_handle+0x382/0x3e0
> RSP: 0018:ffff880209267c30 EFLAGS: 00010202
> ...
> Call Trace:
> [<ffffffff803e6be4>] jbd2__journal_start+0xf4/0x190
> [<ffffffff803cfc7e>] __ext4_journal_start_sb+0x4e/0x70
> [<ffffffff803b31ec>] ext4_evict_inode+0x12c/0x3d0
> [<ffffffff8035338b>] evict+0xbb/0x190
> [<ffffffff80354190>] iput+0x130/0x190
> [<ffffffff80360223>] inode_switch_wbs_work_fn+0x343/0x4c0
> [<ffffffff80279819>] process_one_work+0x129/0x300
> [<ffffffff80279b16>] worker_thread+0x126/0x480
> [<ffffffff8027ed14>] kthread+0xc4/0xe0
> [<ffffffff809771df>] ret_from_fork+0x3f/0x70
>
> Fix it by bumping s_active while cgroup association switching is in
> flight.
Added for 4.5.
--
Jens Axboe
next prev parent reply other threads:[~2016-02-16 18:34 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-12 19:32 [BUG] cgroup writeback crash Tahsin Erdogan
[not found] ` <CAAeU0aNCq7LGODvVGRU-oU_o-6enii5ey0p1c26D1ZzYwkDc5A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-15 21:00 ` Tejun Heo
[not found] ` <20160215210047.GN3965-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
2016-02-16 7:56 ` Tahsin Erdogan
[not found] ` <CAAeU0aNAd1Ra6LXmWwq8row4MD_BpVHiSXOwHx07m86UWREvHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-16 18:24 ` [PATCH block/for-4.5-fixes] writeback: keep superblock pinned during cgroup writeback association switches Tejun Heo
2016-02-16 18:24 ` Tejun Heo
[not found] ` <20160216182457.GO3741-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2016-02-16 18:34 ` Jens Axboe [this message]
2016-02-16 18:34 ` Jens Axboe
2016-02-17 20:57 ` Jan Kara
2016-02-17 20:57 ` Jan Kara
[not found] ` <20160217205721.GE14140-+0h/O2h83AeN3ZZ/Hiejyg@public.gmane.org>
2016-02-17 21:07 ` Tejun Heo
2016-02-17 21:07 ` Tejun Heo
2016-02-17 22:30 ` Jan Kara
2016-02-17 22:41 ` Tahsin Erdogan
[not found] ` <CAAeU0aOvSwPbLPU0=20D1RExNj8VsbB38hUnyso2L8xNSQC0XA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-17 23:02 ` Tejun Heo
2016-02-17 23:02 ` Tejun Heo
2016-02-18 9:55 ` Jan Kara
[not found] ` <20160218095538.GA4338-+0h/O2h83AeN3ZZ/Hiejyg@public.gmane.org>
2016-02-18 13:00 ` Tejun Heo
2016-02-18 13:00 ` Tejun Heo
2016-02-18 13:20 ` Jan Kara
2016-02-19 20:18 ` Al Viro
2016-02-19 20:51 ` Tejun Heo
[not found] ` <20160219205147.GN13177-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2016-02-19 21:58 ` Al Viro
2016-02-19 21:58 ` Al Viro
[not found] ` <20160219215811.GA17997-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2016-02-19 22:15 ` Tejun Heo
2016-02-19 22:15 ` Tejun Heo
2016-02-19 22:26 ` Al Viro
[not found] ` <20160219222609.GC17997-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2016-02-28 21:53 ` Tejun Heo
2016-02-28 21:53 ` Tejun Heo
[not found] ` <20160217230231.GC6479-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2016-02-29 20:47 ` [PATCH block/for-linus] writeback: flush inode cgroup wb switches instead of pinning super_block Tejun Heo
2016-02-29 20:47 ` Tejun Heo
[not found] ` <20160229204724.GV3965-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
2016-02-29 20:54 ` Al Viro
2016-02-29 20:54 ` Al Viro
[not found] ` <20160229205428.GB17997-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2016-02-29 20:58 ` Tejun Heo
2016-02-29 20:58 ` Tejun Heo
[not found] ` <20160229205837.GX3965-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
2016-02-29 21:06 ` Al Viro
2016-02-29 21:06 ` Al Viro
[not found] ` <20160229210614.GC17997-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2016-02-29 21:08 ` Tejun Heo
2016-02-29 21:08 ` Tejun Heo
[not found] ` <20160229210800.GY3965-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
2016-02-29 21:21 ` Jan Kara
2016-02-29 21:21 ` Jan Kara
2016-02-29 23:28 ` [PATCH v2 " Tejun Heo
2016-02-29 23:28 ` Tejun Heo
2016-03-01 9:20 ` Jan Kara
2016-03-01 17:46 ` Jens Axboe
[not found] ` <56D5D592.2020800-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
2016-03-01 17:50 ` Tejun Heo
2016-03-01 17:50 ` Tejun Heo
[not found] ` <CAOS58YO5vTBnM561np7gpXKGQELrT169bYqmcfvAvsquBJK5yw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-02 10:29 ` Jan Kara
2016-03-02 10:29 ` Jan Kara
2016-03-01 13:39 ` [PATCH " Tahsin Erdogan
2016-02-18 10:12 ` [PATCH block/for-4.5-fixes] writeback: keep superblock pinned during cgroup writeback association switches Nikolay Borisov
2016-02-18 10:12 ` Nikolay Borisov
2016-02-18 12:57 ` Tejun Heo
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=56C36BB9.5000104@kernel.dk \
--to=axboe-tswwg44o7x1aa/9udqfwiw@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jack-IBi9RG/b67k@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nauman-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=tahsin-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tytso-3s7WtUTddSA@public.gmane.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.