Linux-BTRFS Archive on lore.kernel.org
 help / color / Atom feed
From: James Harvey <jamespharvey20@gmail.com>
To: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: 5.3.0 deadlock: btrfs_sync_file / btrfs_async_reclaim_metadata_space / btrfs_page_mkwrite
Date: Sat, 12 Oct 2019 19:29:05 -0400
Message-ID: <CA+X5Wn72nYqoMLLHAUZeO43_rLL9c=zwjDYG9MKV+rcZ7x6SXw@mail.gmail.com> (raw)

Was using a temporary BTRFS volume to compile mongodb, which is quite
intensive and takes quite a bit of time.  The volume has been
deadlocked for about 12 hours.

Being a temporary volume, I just used mount without options, so it
used the defaults:  rw,relatime,ssd,space_cache,subvolid=5,subvol=/

Apologies if upgrading to 5.3.5+ will fix this.  I didn't see
discussions of a deadlock looking like this.



See the full sysrq-trigger output here: http://ix.io/1Ysp



But, for searchability, here is some of it:

systemd-journal D    0   813      1 0x00004320
Call Trace:
 ? __schedule+0x27f/0x6d0
 schedule+0x43/0xd0
 schedule_timeout+0x299/0x3d0
 io_schedule_timeout+0x19/0x40
 wait_for_common_io.constprop.0+0xcf/0x150
 ? wake_up_q+0x60/0x60
 write_all_supers+0x87f/0x940 [btrfs]
 btrfs_sync_log+0x71b/0x9f0 [btrfs]
 ? dput+0xc9/0x2d0
 btrfs_sync_file+0x364/0x460 [btrfs]
 do_fsync+0x38/0x70
 __x64_sys_fsync+0x10/0x20
 do_syscall_64+0x5f/0x1c0
 entry_SYSCALL_64_after_hwframe+0x44/0xa9


Call Trace:
 ? __schedule+0x27f/0x6d0
 schedule+0x43/0xd0
 schedule_timeout+0x1cf/0x3d0
 ? collect_expired_timers+0xb0/0xb0
 flush_space+0x55c/0x710 [btrfs]
 btrfs_async_reclaim_metadata_space+0xc4/0x4a0 [btrfs]
 ? __schedule+0x287/0x6d0
 process_one_work+0x1d1/0x3a0
 worker_thread+0x4a/0x3d0
 kthread+0xfb/0x130
 ? process_one_work+0x3a0/0x3a0
 ? kthread_park+0x80/0x80
 ret_from_fork+0x35/0x40


Then 28 of these:

Call Trace:
 ? __schedule+0x27f/0x6d0
 schedule+0x43/0xd0
 wait_reserve_ticket+0x95/0x150 [btrfs]
 ? wait_woken+0x70/0x70
 btrfs_reserve_metadata_bytes+0x782/0x920 [btrfs]
 btrfs_block_rsv_add+0x1f/0x50 [btrfs]
 start_transaction+0x2c2/0x490 [btrfs]
 btrfs_dirty_inode+0x9d/0xd0 [btrfs]
 file_update_time+0xfd/0x150
 btrfs_page_mkwrite+0xfe/0x4e0 [btrfs]
 ? lock_page_memcg+0x11/0x90
 do_page_mkwrite+0x31/0x90
 do_wp_page+0x2c6/0x660
 __handle_mm_fault+0xc24/0x15d0
 ? call_function_single_interrupt+0xa/0x20
 handle_mm_fault+0xce/0x1f0
 __do_page_fault+0x216/0x4f0
 do_page_fault+0x31/0x130
 page_fault+0x3e/0x50

             reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-12 23:29 James Harvey [this message]
2019-10-12 23:32 ` James Harvey
2019-10-13  2:12   ` James Harvey
2019-10-14  1:45 ` Chris Murphy
2019-10-15  1:04   ` James Harvey
2019-10-15  1:27     ` Chris Murphy

Reply instructions:

You may reply publically 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='CA+X5Wn72nYqoMLLHAUZeO43_rLL9c=zwjDYG9MKV+rcZ7x6SXw@mail.gmail.com' \
    --to=jamespharvey20@gmail.com \
    --cc=linux-btrfs@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

Linux-BTRFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-btrfs/0 linux-btrfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-btrfs linux-btrfs/ https://lore.kernel.org/linux-btrfs \
		linux-btrfs@vger.kernel.org linux-btrfs@archiver.kernel.org
	public-inbox-index linux-btrfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-btrfs


AGPL code for this site: git clone https://public-inbox.org/ public-inbox