Bug 59021 - Invalid opcode: 0000 at fs/btrfs/extent_io.c:4138
Summary: Invalid opcode: 0000 at fs/btrfs/extent_io.c:4138
Status: RESOLVED OBSOLETE
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Josef Bacik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-30 12:47 UTC by Clemens Eisserer
Modified: 2022-09-30 14:56 UTC (History)
4 users (show)

See Also:
Kernel Version: 3.9.4-300.fc19.x86_64
Subsystem:
Regression: No
Bisected commit-id:


Attachments
"screenshot" of protection fault with 3.10rc7 + both patches (317.28 KB, image/jpeg)
2013-07-05 16:13 UTC, Clemens Eisserer
Details

Description Clemens Eisserer 2013-05-30 12:47:46 UTC
Running some file-system tests I encountered this issue a single time and haven't succeeded so far reproducing it.

Mount options used were: compress-force=lzo,noatime,ssd,discard,space_cache

Additional info:
reporter:       libreport-2.1.4
kernel BUG at fs/btrfs/extent_io.c:4138!
invalid opcode: 0000 [#1] SMP 
Modules linked in: nls_utf8 isofs vfat fat fuse usb_storage nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_MASQUERADE ip6table_nat nf_nat_ipv6 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 rfcomm bnep snd_hda_codec_hdmi snd_hda_codec_idt iTCO_wdt iTCO_vendor_support mmc_block dell_wmi sparse_keymap ppdev dell_laptop dcdbas mperf coretemp kvm_intel arc4 iwldvm kvm mac80211 microcode snd_hda_intel snd_hda_codec uvcvideo cdc_mbim snd_hwdep snd_seq videobuf2_vmalloc videobuf2_memops i2c_i801 videobuf2_core videodev media btusb cdc_ncm snd_seq_device usbnet bluetooth mii snd_pcm iwlwifi cdc_wdm cdc_acm sdhci_pci cfg80211 sdhci lpc_ich mfd_core mmc_core snd_page_alloc rfkill e1000e snd_timer snd ptp mei soundcore pps_core wmi parport_pc parport uinput binfmt_misc btrfs libcrc32c xor zlib_deflate raid6_pq dm_crypt crc32_pclmul i915 crc32c_intel ghash_clmulni_intel i2c_algo_bit drm_kms_helper drm i2c_core video
CPU 2 
Pid: 10799, comm: btrfs-endio-wri Not tainted 3.9.4-300.fc19.x86_64 #1 Dell Inc. Latitude E6320/050F4T
RIP: 0010:[<ffffffffa019e401>]  [<ffffffffa019e401>] btrfs_release_extent_buffer_page.constprop.54+0x101/0x110 [btrfs]
RSP: 0018:ffff88011f66dc48  EFLAGS: 00010202
RAX: 0000000000000001 RBX: ffff8801dcdb6d20 RCX: 0000000000000003
RDX: 0000000000000000 RSI: 0000000000059a91 RDI: ffff8801dcdb6d20
RBP: ffff88011f66dc68 R08: 0000000000001000 R09: ffff88014e3a48d8
R10: 0000000000000000 R11: 0000000000000000 R12: ffff880211d57958
R13: ffff8801dcdb6d20 R14: 0000000000000005 R15: ffff8801f96ebbd0
FS:  0000000000000000(0000) GS:ffff88022dc40000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f580a39c000 CR3: 0000000001c0c000 CR4: 00000000000407e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process btrfs-endio-wri (pid: 10799, threadinfo ffff88011f66c000, task ffff88006ca28000)
Stack:
 ffff8801dcdb6d20 ffff880211d57958 ffff8801f96ebbd0 ffff880217d97800
 ffff88011f66dc88 ffffffffa019e446 ffff8801dcdb6d20 ffff8801f96ebbd0
 ffff88011f66dca0 ffffffffa01a3bef 0000000000000000 ffff88011f66dcc8
Call Trace:
 [<ffffffffa019e446>] release_extent_buffer.isra.33+0x36/0xb0 [btrfs]
 [<ffffffffa01a3bef>] free_extent_buffer+0x4f/0xa0 [btrfs]
 [<ffffffffa015edd5>] btrfs_release_path+0x25/0xb0 [btrfs]
 [<ffffffffa018832b>] insert_reserved_file_extent.constprop.56+0x20b/0x290 [btrfs]
 [<ffffffffa0191b8e>] btrfs_finish_ordered_io+0x50e/0x990 [btrfs]
 [<ffffffff8106d102>] ? del_timer_sync+0x52/0x60
 [<ffffffff816429d9>] ? schedule_timeout+0x179/0x2c0
 [<ffffffff81132209>] ? mempool_free+0x49/0x90
 [<ffffffffa01921f5>] finish_ordered_fn+0x15/0x20 [btrfs]
 [<ffffffffa01b110b>] worker_loop+0x12b/0x510 [btrfs]
 [<ffffffffa01b0fe0>] ? btrfs_queue_worker+0x300/0x300 [btrfs]
 [<ffffffff81080370>] kthread+0xc0/0xd0
 [<ffffffff810802b0>] ? insert_kthread_work+0x40/0x40
 [<ffffffff8164e32c>] ret_from_fork+0x7c/0xb0
 [<ffffffff810802b0>] ? insert_kthread_work+0x40/0x40
Code: 20 75 2a f0 41 80 64 24 01 f7 49 c7 44 24 30 00 00 00 00 4c 89 e7 e8 af e6 f9 e0 eb be 0f 1f 44 00 00 5b 41 5c 41 5d 41 5e 5d c3 <0f> 0b 0f 0b 0f 0b 0f 0b 0f 1f 80 00 00 00 00 66 66 66 66 90 55 
RIP  [<ffffffffa019e401>] btrfs_release_extent_buffer_page.constprop.54+0x101/0x110 [btrfs]
 RSP <ffff88011f66dc48>
Comment 1 David Sterba 2013-06-03 12:47:01 UTC
For the reference:

4130│ static void btrfs_release_extent_buffer_page(struct extent_buffer *eb,
    │                                                 unsigned long start_idx)
    │ {
    │         unsigned long index;
    │         unsigned long num_pages;
4135│         struct page *page;
    │         int mapped = !test_bit(EXTENT_BUFFER_DUMMY, &eb->bflags);
    │
    │         BUG_ON(extent_buffer_under_io(eb));

Can you please describe the tests and the filesystem setup (size, # devices, mkfs options)?
Comment 2 Clemens Eisserer 2013-06-03 14:30:58 UTC
It happend with the workload described in bug 59051, however I failed to reproduce it reliably.
Comment 3 Josef Bacik 2013-06-05 20:23:21 UTC
Did you happen to notice a WARN_ON() that happened before the panic?  Do you have the full dmesg so I can take a look?
Comment 4 Clemens Eisserer 2013-06-05 20:38:15 UTC
The initial bug I filed at redhat's bug tracker should have a bit more information: https://bugzilla.redhat.com/show_bug.cgi?id=968689
Comment 5 Josef Bacik 2013-06-13 14:41:12 UTC
Have you triggered it more than once?  And is it exactly the same workload as you described in that other bugzilla?
Comment 6 Clemens Eisserer 2013-06-14 11:51:05 UTC
Unfortunately it happend only a single time, I'll keep my eyes open for future occurences.
Comment 7 Sebastian Mäki 2013-06-16 13:56:47 UTC
This happened to me while I was watching a video with mplayer. There was no user activity at the time.

Kernel version 3.9.5-301.fc19.x86_64
Comment 8 Clemens Eisserer 2013-07-05 16:13:35 UTC
Created attachment 106813 [details]
"screenshot" of protection fault with 3.10rc7 + both patches
Comment 9 Clemens Eisserer 2013-07-05 16:14:49 UTC
still get crashes with 3.10rc7 + both patches applied, please see screenshot of kernel-oops attached.
Comment 10 David Sterba 2013-09-23 13:59:07 UTC
The crash from screenshot is fixed in 3.11 by

Btrfs: fix crash regarding to ulist_add_merge
Comment 11 Leho Kraav 2013-12-13 12:46:26 UTC
I also got this with 3.10.20. Laptop was idling overnight when this BUG hit at 5:20am.

Dec 13 05:20:21 xps14 kernel: [1365776.084989] ------------[ cut here ]------------
Dec 13 05:20:21 xps14 kernel: [1365776.085021] kernel BUG at fs/btrfs/extent_io.c:4210!
Dec 13 05:20:21 xps14 kernel: [1365776.085041] invalid opcode: 0000 [#1] PREEMPT SMP 
Dec 13 05:20:21 xps14 kernel: [1365776.085063] Modules linked in: iwldvm mac80211 iwlwifi cfg80211 vboxnetadp(O) vboxnetflt(O) vboxdrv(O) zfs(PO) zunicode(PO) zavl(PO) zcommon(PO) znvpair(PO) spl(O) 
nfsv3 nfs_acl snd_usb_audio snd_usbmidi_lib snd_hwdep snd_rawmidi snd_seq_device cdc_ether usbnet mii isofs tun ppp_deflate bsd_comp ppp_async crc_ccitt ppp_generic slhc sr_mod cdrom option usb_wwan 
usbserial nfs lockd sunrpc rfcomm bnep autofs4 nf_conntrack_ftp nf_conntrack_irc ipt_ULOG xt_conntrack nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack iptable_filter ip_tables zram(C) squashfs xt_mac x
t_limit i8k fuse arc4 snd_hda_codec_hdmi snd_hda_codec_realtek uvcvideo snd_hda_intel rtsx_pci_sdmmc dell_wmi videobuf2_vmalloc snd_hda_codec iTCO_wdt intel_powerclamp sdhci_pci videobuf2_memops spar
se_keymap coretemp psmouse videobuf2_core sdhci btusb wmi snd_pcm pcspkr videodev mmc_core snd_page_alloc mperf snd_timer bluetooth crc16 rtsx_pci rfkill processor battery ac snd i2c_i801 lpc_ich mei
_me mfd_core fbcon bitblit softcursor crc32_pclmul ehci_pci ehci_hcd xhci_hcd i915 cfbfillrect cfbimgblt cfbcopyarea intel_agp intel_gtt drm_kms_helper drm agpgart fb fbdev video [last unloaded: cfg8
0211]
Dec 13 05:20:21 xps14 kernel: [1365776.085566] CPU: 2 PID: 31386 Comm: btrfs-endio-wri Tainted: P        WC O 3.10.2.20-pf64+ #11
Dec 13 05:20:21 xps14 kernel: [1365776.085594] Hardware name: Dell Inc. XPS L421X/09JP1V, BIOS A13 12/07/2012
Dec 13 05:20:21 xps14 kernel: [1365776.085617] task: ffff880211790000 ti: ffff88002a108000 task.ti: ffff88002a108000
Dec 13 05:20:21 xps14 kernel: [1365776.085641] RIP: 0010:[<ffffffff811c240b>]  [<ffffffff811c240b>] btrfs_release_extent_buffer_page.constprop.42+0x23/0xd9
Dec 13 05:20:21 xps14 kernel: [1365776.085679] RSP: 0018:ffff88002a109a78  EFLAGS: 00010202
Dec 13 05:20:21 xps14 kernel: [1365776.085697] RAX: 0000000000000001 RBX: ffff8800571dca00 RCX: 0000000000000000
Dec 13 05:20:21 xps14 kernel: [1365776.085719] RDX: 0000000000000000 RSI: 000000000002443d RDI: ffff8800571dca00
Dec 13 05:20:21 xps14 kernel: [1365776.085742] RBP: ffff88002a109a98 R08: 000000000000003d R09: 0000000000142839
Dec 13 05:20:21 xps14 kernel: [1365776.085765] R10: 0000000000000000 R11: ffff8800571dca00 R12: 0000000000000000
Dec 13 05:20:21 xps14 kernel: [1365776.085787] R13: ffff88023d08f370 R14: 000000000007a000 R15: ffff88023b8a3800
Dec 13 05:20:21 xps14 kernel: [1365776.085811] FS:  0000000000000000(0000) GS:ffff88024f300000(0000) knlGS:0000000000000000
Dec 13 05:20:21 xps14 kernel: [1365776.085837] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Dec 13 05:20:21 xps14 kernel: [1365776.085855] CR2: 000038feefe4b000 CR3: 000000000180b000 CR4: 00000000001427e0
Dec 13 05:20:21 xps14 kernel: [1365776.085878] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Dec 13 05:20:21 xps14 kernel: [1365776.085901] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Dec 13 05:20:21 xps14 kernel: [1365776.085923] Stack:
Dec 13 05:20:21 xps14 kernel: [1365776.085931]  ffff8800571dca00 ffff88023d08f39e ffff88023d08f370 000000000007a000
Dec 13 05:20:21 xps14 kernel: [1365776.085960]  ffff88002a109ac8 ffffffff811c2534 0000000000000000 ffff8800571dca00
Dec 13 05:20:21 xps14 kernel: [1365776.085989]  ffff88024349c2d0 ffff88024349c2d0 ffff88002a109ae8 ffffffff811c67f1
Dec 13 05:20:21 xps14 kernel: [1365776.086017] Call Trace:
Dec 13 05:20:21 xps14 kernel: [1365776.086029]  [<ffffffff811c2534>] release_extent_buffer+0x73/0x9e
Dec 13 05:20:21 xps14 kernel: [1365776.086050]  [<ffffffff811c67f1>] free_extent_buffer+0x77/0x7b
Dec 13 05:20:21 xps14 kernel: [1365776.086071]  [<ffffffff8118bd01>] btrfs_release_path+0x6d/0x8d
Dec 13 05:20:21 xps14 kernel: [1365776.086091]  [<ffffffff811bd3bb>] __btrfs_drop_extents+0x909/0x91e
Dec 13 05:20:21 xps14 kernel: [1365776.086113]  [<ffffffff811bdcc5>] btrfs_drop_extents+0x63/0x7a
Dec 13 05:20:21 xps14 kernel: [1365776.086134]  [<ffffffff811b1a27>] insert_reserved_file_extent.constprop.48+0x74/0x25e
Dec 13 05:20:21 xps14 kernel: [1365776.086160]  [<ffffffff811b7621>] btrfs_finish_ordered_io+0x5bf/0x854
Dec 13 05:20:21 xps14 kernel: [1365776.086184]  [<ffffffff81038c8c>] ? del_timer_sync+0x40/0x4d
Dec 13 05:20:21 xps14 kernel: [1365776.086204]  [<ffffffff8141e94c>] ? schedule_timeout+0x1c0/0x1e0
Dec 13 05:20:21 xps14 kernel: [1365776.086225]  [<ffffffff8103889a>] ? init_timer_key+0xbb/0xbb
Dec 13 05:20:21 xps14 kernel: [1365776.086245]  [<ffffffff811b78c6>] finish_ordered_fn+0x10/0x12
Dec 13 05:20:21 xps14 kernel: [1365776.086265]  [<ffffffff811d19a3>] worker_loop+0x170/0x4ad
Dec 13 05:20:21 xps14 kernel: [1365776.086284]  [<ffffffff811d1833>] ? btrfs_queue_worker+0x274/0x274
Dec 13 05:20:21 xps14 kernel: [1365776.086306]  [<ffffffff81049606>] kthread+0xb5/0xbd
Dec 13 05:20:21 xps14 kernel: [1365776.086323]  [<ffffffff81049551>] ? kthread_freezable_should_stop+0x48/0x48
Dec 13 05:20:21 xps14 kernel: [1365776.086346]  [<ffffffff8142206c>] ret_from_fork+0x7c/0xb0
Dec 13 05:20:21 xps14 kernel: [1365776.086365]  [<ffffffff81049551>] ? kthread_freezable_should_stop+0x48/0x48
Dec 13 05:20:21 xps14 kernel: [1365776.086388] Code: c0 5e 5f 5b 41 5c 5d c3 55 48 89 e5 41 56 41 55 41 54 53 48 89 fb 4c 8b 67 20 e8 19 fa ff ff 49 c1 ec 09 41 83 e4 01 85 c0 74 02 <0f> 0b 48 8b 03 49 89 c6 48 c1 e8 0c 4c 03 73 08 49 81 c6 ff 0f 
Dec 13 05:20:21 xps14 kernel: [1365776.086556] RIP  [<ffffffff811c240b>] btrfs_release_extent_buffer_page.constprop.42+0x23/0xd9
Dec 13 05:20:21 xps14 kernel: [1365776.086585]  RSP <ffff88002a109a78>
Dec 13 05:20:21 xps14 kernel: [1365776.284320] ---[ end trace a4733e043ae23fa5 ]---
Comment 12 David Sterba 2022-09-30 14:56:55 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.