From: Eric Sesterhenn Subject: BUG_ON at mballoc.c:3752 Date: Thu, 31 Jan 2008 15:01:37 +0100 Message-ID: <20080131140137.GA20780@alice> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 To: linux-ext4@vger.kernel.org Return-path: Received: from mail.gmx.net ([213.165.64.20]:51970 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S932653AbYAaOBk (ORCPT ); Thu, 31 Jan 2008 09:01:40 -0500 Content-Disposition: inline Sender: linux-ext4-owner@vger.kernel.org List-ID: hi, while running a modified version of fsfuzzer i triggered the BUG() in ext4_mb_release_inode_pa(). Sadly I am not able to reproduce this using the generated image, but running the fuzzer will usually trigger this in less than 40 attempts. Increasing the JBD2 Debug level didnt give more information. The kernel is current git with ext4-fix-null-pointer-deref-in-journal_wait_on_commit_record.patch applied. Greetings, Eric [ 1570.971980] EXT4-fs error (device loop0) in ext4_reserve_inode_write: Journal has aborted [ 1570.972077] pa c6512330: logic 16, phys. 2337, len 16 [ 1570.972103] free 2, pa_free 1 [ 1570.972191] ------------[ cut here ]------------ [ 1570.972217] kernel BUG at fs/ext4/mballoc.c:3752! [ 1570.972241] invalid opcode: 0000 [#1] PREEMPT DEBUG_PAGEALLOC [ 1570.972386] Modules linked in: [ 1570.972425] [ 1570.972509] Pid: 6629, comm: fstest Not tainted (2.6.24-05749-g8af03e7-dirty #19) [ 1570.972534] EIP: 0060:[] EFLAGS: 00010202 CPU: 0 [ 1570.972570] EIP is at ext4_mb_release_inode_pa+0x169/0x1a0 [ 1570.972595] EAX: 00000001 EBX: 00000930 ECX: 00000001 EDX: 00000001 [ 1570.972678] ESI: 00000930 EDI: c6512330 EBP: cb638b28 ESP: cb638a84 [ 1570.972703] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068 [ 1570.972728] Process fstest (pid: 6629, ti=cb638000 task=cb698000 task.ti=cb638000) [ 1570.972751] Stack: c07c21bb 00000002 00000001 00000921 00000010 cbff34e0 cb638b54 00000002 [ 1570.972899] cb5fa430 c64824a0 cb5fb920 00000022 cbff34e0 cb638ad4 00000246 00000400 [ 1570.972899] cbfa2000 cb5fb920 cbff34e0 00000000 0000092e 00000000 00000002 cbfa2000 [ 1570.972899] Call Trace: [ 1570.972899] [] ? read_block_bitmap+0x54/0x120 [ 1570.972899] [] ? ext4_mb_discard_inode_preallocations+0x124/0x300 [ 1570.972899] [] ? ext4_mb_discard_inode_preallocations+0x1a5/0x300 [ 1570.972899] [] ? ext4_ext_get_blocks+0x3a7/0x4b0 [ 1570.972899] [] ? ext4_get_blocks_wrap+0xe8/0x130 [ 1570.972899] [] ? ext4_get_block+0x7e/0xf0 [ 1570.972899] [] ? __block_prepare_write+0x17a/0x3a0 [ 1570.972899] [] ? block_write_begin+0x48/0xe0 [ 1570.972899] [] ? ext4_get_block+0x0/0xf0 [ 1570.972899] [] ? ext4_write_begin+0xb7/0x190 [ 1570.972899] [] ? ext4_get_block+0x0/0xf0 [ 1570.972899] [] ? generic_perform_write+0xa9/0x190 [ 1570.972899] [] ? generic_file_buffered_write+0x6d/0x130 [ 1570.972899] [] ? __generic_file_aio_write_nolock+0x241/0x550 [ 1570.972899] [] ? trace_hardirqs_on+0xc4/0x150 [ 1570.972899] [] ? generic_file_aio_write+0x5c/0xd0 [ 1570.972899] [] ? free_one_page+0x1ed/0x220 [ 1570.972899] [] ? ext4_file_write+0x50/0x160 [ 1570.972899] [] ? do_sync_write+0xcd/0x110 [ 1570.972899] [] ? native_sched_clock+0x69/0xc0 [ 1570.972899] [] ? autoremove_wake_function+0x0/0x50 [ 1570.972899] [] ? do_softirq+0x55/0xd0 [ 1570.972899] [] ? restore_nocheck+0x12/0x15 [ 1570.972899] [] ? trace_hardirqs_on+0xc4/0x150 [ 1570.972899] [] ? vfs_write+0x99/0x130 [ 1570.972899] [] ? do_sync_write+0x0/0x110 [ 1570.972899] [] ? sys_pwrite64+0x68/0x70 [ 1570.972899] [] ? sysenter_past_esp+0x5f/0xa5 [ 1570.972899] ======================= [ 1570.972899] Code: ff 0f b7 47 4e 89 44 24 08 8b 85 78 ff ff ff c7 04 24 bb 21 7c c0 89 44 24 04 e8 c3 e0 ef ff 0f b7 47 4e 39 85 78 ff ff ff 74 07 <0f> 0b eb fe 8d 76 00 8b 85 78 ff ff ff 8b 95 7c ff ff ff 01 82 [ 1570.972899] EIP: [] ext4_mb_release_inode_pa+0x169/0x1a0 SS:ESP 0068:cb638a84 [ 1570.972942] ---[ end trace 51819e80cd9431da ]--- [ 1570.972969] note: fstest[6629] exited with preempt_count 1 [ 1570.973013] BUG: sleeping function called from invalid context at kernel/rwsem.c:21 [ 1570.973039] in_atomic():1, irqs_disabled():0 [ 1570.973077] INFO: lockdep is turned off. [ 1570.973104] Pid: 6629, comm: fstest Tainted: G D 2.6.24-05749-g8af03e7-dirty #19 [ 1570.973159] [] __might_sleep+0xc6/0xf0 [ 1570.973224] [] down_read+0x19/0x80 [ 1570.973295] [] ? hrtimer_try_to_cancel+0x3d/0x80 [ 1570.973396] [] exit_mm+0x27/0xd0 [ 1570.973467] [] do_exit+0x133/0x2e0 [ 1570.973529] [] die+0x13c/0x140 [ 1570.973590] [] ? search_exception_tables+0x27/0x30 [ 1570.973993] [] do_trap+0x91/0xc0 [ 1570.974054] [] ? do_invalid_op+0x0/0xa0 [ 1570.974133] [] do_invalid_op+0x89/0xa0 [ 1570.974195] [] ? ext4_mb_release_inode_pa+0x169/0x1a0 [ 1570.974290] [] ? account_system_time+0x9b/0xd0 [ 1570.974370] [] ? vprintk+0x1ce/0x360 [ 1570.974465] [] error_code+0x6a/0x70 [ 1570.974531] [] ? account_system_time+0x9b/0xd0 [ 1570.974626] [] ? ext4_mb_release_inode_pa+0x169/0x1a0 [ 1570.974707] [] ? read_block_bitmap+0x54/0x120 [ 1570.974803] [] ? ext4_mb_discard_inode_preallocations+0x124/0x300 [ 1570.975151] [] ext4_mb_discard_inode_preallocations+0x1a5/0x300 [ 1570.975221] [] ext4_ext_get_blocks+0x3a7/0x4b0 [ 1570.975289] [] ext4_get_blocks_wrap+0xe8/0x130 [ 1570.975352] [] ext4_get_block+0x7e/0xf0 [ 1570.975413] [] __block_prepare_write+0x17a/0x3a0 [ 1570.975479] [] block_write_begin+0x48/0xe0 [ 1570.975541] [] ? ext4_get_block+0x0/0xf0 [ 1570.975635] [] ext4_write_begin+0xb7/0x190 [ 1570.975697] [] ? ext4_get_block+0x0/0xf0 [ 1570.975776] [] generic_perform_write+0xa9/0x190 [ 1570.975838] [] generic_file_buffered_write+0x6d/0x130 [ 1570.975944] [] __generic_file_aio_write_nolock+0x241/0x550 [ 1570.976007] [] ? trace_hardirqs_on+0xc4/0x150 [ 1570.976105] [] generic_file_aio_write+0x5c/0xd0 [ 1570.976166] [] ? free_one_page+0x1ed/0x220 [ 1570.976247] [] ext4_file_write+0x50/0x160 [ 1570.976308] [] do_sync_write+0xcd/0x110 [ 1570.976372] [] ? native_sched_clock+0x69/0xc0 [ 1570.976470] [] ? autoremove_wake_function+0x0/0x50 [ 1570.976567] [] ? do_softirq+0x55/0xd0 [ 1570.976662] [] ? restore_nocheck+0x12/0x15 [ 1570.976741] [] ? trace_hardirqs_on+0xc4/0x150 [ 1570.976837] [] vfs_write+0x99/0x130 [ 1570.976933] [] ? do_sync_write+0x0/0x110 [ 1570.977014] [] sys_pwrite64+0x68/0x70 [ 1570.977075] [] sysenter_past_esp+0x5f/0xa5 [ 1570.977137] ======================= [ 1570.977400] BUG: scheduling while atomic: fstest/6629/0x00000002 [ 1570.977426] INFO: lockdep is turned off. [ 1570.977468] Pid: 6629, comm: fstest Tainted: G D 2.6.24-05749-g8af03e7-dirty #19 [ 1570.977494] [] __schedule_bug+0x75/0x80 [ 1570.977557] [] schedule+0x2d5/0x3a0 [ 1570.977621] [] rwsem_down_failed_common+0x75/0x170 [ 1570.977684] [] ? __lock_contended+0xbe/0x110 [ 1570.977780] [] rwsem_down_write_failed+0x1d/0x30 [ 1570.977842] [] call_rwsem_down_write_failed+0x6/0x8 [ 1570.977933] [] ? down_write+0x81/0x90 [ 1570.978013] [] ? ext4_release_file+0x6c/0x80 [ 1570.978108] [] ext4_release_file+0x6c/0x80 [ 1570.978168] [] __fput+0xb4/0x1b0 [ 1570.978231] [] fput+0x18/0x20 [ 1570.978291] [] filp_close+0x47/0x70 [ 1570.978352] [] close_files+0x70/0x80 [ 1570.978415] [] put_files_struct+0x2a/0x60 [ 1570.978477] [] __exit_files+0x40/0x50 [ 1570.978538] [] do_exit+0x141/0x2e0 [ 1570.978600] [] die+0x13c/0x140 [ 1570.978661] [] ? search_exception_tables+0x27/0x30 [ 1570.978741] [] do_trap+0x91/0xc0 [ 1570.978803] [] ? do_invalid_op+0x0/0xa0 [ 1570.979039] [] do_invalid_op+0x89/0xa0 [ 1570.979104] [] ? ext4_mb_release_inode_pa+0x169/0x1a0 [ 1570.979185] [] ? account_system_time+0x9b/0xd0 [ 1570.979280] [] ? vprintk+0x1ce/0x360 [ 1570.979360] [] error_code+0x6a/0x70 [ 1570.979423] [] ? account_system_time+0x9b/0xd0 [ 1570.979519] [] ? ext4_mb_release_inode_pa+0x169/0x1a0 [ 1570.979600] [] ? read_block_bitmap+0x54/0x120 [ 1570.979700] [] ? ext4_mb_discard_inode_preallocations+0x124/0x300 [ 1570.979797] [] ext4_mb_discard_inode_preallocations+0x1a5/0x300 [ 1570.979861] [] ext4_ext_get_blocks+0x3a7/0x4b0 [ 1570.979964] [] ext4_get_blocks_wrap+0xe8/0x130 [ 1570.980026] [] ext4_get_block+0x7e/0xf0 [ 1570.980087] [] __block_prepare_write+0x17a/0x3a0 [ 1570.980153] [] block_write_begin+0x48/0xe0 [ 1570.980215] [] ? ext4_get_block+0x0/0xf0 [ 1570.980309] [] ext4_write_begin+0xb7/0x190 [ 1570.980371] [] ? ext4_get_block+0x0/0xf0 [ 1570.980450] [] generic_perform_write+0xa9/0x190 [ 1570.980513] [] generic_file_buffered_write+0x6d/0x130 [ 1570.980576] [] __generic_file_aio_write_nolock+0x241/0x550 [ 1570.980639] [] ? trace_hardirqs_on+0xc4/0x150 [ 1570.980735] [] generic_file_aio_write+0x5c/0xd0 [ 1570.980796] [] ? free_one_page+0x1ed/0x220 [ 1570.980932] [] ext4_file_write+0x50/0x160 [ 1570.980995] [] do_sync_write+0xcd/0x110 [ 1570.981058] [] ? native_sched_clock+0x69/0xc0 [ 1570.981142] [] ? autoremove_wake_function+0x0/0x50 [ 1570.981238] [] ? do_softirq+0x55/0xd0 [ 1570.981317] [] ? restore_nocheck+0x12/0x15 [ 1570.981410] [] ? trace_hardirqs_on+0xc4/0x150 [ 1570.981491] [] vfs_write+0x99/0x130 [ 1570.981552] [] ? do_sync_write+0x0/0x110 [ 1570.981646] [] sys_pwrite64+0x68/0x70 [ 1570.981708] [] sysenter_past_esp+0x5f/0xa5 [ 1570.981769] =======================