Bug 56241

Summary: running e4defrag provokes "kernel BUG at fs/buffer.c:1833!"
Product: File System Reporter: j.fikar
Component: ext4Assignee: fs_ext4 (fs_ext4)
Status: RESOLVED OBSOLETE    
Severity: normal CC: dmonakhov
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.8.5 Subsystem:
Regression: Yes Bisected commit-id:

Description j.fikar 2013-04-05 11:29:27 UTC
I recently discovered, that "e4defrag /boot" produces an error and blocks the /boot even for umount. It was not the case some kernels before, not completely sure when, maybe around 3.5-3.6?

[81924.524369] ------------[ cut here ]------------
[81924.524556] kernel BUG at fs/buffer.c:1833!
[81924.524700] invalid opcode: 0000 [#1] PREEMPT SMP 
[81924.524883] Modules linked in: zram(C) iptable_filter ip_tables x_tables arc4 uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core videodev microcode snd_hda_codec_idt radeon ath9k ath9k_common ath9k_hw ath mac80211 r8169 cfg80211 drm_kms_helper snd_hda_intel snd_hda_codec k10temp snd_hwdep ttm video ohci_hcd
[81924.526007] CPU 1 
[81924.526090] Pid: 10555, comm: e4defrag Tainted: G         C   3.8.5 #2 Hewlett-Packard HP Pavilion dv7 Notebook PC/363A
[81924.526435] RIP: 0010:[<ffffffff81126605>]  [<ffffffff81126605>] __block_write_begin+0x455/0x460
[81924.526740] RSP: 0018:ffff880179ccdae8  EFLAGS: 00010206
[81924.526915] RAX: 8000000000000029 RBX: 0000000000000c00 RCX: ffffffff81186ed0
[81924.527143] RDX: 0000000000001c00 RSI: 0000000000000c00 RDI: ffffea0006294800
[81924.527370] RBP: ffff880179ccdc80 R08: 0000000000014780 R09: ffff88021fd14780
[81924.527597] R10: ffffea0005bbc4c0 R11: ffffffff811ac642 R12: ffff880179ccdc80
[81924.527824] R13: 0000000000000000 R14: 0000000000000400 R15: ffffea0006294800
[81924.528054] FS:  00007fe4a7b0e740(0000) GS:ffff88021fd00000(0000) knlGS:0000000000000000
[81924.528310] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[81924.528495] CR2: 0000003de2d61728 CR3: 000000014c137000 CR4: 00000000000007e0
[81924.528722] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[81924.528949] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[81924.529178] Process e4defrag (pid: 10555, threadinfo ffff880179ccc000, task ffff8802057b5820)
[81924.529444] Stack:
[81924.529514]  ffff880179ccdb60 ffff880117361190 ffff88016ef130c0 ffff8801236d94f0
[81924.529781]  ffff880117361190 00000c0000001c00 ffff880117361190 ffffffff81186ed0
[81924.530048]  0000000000000400 ffffffff815b4f9b ffff8801236d9458 0000000181123260
[81924.530314] Call Trace:
[81924.530414]  [<ffffffff81186ed0>] ? ext4_get_block_write+0x10/0x10
[81924.530621]  [<ffffffff815b4f9b>] ? out_of_line_wait_on_bit+0x7b/0x90
[81924.530837]  [<ffffffff811acb74>] ? move_extent_per_page.isra.17+0x424/0x8e0
[81924.531069]  [<ffffffff8119d048>] ? ext4_ext_find_extent+0x2f8/0x370
[81924.531279]  [<ffffffff811ad6bd>] ? ext4_move_extents+0x68d/0xa00
[81924.531483]  [<ffffffff8118bab5>] ? ext4_ioctl+0xa55/0xaf0
[81924.531667]  [<ffffffff810c5526>] ? tlb_finish_mmu+0x16/0x50
[81924.531857]  [<ffffffff810cc2b1>] ? unmap_region+0xd1/0x130
[81924.532046]  [<ffffffff811099bd>] ? do_vfs_ioctl+0x43d/0x510
[81924.532235]  [<ffffffff810ce2f9>] ? do_munmap+0x329/0x420
[81924.532416]  [<ffffffff81109adc>] ? sys_ioctl+0x4c/0xa0
[81924.532594]  [<ffffffff815b7f56>] ? system_call_fastpath+0x1a/0x1f
[81924.532790] Code: 24 10 e9 42 fd ff ff 8b 54 24 28 8b 74 24 2c 4c 89 ff 89 44 24 18 e8 8b f2 ff ff 8b 44 24 18 e9 bb fe ff ff 0f 0b e8 28 88 48 00 <0f> 0b 0f 0b 0f 1f 80 00 00 00 00 48 83 ec 28 4c 89 6c 24 20 48 
[81924.533932] RIP  [<ffffffff81126605>] __block_write_begin+0x455/0x460
[81924.534150]  RSP <ffff880179ccdae8>
[81924.590443] ---[ end trace c154515de3642cfd ]---
Comment 1 Dmitry Monakhov 2013-04-08 16:07:39 UTC
Ok I've able to reproduce this on 64k pages and 1k fsblock size
Probably this is my bug
 
10477.714752] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: acl,user_xattr
[10480.693978] kernel BUG at fs/buffer.c:1833!
[10480.698233] fio[10780]: bugcheck! 0 [1]
[10480.702141] Modules linked in: ext4 jbd2 crc16 nls_iso8859_1 nls_cp437 vfat fat dm_mod sg loop sr_mod cdrom hid_generic ehci_pci ext3 jbd mbcache usb_storage usbhid hid hpsa cciss mptsas mptscsih mptbase scsi_transport_sas tg3 libphy ptp scsi_mod ohci_hcd ehci_hcd usbcore pps_core usb_common
[10480.702223] 
[10480.702223] Pid: 10780, CPU 2, comm:                  fio
[10480.702223] psr : 00001010085a6018 ifs : 8000000000000ea1 ip  : [<a00000010026f500>]    Not tainted (3.8.0)
[10480.702223] ip is at __block_write_begin+0xe0/0xa40
[10480.702223] unat: 0000000000000000 pfs : 0000000000000ea1 rsc : 0000000000000003
[10480.702223] rnat: 0009804c8a70033f bsps: 0000000000004000 pr  : 00000000a9a94955
[10480.702223] ldrs: 0000000000000000 ccv : 000000000d220691 fpsr: 0009804c8a70033f
[10480.702223] csd : 0000000000000000 ssd : 0000000000000000
[10480.702223] b0  : a00000010026f500 b6  : a00000010042f760 b7  : a000000100554f30
[10480.702223] f6  : 1003e00000354df80f716 f7  : 1003e000000000000015e
[10480.702223] f8  : 1003e00000354df80f5b8 f9  : 1003e0000000000000001
[10480.702223] f10 : 1003e00000000052ba885 f11 : 1003e20c49ba5e353f7cf
[10480.702223] r1  : a000000100e50e20 r2  : 0000000000006760 r3  : 000000000000fffe
[10480.702223] r8  : 000000000000001f r9  : 00000000000005f5 r10 : 00000000000005f5
[10480.702223] r11 : 000000000000675e r12 : e00000022ecafd20 r13 : e00000022eca0000
[10480.702223] r14 : 0000000000006760 r15 : 0000000000004000 r16 : 00000000000033af
[10480.702223] r17 : 0000000000000001 r18 : 000000000000675e r19 : a000000100c5d138
[10480.702223] r20 : 000000000000675c r21 : 0000000000000000 r22 : a000000100cf87a8
[10480.702223] r23 : a0000001009feb48 r24 : a000000100553a70 r25 : 0000000000000700
[10480.702223] r26 : a000000100cf88e0 r27 : a0000001009feb38 r28 : 0000000000000000
[10480.702223] r29 : a000000100cf87a0 r30 : 0000000000000c34 r31 : a000000100cf878a
[10480.702223] 
[10480.702223] Call Trace:
[10480.702223]  [<a000000100014d10>] show_stack+0x50/0xa0
[10480.702223]                                 sp=e00000022ecaf8f0 bsp=e00000022eca14c0
[10480.702223]  [<a000000100015590>] show_regs+0x830/0x870
[10480.702223]                                 sp=e00000022ecafac0 bsp=e00000022eca1460
[10480.702223]  [<a00000010003a900>] die+0x1a0/0x2f0
[10480.702223]                                 sp=e00000022ecafad0 bsp=e00000022eca1420
[10480.702223]  [<a00000010003aaa0>] die_if_kernel+0x50/0x70
[10480.702223]                                 sp=e00000022ecafad0 bsp=e00000022eca13e8
[10480.702223]  [<a00000010082d7e0>] ia64_bad_break+0x240/0x420
[10480.702223]                                 sp=e00000022ecafad0 bsp=e00000022eca13c0
[10480.702223]  [<a00000010000bc40>] ia64_native_leave_kernel+0x0/0x270
[10480.702223]                                 sp=e00000022ecafb50 bsp=e00000022eca13c0
[10480.702223]  [<a00000010026f500>] __block_write_begin+0xe0/0xa40
[10480.702223]                                 sp=e00000022ecafd20 bsp=e00000022eca12b8
[10480.702223]  [<a000000203673df0>] ext4_move_extents+0x13b0/0x1c60 [ext4]
[10480.702223]                                 sp=e00000022ecafd40 bsp=e00000022eca10c8
[10480.702223]  [<a000000203623100>] ext4_ioctl+0x1200/0x1b30 [ext4]
[10480.702223]                                 sp=e00000022ecafd60 bsp=e00000022eca1058
[10480.702223]  [<a00000010022f690>] do_vfs_ioctl+0xf00/0x1010
[10480.702223]                                 sp=e00000022ecafdd0 bsp=e00000022eca1008
[10480.702223]  [<a00000010022f840>] sys_ioctl+0xa0/0x120
[10480.702223]                                 sp=e00000022ecafe10 bsp=e00000022eca0f80
[10480.702223]  [<a00000010000bac0>] ia64_ret_from_syscall+0x0/0x20
[10480.702223]                                 sp=e00000022ecafe30 bsp=e00000022eca0f80
[10480.702223]  [<a000000000040720>] ia64_ivt+0xffffffff00040720/0x400
[10480.702223]                                 sp=e00000022ecb0000 bsp=e00000022eca0f80
[10480.702223] Disabling lock debugging due to kernel taint
Comment 2 j.fikar 2014-09-03 14:37:38 UTC
I haven't seen that error for long time now, I suppose it is resolved. Now I have 3.16.0.