Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1796279ybe; Tue, 3 Sep 2019 03:42:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWtn3/sWwcNOpFw1wRU/iIGfkzknLZAbzTy3Krn2TfHNnWLGL10hqp5oU2myZZrDegS0WY X-Received: by 2002:a63:b346:: with SMTP id x6mr30010263pgt.218.1567507339176; Tue, 03 Sep 2019 03:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567507339; cv=none; d=google.com; s=arc-20160816; b=uu9Se9B52X899aZdR1+Dm8cQy8oLepZ58UzNgdBHwu5Z/+JIc6A/KkilxBYAOF/dpP 7Onx/7eDmQT2CU2kSKfe8AqMhcxk4BD3iVNr7O9Q9yO1HXXuGEJoZhT9qSynQs9WG4FI 5wxbgggO50ooGNRfykaVCxUBzPiqXQLrSet1syz6FiHtMfrW90xv+uqwgTKJeWZw1G+p yPCmSF0crRfOXUOqakzSJGZgrub2nSagC6zmm8ycgxxcPreMG+uMLmxW8D/8udZVAdtd QfqxcIrBwIgT2yWiol2Qp4+pV5en8VD6LLn0xVzjA2exclcFyjH9ZlllD/Nr/h2iMOb1 jfWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=fColVH4idiCxkWzLI+iHj6jviaAJA6HGUNQlGWdd9JU=; b=VIPWSyIfe4ru3MaXj5JvCPHqOwMAEtON7yy4SYz3CoaiTu3zXG8OK+GJnW00D2DPN/ vB7zsGqBcE9HLZsPDG7iOdV30E25+skGAf5IYcEthd1vuCvR7D8hTMuAH/xa7BM6AB6n CLeR8vYGLhUBRUyF2EzgZwzAVV1CCI/mKUmgStYxTSg4WJ0cUQt03qtpU3+dhjpDbj/0 K8j1x2jnVBOwmVvMYUIJso6o+2Fo048YyP5BnIJs1jE+LQAAy3UkhZLGDUDhkY8O49Jd RcVl50qqZ5FPVRBoREcdkIV+7g346Sv5e0ok5SXGNO3rQ1wX7sWebxMOsyhk+/Oi+9FH 1J8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18si7331505pfn.277.2019.09.03.03.42.03; Tue, 03 Sep 2019 03:42:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728576AbfICKkC (ORCPT + 99 others); Tue, 3 Sep 2019 06:40:02 -0400 Received: from mx2.suse.de ([195.135.220.15]:49884 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726840AbfICKkC (ORCPT ); Tue, 3 Sep 2019 06:40:02 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A71E6AD46; Tue, 3 Sep 2019 10:40:00 +0000 (UTC) Subject: Re: [mainline][BUG][PPC][btrfs][bisected 00801a] kernel BUG at fs/btrfs/locking.c:71! To: Abdul Haleem , linuxppc-dev Cc: mpe , Brian King , chandan , sachinp , David Sterba , josef@toxicpanda.com, linux-btrfs@vger.kernel.org, linux-kernel References: <1567500907.5082.12.camel@abdul> From: Nikolay Borisov Openpgp: preference=signencrypt Autocrypt: addr=nborisov@suse.com; prefer-encrypt=mutual; keydata= mQINBFiKBz4BEADNHZmqwhuN6E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fqoRRN20jx+OOvuaBMPAPb+aKJyle8zABEBAAGJAh8EGAECAAkF AliKBz4CGwwACgkQcb6CRuU/KFdacg/+M3V3Ti9JYZEiIyVhqs+yHb6NMI1R0kkAmzsGQ1jU zSQUz9AVMR6T7v2fIETTT/f5Oout0+Hi9cY8uLpk8CWno9V9eR/B7Ifs2pAA8lh2nW43FFwp IDiSuDbH6oTLmiGCB206IvSuaQCp1fed8U6yuqGFcnf0ZpJm/sILG2ECdFK9RYnMIaeqlNQm iZicBY2lmlYFBEaMXHoy+K7nbOuizPWdUKoKHq+tmZ3iA+qL5s6Qlm4trH28/fPpFuOmgP8P K+7LpYLNSl1oQUr+WlqilPAuLcCo5Vdl7M7VFLMq4xxY/dY99aZx0ZJQYFx0w/6UkbDdFLzN upT7NIN68lZRucImffiWyN7CjH23X3Tni8bS9ubo7OON68NbPz1YIaYaHmnVQCjDyDXkQoKC R82Vf9mf5slj0Vlpf+/Wpsv/TH8X32ajva37oEQTkWNMsDxyw3aPSps6MaMafcN7k60y2Wk/ TCiLsRHFfMHFY6/lq/c0ZdOsGjgpIK0G0z6et9YU6MaPuKwNY4kBdjPNBwHreucrQVUdqRRm RcxmGC6ohvpqVGfhT48ZPZKZEWM+tZky0mO7bhZYxMXyVjBn4EoNTsXy1et9Y1dU3HVJ8fod 5UqrNrzIQFbdeM0/JqSLrtlTcXKJ7cYFa9ZM2AP7UIN9n1UWxq+OPY9YMOewVfYtL8M= Message-ID: <7139ac07-db63-b984-c416-d1c94337c9bf@suse.com> Date: Tue, 3 Sep 2019 13:39:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <1567500907.5082.12.camel@abdul> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3.09.19 г. 11:55 ч., Abdul Haleem wrote: > Greeting's > > Mainline kernel panics with LTP/fs_fill-dir tests for btrfs file system on my P9 box running mainline kernel 5.3.0-rc5 > > BUG_ON was first introduced by below commit > > commit 00801ae4bb2be5f5af46502ef239ac5f4b536094 > Author: David Sterba > Date: Thu May 2 16:53:47 2019 +0200 > > btrfs: switch extent_buffer write_locks from atomic to int > > The write_locks is either 0 or 1 and always updated under the lock, > so we don't need the atomic_t semantics. > > Reviewed-by: Nikolay Borisov > Signed-off-by: David Sterba > > diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c > index 2706676279..98fccce420 100644 > --- a/fs/btrfs/locking.c > +++ b/fs/btrfs/locking.c > @@ -58,17 +58,17 @@ static void btrfs_assert_tree_read_locked(struct > extent_buffer *eb) > > static void btrfs_assert_tree_write_locks_get(struct extent_buffer *eb) > { > - atomic_inc(&eb->write_locks); > + eb->write_locks++; > } > > static void btrfs_assert_tree_write_locks_put(struct extent_buffer *eb) > { > - atomic_dec(&eb->write_locks); > + eb->write_locks--; > } > > void btrfs_assert_tree_locked(struct extent_buffer *eb) > { > - BUG_ON(!atomic_read(&eb->write_locks)); > + BUG_ON(!eb->write_locks); > } > > > tests logs: > avocado-misc-tests/io/disk/ltp_fs.py:LtpFs.test_fs_run;fs_fill-dir-ext3-61cd: [ 3376.022096] EXT4-fs (nvme0n1): mounting ext3 file system using the ext4 subsystem > EXT4-fs (nvme0n1): mounted filesystem with ordered data mode. Opts: (null) > EXT4-fs (loop1): mounting ext2 file system using the ext4 subsystem > EXT4-fs (loop1): mounted filesystem without journal. Opts: (null) > EXT4-fs (loop1): mounting ext3 file system using the ext4 subsystem > EXT4-fs (loop1): mounted filesystem with ordered data mode. Opts: (null) > EXT4-fs (loop1): mounted filesystem with ordered data mode. Opts: (null) > XFS (loop1): Mounting V5 Filesystem > XFS (loop1): Ending clean mount > XFS (loop1): Unmounting Filesystem > BTRFS: device fsid 7c08f81b-6642-4a06-9182-2884e80d56ee devid 1 transid 5 /dev/loop1 > BTRFS info (device loop1): disk space caching is enabled > BTRFS info (device loop1): has skinny extents > BTRFS info (device loop1): enabling ssd optimizations > BTRFS info (device loop1): creating UUID tree > ------------[ cut here ]------------ > kernel BUG at fs/btrfs/locking.c:71! > Oops: Exception in kernel mode, sig: 5 [#1] > LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries > Dumping ftrace buffer: > (ftrace buffer empty) > Modules linked in: fuse(E) vfat(E) fat(E) btrfs(E) xor(E) > zstd_decompress(E) zstd_compress(E) raid6_pq(E) xfs(E) raid0(E) > linear(E) dm_round_robin(E) dm_queue_length(E) dm_service_time(E) > dm_multipath(E) loop(E) rpadlpar_io(E) rpaphp(E) lpfc(E) bnx2x(E) > xt_CHECKSUM(E) xt_MASQUERADE(E) tun(E) bridge(E) stp(E) llc(E) kvm_pr(E) > kvm(E) tcp_diag(E) udp_diag(E) inet_diag(E) unix_diag(E) > af_packet_diag(E) netlink_diag(E) ip6t_rpfilter(E) ipt_REJECT(E) > nf_reject_ipv4(E) ip6t_REJECT(E) nf_reject_ipv6(E) xt_conntrack(E) > ip_set(E) nfnetlink(E) ebtable_nat(E) ebtable_broute(E) ip6table_nat(E) > ip6table_mangle(E) ip6table_security(E) ip6table_raw(E) iptable_nat(E) > nf_nat(E) nf_conntrack(E) nf_defrag_ipv6(E) nf_defrag_ipv4(E) > iptable_mangle(E) iptable_security(E) iptable_raw(E) ebtable_filter(E) > ebtables(E) ip6table_filter(E) ip6_tables(E) iptable_filter(E) sunrpc(E) > raid10(E) xts(E) pseries_rng(E) vmx_crypto(E) sg(E) uio_pdrv_genirq(E) > uio(E) binfmt_misc(E) sch_fq_codel(E) ip_tables(E) > ext4(E) mbcache(E) jbd2(E) sr_mod(E) cdrom(E) sd_mod(E) ibmvscsi(E) > scsi_transport_srp(E) ibmveth(E) nvmet_fc(E) nvmet(E) nvme_fc(E) > nvme_fabrics(E) scsi_transport_fc(E) mdio(E) libcrc32c(E) ptp(E) > pps_core(E) nvme(E) nvme_core(E) dm_mirror(E) dm_region_hash(E) > dm_log(E) dm_mod(E) [last unloaded: lpfc] > CPU: 14 PID: 1803 Comm: kworker/u32:8 Tainted: G E 5.3.0-rc5-autotest-autotest #1 > Workqueue: btrfs-endio-write btrfs_endio_write_helper [btrfs] > NIP: c00800000164dd70 LR: c00800000164df00 CTR: c000000000a817a0 > REGS: c00000000260b5d0 TRAP: 0700 Tainted: G E (5.3.0-rc5-autotest-autotest) > MSR: 8000000102029033 CR: 22444082 XER: 00000000 > CFAR: c00800000164defc IRQMASK: 0 > GPR00: c0080000015c55f4 c00000000260b860 c008000001703b00 c000000267a29af0 > GPR04: 0000000000000000 0000000000000001 0000000000000000 0000000000000000 > GPR08: 0000000000000000 0000000000000001 0000000000000000 0000000000000004 > GPR12: 0000000000004000 c00000001ec58e00 0000000000000000 0000000000000000 > GPR16: 0000000000010000 0000000000000004 0000000000000001 0000000000000001 > GPR20: 0000000000000000 0000000000000001 000000003e0f83e1 c00000025a7cbef0 > GPR24: c00000000260ba26 0000000040000000 c0000000014a26e8 0000000000000003 > GPR28: 0000000000000004 c00000025f2010a0 c000000267a29af0 0000000000000000 > NIP [c00800000164dd70] btrfs_assert_tree_locked+0x10/0x20 [btrfs] > LR [c00800000164df00] btrfs_set_lock_blocking_write+0x60/0x100 [btrfs] > Call Trace: > [c00000000260b860] [c00000000260b8e0] 0xc00000000260b8e0 (unreliable) > [c00000000260b890] [c0080000015c55f4] btrfs_set_path_blocking+0xb4/0xc0 [btrfs] > [c00000000260b8e0] [c0080000015cb808] btrfs_search_slot+0x8e8/0xb80 [btrfs] Can you provide the line numbers btrfs_search_slot+0x8e8/0xb80 corresponds to?