linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: linux-xfs@vger.kernel.org
Subject: [BUG] dd doesn't return on ENOSPC and hang when fulfilling rmapbt XFS
Date: Fri, 18 Nov 2016 00:35:15 +0800	[thread overview]
Message-ID: <20161117163515.GB27776@eguan.usersys.redhat.com> (raw)

Hi all,

I hit a test hang in generic/224 when testing rmapbt enabled XFS on a
host that has non-zero sunit/swidth reported from underlying device. And
I simplified the reproducer to the following script, and the hang can be
reproduced on any host now.

-----
#!/bin/bash

dev=/dev/sda5
mnt=/mnt/xfs

mkfs -t xfs -m rmapbt=1 -d agcount=8,size=1g -f $dev
mount $dev $mnt
xfs_io -x -c "resblks 4" $mnt

dd if=/dev/zero of=/mnt/xfs/testfile

echo "dd should return and report ENOSPC"
-----

sysrq-w output:
sysrq: SysRq : Show Blocked State
  task                        PC stack   pid father
dd              D    0  2504   2491 0x00000080
 ffff88021077dd00 0000000000000000 ffff88021623be40 ffff88021fd99300
 ffff8802107467c0 ffffc900019dbc18 ffffffff816e2cf5 ffff88020fa8ce90
 ffffc900019dbc40 0000000000000286 ffff8802107467c0 ffff88020fa8ce90
Call Trace:
 [<ffffffff816e2cf5>] ? __schedule+0x195/0x630
 [<ffffffff816e31c6>] schedule+0x36/0x80
 [<ffffffff812534b4>] wb_wait_for_completion+0x64/0x90
 [<ffffffff810d2910>] ? prepare_to_wait_event+0xf0/0xf0
 [<ffffffff81255b3d>] sync_inodes_sb+0xad/0x290
 [<ffffffff81288bc0>] ? iomap_write_end+0x80/0x80
 [<ffffffff8128922c>] ? iomap_apply+0x6c/0x130
 [<ffffffffa014c2a8>] xfs_flush_inodes+0x28/0x40 [xfs]
 [<ffffffffa013370b>] xfs_file_buffered_aio_write+0x18b/0x280 [xfs]
 [<ffffffffa0133890>] xfs_file_write_iter+0x90/0x130 [xfs]
 [<ffffffff81226b52>] __vfs_write+0xe2/0x140
 [<ffffffff812279d2>] vfs_write+0xb2/0x1b0
 [<ffffffff81003510>] ? syscall_trace_enter+0x1d0/0x2b0
 [<ffffffff81228e25>] SyS_write+0x55/0xc0
 [<ffffffff81003a47>] do_syscall_64+0x67/0x180
 [<ffffffff816e796b>] entry_SYSCALL64_slow_path+0x25/0x25

I tested on 4.9-rc5 kernel, for-next branch from linux-xfs tree and
latest djwong-devel branch from Darrick's tree.

If you need more information please let me know.

Thanks,
Eryu

             reply	other threads:[~2016-11-17 17:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-17 16:35 Eryu Guan [this message]
2016-11-17 17:36 ` [BUG] dd doesn't return on ENOSPC and hang when fulfilling rmapbt XFS Darrick J. Wong
2016-11-17 20:11   ` Darrick J. Wong
2016-11-17 21:32     ` Dave Chinner
2016-11-17 23:55       ` [PATCH 0/4] xfs: fix rmapbt ENOSPC hangs Dave Chinner
2016-11-17 23:55         ` [PATCH 1/4] xfs: factor rmap btree size into the indlen calculations Dave Chinner
2016-11-17 23:55         ` [PATCH 2/4] xfs: add more AGF/AGFL manipulation tracepoints Dave Chinner
2016-11-17 23:55         ` [PATCH 3/4] xfs: hold AGF buffers over defer ops Dave Chinner
2016-11-18  0:53           ` Dave Chinner
2016-11-17 23:55         ` [PATCH 4/4] xfs: defer indirect delalloc rmap reservations Dave Chinner
2016-11-18  5:26     ` [BUG] dd doesn't return on ENOSPC and hang when fulfilling rmapbt XFS Eryu Guan
2016-11-18  5:46       ` Dave Chinner
2016-11-18  6:52         ` Eryu Guan

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=20161117163515.GB27776@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=linux-xfs@vger.kernel.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).