[bdi] BUG: unable to handle kernel NULL pointer dereference at 0000000000000550
Greetings, 0day kernel testing robot got the below dmesg and the first bad commit is git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git superblock-scaling commit 40ceea09e84d1b9319236b27ad3162422310e5d0 Author: Dave Chinner AuthorDate: Wed Mar 4 14:36:27 2015 -0500 Commit: Josef Bacik CommitDate: Wed Mar 4 14:39:28 2015 -0500 bdi: add a new writeback list for sync wait_sb_inodes() current does a walk of all inodes in the filesystem to find dirty one to wait on during sync. This is highly inefficient and wastes a lot of CPU when there are lots of clean cached inodes that we don't need to wait on. To avoid this "all inode" walk, we need to track inodes that are currently under writeback that we need to wait for. We do this by adding inodes to a writeback list on the bdi when the mapping is first tagged as having pages under writeback. wait_sb_inodes() can then walk this list of "inodes under IO" and wait specifically just for the inodes that the current sync(2) needs to wait for. To avoid needing all the realted locking to be safe against interrupts, Jan Kara suggested that we be lazy about removal from the writeback list. That is, we don't remove inodes from the writeback list on IO completion, but do it directly during a wait_sb_inodes() walk. This means that the a rare sync(2) call will have some work to do skipping clean inodes However, in the current problem case of concurrent sync workloads, concurrent wait_sb_inodes() calls only walk the very recently dispatched inodes and hence should have very little work to do. This also means that we have to remove the inodes from the writeback list during eviction. Do this in inode_wait_for_writeback() once all writeback on the inode is complete. Signed-off-by: Dave Chinner +--++++ | | d2ee191143 | 40ceea09e8 | 45b8e7be56 | +--++++ | boot_successes | 72 | 0 | 0 | | boot_failures| 8 | 20 | 12 | | BUG:kernel_boot_hang | 8 || | | BUG:unable_to_handle_kernel | 0 | 20 | 12 | | Oops | 0 | 20 | 12 | | RIP:blk_get_backing_dev_info | 0 | 20 | 12 | | Kernel_panic-not_syncing:Fatal_exception | 0 | 20 | 12 | | backtrace:add_disk | 0 | 20 | 12 | | backtrace:brd_init | 0 | 20 | 12 | | backtrace:kernel_init_freeable | 0 | 20 | 12 | +--++++ [0.699779] Linux agpgart interface v0.103 [0.700296] Hangcheck: starting hangcheck timer 0.9.1 (tick is 180 seconds, margin is 60 seconds). [0.701079] [drm] Initialized drm 1.1.0 20060810 [0.702193] BUG: unable to handle kernel NULL pointer dereference at 0550 [0.702883] IP: [] blk_get_backing_dev_info+0xb/0x1a [0.703443] PGD 0 [0.703632] Oops: [#1] PREEMPT SMP [0.704009] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.0.0-rc2-00135-g40ceea0 #1 [0.704142] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [0.704142] task: 88001286 ti: 880012868000 task.ti: 880012868000 [0.704142] RIP: 0010:[] [] blk_get_backing_dev_info+0xb/0x1a [0.704142] RSP: :88001286bcd8 EFLAGS: 00010202 [0.704142] RAX: RBX: 8800124147a0 RCX: [0.704142] RDX: 880012860720 RSI: RDI: 8800124145c0 [0.704142] RBP: 88001286bcd8 R08: 0001 R09: [0.704142] R10: R11: 0001 R12: 88001282a000 [0.704142] R13: 81c1c600 R14: 81c1c600 R15: 8800124145d8 [0.704142] FS: () GS:880013a0() knlGS: [0.704142] CS: 0010 DS: ES: CR0: 8005003b [0.704142] CR2: 0550 CR3: 02211000 CR4: 06f0 [0.704142] Stack: [0.704142] 88001286bcf8 81155424 8800124147a0 880012414820 [0.704142] 88001286bd28 8115558d 880012860720 8800124147a0 [0.704142] 880012414958 81c1c600 88001286bd58 8114a2e6 [0.704142] Call Trace: [0.704142] [] inode_to_bdi+0x36/0x45 [0.704142] [] inode_wait_for_writeback+0x3f/0xc2 [0.704142] []
[bdi] BUG: unable to handle kernel NULL pointer dereference at 0000000000000550
Greetings, 0day kernel testing robot got the below dmesg and the first bad commit is git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git superblock-scaling commit 40ceea09e84d1b9319236b27ad3162422310e5d0 Author: Dave Chinner dchin...@redhat.com AuthorDate: Wed Mar 4 14:36:27 2015 -0500 Commit: Josef Bacik jba...@fb.com CommitDate: Wed Mar 4 14:39:28 2015 -0500 bdi: add a new writeback list for sync wait_sb_inodes() current does a walk of all inodes in the filesystem to find dirty one to wait on during sync. This is highly inefficient and wastes a lot of CPU when there are lots of clean cached inodes that we don't need to wait on. To avoid this all inode walk, we need to track inodes that are currently under writeback that we need to wait for. We do this by adding inodes to a writeback list on the bdi when the mapping is first tagged as having pages under writeback. wait_sb_inodes() can then walk this list of inodes under IO and wait specifically just for the inodes that the current sync(2) needs to wait for. To avoid needing all the realted locking to be safe against interrupts, Jan Kara suggested that we be lazy about removal from the writeback list. That is, we don't remove inodes from the writeback list on IO completion, but do it directly during a wait_sb_inodes() walk. This means that the a rare sync(2) call will have some work to do skipping clean inodes However, in the current problem case of concurrent sync workloads, concurrent wait_sb_inodes() calls only walk the very recently dispatched inodes and hence should have very little work to do. This also means that we have to remove the inodes from the writeback list during eviction. Do this in inode_wait_for_writeback() once all writeback on the inode is complete. Signed-off-by: Dave Chinner dchin...@redhat.com +--++++ | | d2ee191143 | 40ceea09e8 | 45b8e7be56 | +--++++ | boot_successes | 72 | 0 | 0 | | boot_failures| 8 | 20 | 12 | | BUG:kernel_boot_hang | 8 || | | BUG:unable_to_handle_kernel | 0 | 20 | 12 | | Oops | 0 | 20 | 12 | | RIP:blk_get_backing_dev_info | 0 | 20 | 12 | | Kernel_panic-not_syncing:Fatal_exception | 0 | 20 | 12 | | backtrace:add_disk | 0 | 20 | 12 | | backtrace:brd_init | 0 | 20 | 12 | | backtrace:kernel_init_freeable | 0 | 20 | 12 | +--++++ [0.699779] Linux agpgart interface v0.103 [0.700296] Hangcheck: starting hangcheck timer 0.9.1 (tick is 180 seconds, margin is 60 seconds). [0.701079] [drm] Initialized drm 1.1.0 20060810 [0.702193] BUG: unable to handle kernel NULL pointer dereference at 0550 [0.702883] IP: [8121a84b] blk_get_backing_dev_info+0xb/0x1a [0.703443] PGD 0 [0.703632] Oops: [#1] PREEMPT SMP [0.704009] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.0.0-rc2-00135-g40ceea0 #1 [0.704142] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [0.704142] task: 88001286 ti: 880012868000 task.ti: 880012868000 [0.704142] RIP: 0010:[8121a84b] [8121a84b] blk_get_backing_dev_info+0xb/0x1a [0.704142] RSP: :88001286bcd8 EFLAGS: 00010202 [0.704142] RAX: RBX: 8800124147a0 RCX: [0.704142] RDX: 880012860720 RSI: RDI: 8800124145c0 [0.704142] RBP: 88001286bcd8 R08: 0001 R09: [0.704142] R10: R11: 0001 R12: 88001282a000 [0.704142] R13: 81c1c600 R14: 81c1c600 R15: 8800124145d8 [0.704142] FS: () GS:880013a0() knlGS: [0.704142] CS: 0010 DS: ES: CR0: 8005003b [0.704142] CR2: 0550 CR3: 02211000 CR4: 06f0 [0.704142] Stack: [0.704142] 88001286bcf8 81155424 8800124147a0 880012414820 [0.704142] 88001286bd28 8115558d 880012860720 8800124147a0 [0.704142] 880012414958 81c1c600 88001286bd58 8114a2e6 [0.704142] Call Trace: [0.704142]