linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [Bug 204043] F2fs kernel BUG at fs/f2fs/data.c:317!
Date: Mon, 08 Jul 2019 06:57:03 +0000	[thread overview]
Message-ID: <bug-204043-202145-jaIyFepdu0@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-204043-202145@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=204043

--- Comment #2 from midwinter1993@gmail.com ---
(In reply to Chao Yu from comment #1)
> Could you help to add below diff to check debug info?
> 
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index bc5cea27b512..333285cb14c5 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -241,7 +241,7 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi,
>  				struct bio *bio, enum page_type type)
>  {
>  	if (!is_read_io(bio_op(bio))) {
> -		unsigned int start;
> +		unsigned int start, ofs;
>  
>  		if (type != DATA && type != NODE)
>  			goto submit_io;
> @@ -256,7 +256,7 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi,
>  			goto submit_io;
>  
>  		/* fill dummy pages */
> -		for (; start < F2FS_IO_SIZE(sbi); start++) {
> +		for (ofs = start; ofs < F2FS_IO_SIZE(sbi); ofs++) {
>  			struct page *page =
>  				mempool_alloc(sbi->write_io_dummy,
>  					      GFP_NOIO | __GFP_NOFAIL);
> @@ -266,8 +266,16 @@ static inline void __submit_bio(struct f2fs_sb_info
> *sbi,
>  			SetPagePrivate(page);
>  			set_page_private(page, (unsigned long)DUMMY_WRITTEN_PAGE);
>  			lock_page(page);
> -			if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE)
> -				f2fs_bug_on(sbi, 1);
> +			if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE) {
> +				printk("ofs:%u, start:%u, io_size:%u, "
> +					"size:%u, vcnt:%u, max_vecs:%u",
> +					ofs, start, F2FS_IO_SIZE(sbi),
> +					bio->bi_iter.bi_size,
> +					bio->bi_vcnt,
> +					bio->bi_max_vecs);
> +				WARN_ON(1);
> +				break;
> +			}
>  		}
>  		/*
>  		 * In the NODE case, we lose next block address chain. So, we

Hi!

I patched the kernel, and after I run the test case about 7 times, a warning
occurred:

[   78.460040] F2FS-fs (loop0): Test dummy encryption mount option ignored
[   78.464621] F2FS-fs (loop0): Found nat_bits in checkpoint
[   78.479864] F2FS-fs (loop0): Mounted with checkpoint version = aaca8fb
[   78.482474] F2FS-fs (loop0): Test dummy encryption mount option ignored
[   78.483451] F2FS-fs (loop0): switch extent_cache option is not allowed
[   78.691092] ofs:1, start:1, io_size:8, size:1085440, vcnt:256, max_vecs:256
[   78.691161] WARNING: CPU: 1 PID: 1072 at fs/f2fs/data.c:323
__submit_merged_bio.cold+0x74/0x7c
[   78.693234] Modules linked in:
[   78.693579] CPU: 1 PID: 1072 Comm: kworker/u4:3 Not tainted 5.1.3 #8
[   78.694330] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
Ubuntu-1.8.2-1ubuntu1 04/01/2014
[   78.695523] Workqueue: writeback wb_workfn (flush-7:0)
[   78.696109] RIP: 0010:__submit_merged_bio.cold+0x74/0x7c
[   78.696762] Code: 00 00 00 45 89 e1 41 89 e8 41 8b 8d bc 04 00 00 41 57 48
c7 c7 80 6f dd 8c 8b 54 24 3c 8b 74 24 10 d3 e0 89 c1 e8 50 01 68 ff <0f> 0b 58
e9 15 c3 fe ff e8 9a 4f 73 ff 49 8d 7c 24 5a e8 60 89 89
[   78.699018] RSP: 0018:ffff888117fa7140 EFLAGS: 00010282
[   78.699620] RAX: 000000000000003f RBX: ffff88810828bb40 RCX:
0000000000000000
[   78.700530] RDX: 0000000000000000 RSI: 0000000000000278 RDI:
ffffed1022ff4e1a
[   78.701337] RBP: 0000000000109000 R08: 000000000000003f R09:
fffffbfff1c7766c
[   78.702027] R10: fffffbfff1c7766b R11: ffffffff8e3bb35e R12:
0000000000000100
[   78.702874] R13: ffff888107a1a200 R14: ffff888108101500 R15:
0000000000000100
[   78.703735] FS:  0000000000000000(0000) GS:ffff88811b500000(0000)
knlGS:0000000000000000
[   78.704722] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   78.705383] CR2: 00005615108e12d8 CR3: 0000000107c58000 CR4:
00000000000006e0
[   78.706229] Call Trace:
[   78.706498]  f2fs_submit_page_write+0x3cd/0xdd0
[   78.707014]  do_write_page+0x15d/0x360
[   78.707453]  f2fs_outplace_write_data+0xd7/0x210
[   78.707985]  ? f2fs_do_write_node_page+0x190/0x190
[   78.708549]  ? __enqueue_entity+0xae/0xe0
[   78.709047]  f2fs_do_write_data_page+0x43b/0xf30
[   78.709590]  ? f2fs_should_update_outplace+0x1c0/0x1c0
[   78.710177]  ? __switch_to_asm+0x34/0x70
[   78.710602]  ? __switch_to_asm+0x40/0x70
[   78.711067]  ? __switch_to_asm+0x34/0x70
[   78.711534]  ? finish_task_switch+0x145/0x370
[   78.712048]  ? __switch_to_asm+0x34/0x70
[   78.712497]  ? __switch_to_asm+0x40/0x70
[   78.712959]  __write_data_page+0xcf6/0x1140
[   78.713461]  ? page_mapped+0xf8/0x1f0
[   78.713870]  ? f2fs_do_write_data_page+0xf30/0xf30
[   78.714462]  ? page_referenced+0x3d0/0x3d0
[   78.714909]  ? _raw_write_unlock_irqrestore+0x20/0x20
[   78.715533]  f2fs_write_cache_pages+0x3ba/0xb40
[   78.716032]  ? __write_data_page+0x1140/0x1140
[   78.716492]  ? f2fs_fsync_node_pages+0xf90/0xf90
[   78.717021]  ? xas_start+0xbf/0x1c0
[   78.717451]  ? __mutex_lock_slowpath+0x10/0x10
[   78.717995]  f2fs_write_data_pages+0x3dd/0x8b0
[   78.718506]  ? f2fs_write_cache_pages+0xb40/0xb40
[   78.719052]  ? f2fs_set_node_page_dirty+0x175/0x3a0
[   78.719618]  ? f2fs_inode_synced+0x1c7/0x200
[   78.720069]  ? memset+0x20/0x40
[   78.720447]  ? f2fs_write_cache_pages+0xb40/0xb40
[   78.721006]  do_writepages+0xbb/0x1e0
[   78.721444]  ? page_writeback_cpu_online+0x10/0x10
[   78.721964]  ? _raw_spin_lock+0x75/0xd0
[   78.722409]  ? _raw_spin_lock_irq+0xd0/0xd0
[   78.722891]  ? __wake_up_bit+0x84/0xe0
[   78.723331]  __writeback_single_inode+0xb6/0x800
[   78.723861]  ? inode_add_lru+0xd9/0x110
[   78.724273]  writeback_sb_inodes+0x441/0x910
[   78.724756]  ? sync_inode_metadata+0x100/0x100
[   78.725263]  ? queue_io+0x16b/0x220
[   78.725674]  wb_writeback+0x261/0x650
[   78.726129]  ? __switch_to_asm+0x34/0x70
[   78.726641]  ? __writeback_inodes_wb+0x170/0x170
[   78.727361]  ? cwt_wakefn+0x60/0x60
[   78.728104]  ? _raw_spin_lock_bh+0x80/0xd0
[   78.728827]  ? _raw_read_unlock_irqrestore+0x20/0x20
[   78.729542]  ? __switch_to_asm+0x34/0x70
[   78.730121]  ? wb_workfn+0xc4/0x7a0
[   78.730643]  wb_workfn+0x1f9/0x7a0
[   78.731161]  ? inode_wait_for_writeback+0x40/0x40
[   78.731868]  ? __schedule+0x481/0xc80
[   78.732417]  ? _raw_spin_lock_irq+0x76/0xd0
[   78.733046]  ? read_word_at_a_time+0xe/0x20
[   78.733668]  ? strscpy+0xb2/0x180
[   78.734168]  process_one_work+0x503/0x970
[   78.734770]  worker_thread+0x7d/0x820
[   78.735322]  kthread+0x1ad/0x210
[   78.735821]  ? process_one_work+0x970/0x970
[   78.736443]  ? kthread_park+0x130/0x130
[   78.737020]  ret_from_fork+0x35/0x40
[   78.737555] ---[ end trace 5a4cea2bd5b6d207 ]---

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  parent reply	other threads:[~2019-07-08  6:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01  8:44 [f2fs-dev] [Bug 204043] New: F2fs kernel BUG at fs/f2fs/data.c:317! bugzilla-daemon
2019-07-05  3:55 ` [f2fs-dev] [Bug 204043] " bugzilla-daemon
2019-07-08  6:57 ` bugzilla-daemon [this message]
2019-07-11 10:41 ` bugzilla-daemon
2019-07-16  9:06 ` bugzilla-daemon
2019-07-17  1:36 ` bugzilla-daemon
2019-07-17  2:01 ` bugzilla-daemon
2019-07-22  3:10 ` bugzilla-daemon
2019-07-22  3:46 ` bugzilla-daemon
2019-07-22  6:18 ` bugzilla-daemon
2019-07-30  2:11 ` bugzilla-daemon
2019-07-30  2:34 ` bugzilla-daemon

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=bug-204043-202145-jaIyFepdu0@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /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).