public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Cebtenzzre <cebtenzzre@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: while (1) in btrfs_relocate_block_group didn't end
Date: Sat, 14 Sep 2019 17:36:58 -0400	[thread overview]
Message-ID: <ef805fda2976d3b89b80204f8d119a9342176bae.camel@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1467 bytes --]

Hi,

I started a balance of one block group, and I saw this in dmesg:

BTRFS info (device sdi1): balance: start -dvrange=2236714319872..2236714319873
BTRFS info (device sdi1): relocating block group 2236714319872 flags data|raid0
BTRFS info (device sdi1): found 1 extents
BTRFS info (device sdi1): found 1 extents
BTRFS info (device sdi1): found 1 extents
BTRFS info (device sdi1): found 1 extents
BTRFS info (device sdi1): found 1 extents

It continued like that for a total of 754 lines until I rebooted. Before
that, I captured some debug info. I ran this in my shell for a few
seconds, where PID is the pid of the process that called the balance
ioctl:

integer i=0; while true; do sudo cat /proc/PID/stack >stack$i; sleep .01010101; i+=1; done

Which effectively gave me stack samples at (close to) 99Hz. Maybe not
ideal, but I was in a hurry and I didn't want my disks to sustain such
heavy, repetitive I/O for too long.

I've attached the stack samples as stacks.tar.gz. A few of them are
empty. To me, it looks like the kernel never left the while (1) loop in
btrfs_relocate_block_group. The kernel messages seem to confirm this.

I am using Arch Linux with kernel version 5.2.14-arch2, and I specified
"slub_debug=P,kmalloc-2k" in the kernel cmdline to detect and protect
against a use-after-free that I found when I had KASAN enabled. Would
that kernel parameter result in a silent retry if it hit the use-after-
free?
-- 
Cebtenzzre <cebtenzzre@gmail.com>

[-- Attachment #2: stacks.tar.gz --]
[-- Type: application/x-compressed-tar, Size: 9068 bytes --]

             reply	other threads:[~2019-09-14 21:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-14 21:36 Cebtenzzre [this message]
2019-09-16 21:20 ` while (1) in btrfs_relocate_block_group didn't end Cebtenzzre
2019-09-28 18:36   ` Cebtenzzre
2019-09-28 23:37     ` Qu Wenruo
2019-10-04 13:51       ` Cebtenzzre

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=ef805fda2976d3b89b80204f8d119a9342176bae.camel@gmail.com \
    --to=cebtenzzre@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
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