Bug 62111 - Oops at __btrfs_map_block+0x2fa/0x1000
Summary: Oops at __btrfs_map_block+0x2fa/0x1000
Status: RESOLVED OBSOLETE
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Josef Bacik
URL: https://bugzilla.redhat.com/show_bug....
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-25 16:59 UTC by Josh Boyer
Modified: 2022-10-03 10:35 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.10.11-100.fc18.x86_64
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Josh Boyer 2013-09-25 16:59:47 UTC
Additional info:
reporter:       libreport-2.1.6
BUG: unable to handle kernel paging request at ffff87f8b18c3c40
IP: [<ffffffffa02a48ba>] __btrfs_map_block+0x2fa/0x1000 [btrfs]
PGD 0 
Oops: 0000 [#1] SMP 
Modules linked in: nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_MASQUERADE ip6table_mangle ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 iptable_nat nf_nat_ipv4 nf_nat iptable_mangle nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ebtable_filter ebtables ip6table_filter ip6_tables be2iscsi iscsi_boot_sysfs bnx2i cnic uio cxgb4i cxgb4 cxgb3i cxgb3 mdio libcxgbi ib_iser rdma_cm ib_addr iw_cm ib_cm ib_sa ib_mad ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi rfcomm bnep arc4 brcmsmac cordic brcmutil mac80211 cfg80211 btusb bluetooth rtsx_pci_ms memstick rtsx_pci_sdmmc hp_wmi sparse_keymap rfkill acpi_cpufreq mperf kvm_amd kvm snd_hda_codec_idt snd_hda_codec_hdmi snd_hda_intel snd_hda_codec snd_hwdep i2c_piix4 snd_seq snd_seq_device k10temp joydev hp_accel microcode snd_pcm snd_page_alloc snd_timer snd bcma soundcore rtsx_pci mfd_core lis3lv02d input_polldev nfsd auth_rpcgss nfs_acl lockd uinput usb_storage ata_generic btrfs zlib_deflate raid6_pq libcrc32c xor pata_acpi radeon pata_atiixp i2c_algo_bit sdhci_pci drm_kms_helper sdhci ttm mmc_core drm r8169 mii i2c_core wmi video sunrpc
CPU: 3 PID: 563 Comm: btrfs-endio-1 Not tainted 3.10.11-100.fc18.x86_64 #1
Hardware name: Hewlett-Packard HP Pavilion dv7 Notebook PC/180B, BIOS F.17 03/13/2012
task: ffff8801960be320 ti: ffff880195f3e000 task.ti: ffff880195f3e000
RIP: 0010:[<ffffffffa02a48ba>]  [<ffffffffa02a48ba>] __btrfs_map_block+0x2fa/0x1000 [btrfs]
RSP: 0018:ffff880195f3fa38  EFLAGS: 00010282
RAX: ffff880147d1b0c0 RBX: ffff880193809c00 RCX: 0000000024eb0000
RDX: ffff87f8b18c3c18 RSI: 000000000000a000 RDI: 00000000a1407c02
RBP: ffff880195f3fb18 R08: 0000000000016e80 R09: 0000000000000000
R10: ffff880198801a00 R11: 00000000000024eb R12: 00000000a1407c02
R13: 000000000000a000 R14: 0000000000000001 R15: ffff880147d1b0c0
FS:  00007fa5372f2700(0000) GS:ffff88019ed80000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: ffff87f8b18c3c40 CR3: 0000000192faf000 CR4: 00000000000007e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Stack:
 0000000000000000 0000000000001000 ffff88016ea4ba40 0000000000000000
 00000000000024eb 00000000000000f1 0000000000000000 00000000000049d8
 0000000049d80000 ffff880191d7f4e8 ffff880100000000 ffff880195f3fbc0
Call Trace:
 [<ffffffffa0259fba>] ? btrfs_free_path+0x2a/0x40 [btrfs]
 [<ffffffffa02a96a0>] btrfs_map_bio+0x70/0x470 [btrfs]
 [<ffffffffa027a568>] ? btrfs_bio_wq_end_io+0x38/0x90 [btrfs]
 [<ffffffffa02c35e6>] btrfs_submit_compressed_read+0x476/0x4c0 [btrfs]
 [<ffffffffa0284031>] btrfs_submit_bio_hook+0x1d1/0x1e0 [btrfs]
 [<ffffffffa029d64a>] end_bio_extent_readpage+0x47a/0x980 [btrfs]
 [<ffffffff81183af1>] ? kfree+0x151/0x190
 [<ffffffff811d127d>] bio_endio+0x1d/0x30
 [<ffffffffa0277df1>] end_workqueue_fn+0x41/0x50 [btrfs]
 [<ffffffffa02ad0c6>] worker_loop+0x136/0x560 [btrfs]
 [<ffffffffa02acf90>] ? btrfs_queue_worker+0x300/0x300 [btrfs]
 [<ffffffff81082ab0>] kthread+0xc0/0xd0
 [<ffffffff81010000>] ? perf_trace_xen_mmu_flush_tlb_others+0x50/0x110
 [<ffffffff810829f0>] ? kthread_create_on_node+0x120/0x120
 [<ffffffff81664cec>] ret_from_fork+0x7c/0xb0
 [<ffffffff810829f0>] ? kthread_create_on_node+0x120/0x120
Code: 00 00 45 85 f6 4c 89 f8 43 8d 3c 34 7e 39 0f 1f 00 49 63 d4 48 63 4b 10 4c 89 ee 48 8d 14 52 41 83 c4 01 48 8d 14 d3 49 0f af cb <48> 03 72 28 48 01 f1 48 89 48 38 48 8b 52 20 48 89 50 30 48 83 
RIP  [<ffffffffa02a48ba>] __btrfs_map_block+0x2fa/0x1000 [btrfs]
 RSP <ffff880195f3fa38>
CR2: ffff87f8b18c3c40
sd 5:0:0:0: [sdc]  
Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sd 5:0:0:0: [sdc]  
Sense Key : Aborted Command [current]
Comment 1 David Sterba 2013-09-27 08:24:12 UTC
The stacktrace looks very similar to what I see with the failing btrfs/011 test. 

Not exactly from the same sources:

(gdb) l *(__btrfs_map_block+0x2fa)
0x56d8a is in __btrfs_map_block (fs/btrfs/volumes.c:4066).
warning: Source file is more recent than executable.
4061                    }
4062
4063                    if (!device->in_fs_metadata ||
4064                        device->is_tgtdev_for_dev_replace)
4065                            continue;
4066
4067                    if (device->total_bytes > device->bytes_used)
4068                            total_avail = device->total_bytes - device->bytes_used;
4069                    else
4070                            total_avail = 0;

Can you please describe how to reproduce it?
Comment 2 Josh Boyer 2013-09-27 14:20:02 UTC
Based on the attached dmesg in the original RHT bug, I'd say the drive was really going bad or something else has caused the kernel to have difficulties talking to it.  It's filled with:

[ 2577.487831] Write(10): 2a 00 00 dc 79 01 00 00 01 00
[ 2577.522818] sd 5:0:0:0: [sdc]  
[ 2577.522830] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 2577.522836] sd 5:0:0:0: [sdc]  
[ 2577.522841] Sense Key : Aborted Command [current] 
[ 2577.522848] sd 5:0:0:0: [sdc]  
[ 2577.522853] Add. Sense: No additional sense information
[ 2577.522858] sd 5:0:0:0: [sdc] CDB: 
[ 2577.522861] Write(10): 2a 00 00 dc 79 01 00 00 01 00
[ 2577.559657] sd 5:0:0:0: [sdc]  
[ 2577.559669] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 2577.559675] sd 5:0:0:0: [sdc]  
[ 2577.559680] Sense Key : Aborted Command [current] 
[ 2577.559687] sd 5:0:0:0: [sdc]  
[ 2577.559729] Add. Sense: No additional sense information
[ 2577.559735] sd 5:0:0:0: [sdc] CDB: 
[ 2577.559738] Read(10): 28 00 00 dc 79 02 00 00 01 00
[ 2577.559968] btrfs: i/o error at logical 13637785821184 on dev /dev/sdc, sector 115591184, root 7927, inode 14257, offset 16842752, length 4096, links 1 (path: Music/The Plimsouls/The Plimsouls/02 - Now.flac)
[ 2577.594771] sd 5:0:0:0: [sdc]  
[ 2577.594783] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 2577.594790] sd 5:0:0:0: [sdc]  
[ 2577.594794] Sense Key : Aborted Command [current] 
[ 2577.594801] sd 5:0:0:0: [sdc]  
[ 2577.594806] Add. Sense: No additional sense information
[ 2577.594811] sd 5:0:0:0: [sdc] CDB: 
[ 2577.594814] Write(10): 2a 00 00 dc 79 02 00 00 01 00
Comment 3 Ken Tobias 2013-09-27 17:15:21 UTC
Hello.

The drive was indeed going bad. It has since been replaced. Worked like a charm. I don't know if that means it's still a bug or not. Seems the code should handle the situation.

For the record, it was a 4 disk USB3 btrfs RAID10 set with no partition tables (i.e. /dev/sdc not /dev/sdc1).

Thanks for your help and time.
Comment 4 David Sterba 2022-10-03 10:35:17 UTC
This is a semi-automated bugzilla cleanup, report is against an old kernel version. If the problem still happens, please open a new bug. Thanks.

Note You need to log in before you can comment on or make changes to this bug.