From: Marcin Subject: Re: [bcachefs][tier] INFO: task bch_tier_read:21414 blocked for more than 120 seconds. Date: Wed, 12 Oct 2016 21:10:14 +0200 Message-ID: <8312944b83a28b36f054c7a44d0fcbd8@mejor.pl> References: <20161012012600.s2cq5ac37hwwrp3e@kmo-pixel> <20161012121105.ym3sed4tgc2vx3dh@kmo-pixel> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from jowisz.mejor.pl ([81.4.120.72]:60846 "EHLO jowisz.mejor.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755855AbcJLTKj (ORCPT ); Wed, 12 Oct 2016 15:10:39 -0400 In-Reply-To: <20161012121105.ym3sed4tgc2vx3dh@kmo-pixel> Sender: linux-bcache-owner@vger.kernel.org List-Id: linux-bcache@vger.kernel.org To: Kent Overstreet Cc: linux-bcache@vger.kernel.org, linux-bcache-owner@vger.kernel.org W dniu 2016-10-12 14:11, Kent Overstreet napisał(a): > On Wed, Oct 12, 2016 at 01:07:46PM +0200, Marcin Mirosław wrote: >> W dniu 12.10.2016 o 03:26, Kent Overstreet pisze: >> Hi, >> [...] >> > You're not the only one who's seeing this, I've been chasing this bug for the >> > past several days... >> > >> >> Is something that can be done on my side to help with it? >> I can add information that tier0 device is a device with short time of >> writing requests - it's a HW controller with RAM. Second bling shot is >> that using btree-node=256k was problematic some time ago: >> http://www.spinics.net/lists/linux-bcache/msg04178.html , maybe this >> is >> somehow related to the btree-node size? > > It turns out it's not a bcache bug - FUA is buggy... > > If you want, you could confirm by changing journal_flushes_device() to > always > return true - journal.h line 85. > > Gonna try and figure out what the actual FUA bug is tomorrow... I made such change: --- a/drivers/md/bcache/journal.h +++ b/drivers/md/bcache/journal.h @@ -184,7 +184,8 @@ static inline unsigned jset_u64s(unsigned u64s) static inline bool journal_flushes_device(struct cache *ca) { - return ca->mi.tier == 0; + /** return ca->mi.tier == 0; **/ + return 0; } void bch_journal_start(struct cache_set *); (it wasn't line 85, I hope made correct change). Now I'm getting: [ 612.320025] INFO: task kworker/u8:7:77 blocked for more than 120 seconds. [ 612.320028] Tainted: G W 4.8.0+ #1 [ 612.320029] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 612.320031] kworker/u8:7 D ffff88003ca739f0 0 77 2 0x00000000 [ 612.320042] Workqueue: writeback wb_workfn (flush-bcache-1) [ 612.320046] ffff88003ca739f0 ffff88003d4c4f80 ffff88003c8e9a80 ffff88003ca739b8 [ 612.320050] ffff88003ca74000 0000000000000100 ffff88003ca73c48 ffff880036edb4d0 [ 612.320054] ffff880036ed0000 ffff88003ca73a08 ffffffff81473730 ffff88001bf85468 [ 612.320057] Call Trace: [ 612.320064] [] schedule+0x30/0x80 [ 612.320101] [] bch_writepages+0x37c/0x530 [bcache] [ 612.320106] [] ? wake_atomic_t_function+0x60/0x60 [ 612.320111] [] do_writepages+0x1c/0x30 [ 612.320114] [] __writeback_single_inode+0x40/0x320 [ 612.320117] [] writeback_sb_inodes+0x1d5/0x490 [ 612.320120] [] __writeback_inodes_wb+0x8d/0xc0 [ 612.320123] [] wb_writeback+0x22a/0x2e0 [ 612.320126] [] wb_workfn+0x2e8/0x3b0 [ 612.320129] [] process_one_work+0x15b/0x470 [ 612.320131] [] worker_thread+0x46/0x4e0 [ 612.320134] [] ? process_one_work+0x470/0x470 [ 612.320137] [] kthread+0xc4/0xe0 [ 612.320141] [] ret_from_fork+0x1f/0x40 [ 612.320143] [] ? kthread_worker_fn+0x160/0x160 [ 612.320149] INFO: task kworker/0:3:329 blocked for more than 120 seconds. [ 612.320150] Tainted: G W 4.8.0+ #1 [ 612.320151] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 612.320152] kworker/0:3 D ffff880037293cc8 0 329 2 0x00000000 [ 612.320174] Workqueue: events_freezable btree_node_write_work [bcache] [ 612.320176] ffff880037293cc8 ffffffff8180b4c0 ffff880037019a80 0000000200000000 [ 612.320180] ffff880037294000 ffff88000b3f4618 ffff880037019a80 0000000000000000 [ 612.320183] ffff88000b3f4630 ffff880037293ce0 ffffffff81473730 7fffffffffffffff [ 612.320187] Call Trace: [ 612.320190] [] schedule+0x30/0x80 [ 612.320193] [] schedule_timeout+0x24d/0x300 [ 612.320214] [] ? six_lock_type+0x60/0x340 [bcache] [ 612.320216] [] ? sched_clock_local+0x17/0x80 [ 612.320219] [] __down+0x5f/0xa0 [ 612.320222] [] down+0x3c/0x50 [ 612.320240] [] __bch_btree_node_write+0x25/0xa0 [bcache] [ 612.320258] [] bch_btree_node_write_dirty+0x36/0x50 [bcache] [ 612.320276] [] btree_node_write_work+0x12/0x20 [bcache] [ 612.320279] [] process_one_work+0x15b/0x470 [ 612.320281] [] worker_thread+0x46/0x4e0 [ 612.320283] [] ? process_one_work+0x470/0x470 [ 612.320286] [] ? process_one_work+0x470/0x470 [ 612.320288] [] kthread+0xc4/0xe0 [ 612.320292] [] ret_from_fork+0x1f/0x40 [ 612.320294] [] ? kthread_worker_fn+0x160/0x160 [ 612.320313] INFO: task bch_tier_read:2351 blocked for more than 120 seconds. [ 612.320314] Tainted: G W 4.8.0+ #1 [ 612.320315] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 612.320316] bch_tier_read D ffff8800356ff848 0 2351 2 0x00000000 [ 612.320320] ffff8800356ff848 ffff88003e144f80 ffff880036d98000 ffffffff81353740 [ 612.320324] ffff880035700000 ffff88003fc96d80 7fffffffffffffff ffff88003cb59728 [ 612.320327] ffff88003cb596f8 ffff8800356ff860 ffffffff81473730 0000000000000000 [ 612.320331] Call Trace: [ 612.320335] [] ? scsi_init_io+0x40/0x1d0 [ 612.320338] [] schedule+0x30/0x80 [ 612.320340] [] schedule_timeout+0x24d/0x300 [ 612.320342] [] ? scsi_host_alloc_command+0x3f/0xb0 [ 612.320346] [] ? ktime_get+0x37/0xa0 [ 612.320348] [] io_schedule_timeout+0x9f/0x110 [ 612.320352] [] get_request+0x40d/0x840 [ 612.320355] [] ? wake_atomic_t_function+0x60/0x60 [ 612.320358] [] blk_queue_bio+0x117/0x3c0 [ 612.320361] [] generic_make_request+0xcb/0x1a0 [ 612.320382] [] bch_submit_bbio+0x66/0xf0 [bcache] [ 612.320403] [] bch_submit_bbio_replicas+0xf8/0x190 [bcache] [ 612.320424] [] __bch_write+0x2f6/0x710 [bcache] [ 612.320445] [] bch_write+0x85/0x3b0 [bcache] [ 612.320467] [] do_pending_writes+0xa7/0x150 [bcache] [ 612.320488] [] bch_move_ctxt_wait+0x38/0xb0 [bcache] [ 612.320491] [] ? wake_atomic_t_function+0x60/0x60 [ 612.320513] [] read_tiering+0x143/0x4c0 [bcache] [ 612.320517] [] ? __schedule+0x2cd/0x720 [ 612.320536] [] ? bch_bucket_stats_read_cache+0xda/0x150 [bcache] [ 612.320558] [] bch_tiering_thread+0x247/0x250 [bcache] [ 612.320580] [] ? read_tiering+0x4c0/0x4c0 [bcache] [ 612.320582] [] kthread+0xc4/0xe0 [ 612.320603] [] ? bch_vfs_dirent_create+0x60/0x60 [bcache] [ 612.320606] [] ret_from_fork+0x1f/0x40 [ 612.320609] [] ? kthread_worker_fn+0x160/0x160 [ ...snip...]