Bug 109791 - Kernel OOPS in btrfs_sync_file
Summary: Kernel OOPS in btrfs_sync_file
Status: RESOLVED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: David Sterba
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-22 16:02 UTC by Sebastian Wagner
Modified: 2019-05-21 12:34 UTC (History)
3 users (show)

See Also:
Kernel Version: 3.19.0-42
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Kern.log with lots of kernel oops and sudden hard power-offs (1.75 MB, text/x-log)
2015-12-22 16:02 UTC, Sebastian Wagner
Details

Description Sebastian Wagner 2015-12-22 16:02:51 UTC
Created attachment 198011 [details]
Kern.log with lots of kernel oops and sudden hard power-offs

I got this Kernel OOPS when starting a lxc container:

Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.738236] BUG: unable to handle kernel NULL pointer dereference at 0000000000000394
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.738305] IP: [<ffffffffc069d107>] btrfs_sync_file+0xa7/0x310 [btrfs]
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.738385] PGD 0 
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.738402] Oops: 0002 [#2] SMP 
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.738430] Modules linked in: overlay veth xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6table_filter ip6_tables xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack xt_tcpudp bridge stp llc iptable_filter ip_tables x_ta
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.739234] CPU: 1 PID: 17846 Comm: bounce Tainted: G      D        3.19.0-41-generic #46-Ubuntu
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.739291] Hardware name: SAMSUNG ELECTRONICS CO., LTD. RC530/RC730/RC530/RC730, BIOS 04WD.M011.20111114.PSA 11/14/2011
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.739360] task: ffff8800c68f6bf0 ti: ffff880211450000 task.ti: ffff880211450000
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.739408] RIP: 0010:[<ffffffffc069d107>]  [<ffffffffc069d107>] btrfs_sync_file+0xa7/0x310 [btrfs]
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.739488] RSP: 0018:ffff880211453eb8  EFLAGS: 00010296
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.739522] RAX: ffff8800c68f6bf0 RBX: ffff8800c63e3400 RCX: 0000000000000001
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.743661] RDX: 0000000080000000 RSI: ffff880211453e20 RDI: ffff880106659fb8
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.747488] RBP: ffff880211453f28 R08: ffffffffc069d060 R09: 0000000000000000
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.751647] R10: 00007ffeddd13d60 R11: 0000000000000246 R12: ffff880106659fb8
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.756999] R13: ffff880106659f10 R14: 0000000000000000 R15: 00007ffeddd14f89
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.761245] FS:  00007fea106167c0(0000) GS:ffff88022fa20000(0000) knlGS:0000000000000000
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.764822] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.768398] CR2: 0000000000000394 CR3: 00000001f8a4e000 CR4: 00000000000407e0
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.770934] Stack:
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.772644]  ffff880211453ed8 ffff880221934a80 7fffffffffffffff 0000000000000000
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.775120]  ffff880211453f28 0000000000000100 ffff880211454000 00000000c000003e
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.777535]  ffff880211453f58 ffff8800c63e3400 ffff8800c63e3400 0000000000000000
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.779890] Call Trace:
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.782203]  [<ffffffff81226fd1>] do_fsync+0x51/0x80
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.784454]  [<ffffffff81227270>] SyS_fsync+0x10/0x20
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.786662]  [<ffffffff817cc9cd>] system_call_fastpath+0x16/0x1b
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.788822] Code: 49 83 c7 10 44 89 e2 48 89 de ff d1 49 8b 0f 48 85 c9 75 e8 eb a7 66 0f 1f 44 00 00 4d 8d a5 a8 00 00 00 4c 89 e7 e8 e9 d3 12 c1 <f0> 41 ff 86 94 03 00 00 49 8b 45 80 48 8b 55 a0 48 c1 e8 07 83 
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.793242] RIP  [<ffffffffc069d107>] btrfs_sync_file+0xa7/0x310 [btrfs]
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.795471]  RSP <ffff880211453eb8>
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.797653] CR2: 0000000000000394
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.799832] BUG: unable to handle kernel NULL pointer dereference at 0000000000000394
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.800630] audit: type=1400 audit(1450713919.289:33): apparmor="DENIED" operation="file_perm" profile="lxc-container-default" name="private/defer" pid=17827 comm="smtp" requested_mask="r" denied_mask="r" fsuid=89 ouid=0
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.800642] audit: type=1400 audit(1450713919.289:34): apparmor="DENIED" operation="file_perm" profile="lxc-container-default" name="private/defer" pid=17827 comm="smtp" requested_mask="r" denied_mask="r" fsuid=89 ouid=0
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.813604] IP: [<ffffffffc069d107>] btrfs_sync_file+0xa7/0x310 [btrfs]
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.817515] PGD 0 
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.821195] Oops: 0002 [#3] SMP 
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.825004] Modules linked in: overlay veth xt_conntrack ipt_REJECT nf_reject_ipv4 ebtable_filter ebtables ip6table_filter ip6_tables xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack xt_tcpudp bridge stp llc iptable_filter ip_tables x_ta
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.850295] CPU: 6 PID: 17847 Comm: bounce Tainted: G      D        3.19.0-41-generic #46-Ubuntu
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.854428] Hardware name: SAMSUNG ELECTRONICS CO., LTD. RC530/RC730/RC530/RC730, BIOS 04WD.M011.20111114.PSA 11/14/2011
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.858596] task: ffff88010e0debf0 ti: ffff8800a2438000 task.ti: ffff8800a2438000
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.863035] RIP: 0010:[<ffffffffc069d107>]  [<ffffffffc069d107>] btrfs_sync_file+0xa7/0x310 [btrfs]
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.867306] RSP: 0018:ffff8800a243beb8  EFLAGS: 00010296
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.871517] RAX: ffff88010e0debf0 RBX: ffff88003799d000 RCX: 0000000000000001
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.875717] RDX: 0000000080000000 RSI: ffff8800a243be20 RDI: ffff880198c08df8
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.879912] RBP: ffff8800a243bf28 R08: ffffffffc069d060 R09: 0000000000000000
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.884134] R10: 00007ffe4293ce80 R11: 0000000000000246 R12: ffff880198c08df8
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.888301] R13: ffff880198c08d50 R14: 0000000000000000 R15: 00007ffe4293ef89
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.892379] FS:  00007f8c90c787c0(0000) GS:ffff88022fac0000(0000) knlGS:0000000000000000
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.896393] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.900313] CR2: 0000000000000394 CR3: 00000000c5920000 CR4: 00000000000407e0
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.904156] Stack:
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.907884]  ffff8800a243bed8 ffff880221888a80 7fffffffffffffff 0000000000000000
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.911649]  ffff8800a243bf28 0000000000000100 ffff8800a243c000 00000000c000003e
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.915383]  ffff8800a243bf58 ffff88003799d000 ffff88003799d000 0000000000000000
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.919094] Call Trace:
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.922739]  [<ffffffff81226fd1>] do_fsync+0x51/0x80
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.926351]  [<ffffffff81227270>] SyS_fsync+0x10/0x20
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.929950]  [<ffffffff817cc9cd>] system_call_fastpath+0x16/0x1b
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.933557] Code: 49 83 c7 10 44 89 e2 48 89 de ff d1 49 8b 0f 48 85 c9 75 e8 eb a7 66 0f 1f 44 00 00 4d 8d a5 a8 00 00 00 4c 89 e7 e8 e9 d3 12 c1 <f0> 41 ff 86 94 03 00 00 49 8b 45 80 48 8b 55 a0 48 c1 e8 07 83 
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.941222] RIP  [<ffffffffc069d107>] btrfs_sync_file+0xa7/0x310 [btrfs]
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.945181]  RSP <ffff8800a243beb8>
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.949048] CR2: 0000000000000394
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.952826] BUG: unable to handle kernel NULL pointer dereference at 0000000000000394
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24387.952890] ---[ end trace 95762ba10c26f26d ]---
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: aes_x86_64 lrw snd_seq_device gf128mul snd_timer glue_helper snd mei_me serio_raw ablk_helper mei lpc_ich shpchp cryptd mac_hid soundcore cuse parport_pc ppdev lp parport autofs4 btrfs xor raid6_pq hid_cherry usbhid hid nouveau i915 mxm_wmi ttm i2c_algo_bit drm_kms_helper drm psmouse ahci r8169 libahci mii video wmi
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.017111] Hardware name: SAMSUNG ELECTRONICS CO., LTD. RC530/RC730/RC530/RC730, BIOS 04WD.M011.20111114.PSA 11/14/2011
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.025963] RIP: 0010:[<ffffffffc069d107>]  [<ffffffffc069d107>] btrfs_sync_file+0xa7/0x310 [btrfs]
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.034577] RAX: ffff8800c4543110 RBX: ffff8801dd6d6c00 RCX: 0000000000000001
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.043078] RBP: ffff8800b968bf28 R08: ffffffffc069d060 R09: 0000000000000000
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.051507] R13: ffff8800c51e65b8 R14: 0000000000000000 R15: 00007fff9f9e5f89
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.059306] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.067180] Stack:
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.074798]  ffff8800b968bf28 0000000000000100 ffff8800b968c000 00000000c000003e
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.082249] Call Trace:
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.089597]  [<ffffffff81227270>] SyS_fsync+0x10/0x20
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.096846] Code: 49 83 c7 10 44 89 e2 48 89 de ff d1 49 8b 0f 48 85 c9 75 e8 eb a7 66 0f 1f 44 00 00 4d 8d a5 a8 00 00 00 4c 89 e7 e8 e9 d3 12 c1 <f0> 41 ff 86 94 03 00 00 49 8b 45 80 48 8b 55 a0 48 c1 e8 07 83 
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.108543]  RSP <ffff8800b968beb8>
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.117085] BUG: unable to handle kernel NULL pointer dereference at 0000000000000394
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.211302] R13: ffff8800c524f0d0 R14: 0000000000000000 R15: 00007ffe5230af89
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.222224] CR2: 0000000000000394 CR3: 000000017478d000 CR4: 00000000000407e0
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.231686]  ffff880199957f28 0000000000000100 ffff880199958000 00000000c000003e
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.241207]  [<ffffffff81226fd1>] do_fsync+0x51/0x80
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.251935] Code: 49 83 c7 10 44 89 e2 48 89 de ff d1 49 8b 0f 48 85 c9 75 e8 eb a7 66 0f 1f 44 00 00 4d 8d a5 a8 00 00 00 4c 89 e7 e8 e9 d3 12 c1 <f0> 41 ff 86 94 03 00 00 49 8b 45 80 48 8b 55 a0 48 c1 e8 07 83 
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.266690] CR2: 0000000000000394
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.269865] audit: type=1400 audit(1450713919.757:39): apparmor="DENIED" operation="file_perm" profile="lxc-container-default" name="private/defer" pid=17844 comm="smtp" requested_mask="r" denied_mask="r" fsuid=89 ouid=0
Dec 21 17:05:19 sebastian-RC530-RC730 kernel: [24388.269881] audit: type=1400 audit(1450713919.757:40): apparmor="DENIED" operation="file_perm" profile="lxc-container-default" name="private/defer" pid=17844 comm="smtp" requested_mask="r" denied_mask="r" fsuid=89 ouid=0
Dec
Comment 1 Sebastian Wagner 2015-12-22 16:17:36 UTC
Possibly related to https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1496438
Comment 2 David Sterba 2019-05-21 12:34:12 UTC
Fixed by de17e793b104d690e1d "btrfs: fix crash/invalid memory access on fsync when using overlayfs", in 4.6.

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