From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755596AbYFROCN (ORCPT ); Wed, 18 Jun 2008 10:02:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753714AbYFROB5 (ORCPT ); Wed, 18 Jun 2008 10:01:57 -0400 Received: from mx1.redhat.com ([66.187.233.31]:46759 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752326AbYFROBz (ORCPT ); Wed, 18 Jun 2008 10:01:55 -0400 Date: Wed, 18 Jun 2008 10:01:53 -0400 From: Jeff Layton To: linux-kernel@vger.kernel.org Subject: debug_objects: lockdep warnings from 2.6.26-rc6 with debug_objects enabled Message-ID: <20080618100153.6369d784@barsoom.rdu.redhat.com> X-Mailer: Claws Mail 3.4.0 (GTK+ 2.12.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Trying to reproduce another problem this morning and I ran across this easily reproducible lockdep warning when I booted a recent Fedora rawhide kernel with debug_objects=1. I seem to consistently get a similar lockdep warning every time I boot, but sometimes the stack traces look a bit different. The locks involved do seem to be relatively consistent though. Let me know if you need any other info... ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.26-0.74.rc6.git4.fc10.x86_64 #1 ------------------------------------------------------- automount/2337 is trying to acquire lock: (&n->list_lock){++..}, at: [] unfreeze_slab+0x58/0xb1 but task is already holding lock: (&obj_hash[i].lock){++..}, at: [] __debug_object_init+0x2f/0x352 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&obj_hash[i].lock){++..}: [] __lock_acquire+0xbcf/0xd5f [] lock_acquire+0x5e/0x78 [] _spin_lock_irqsave+0x36/0x69 [] debug_check_no_obj_freed+0x6d/0x158 [] free_hot_cold_page+0xe6/0x1d0 [] free_hot_page+0xb/0xd [] __free_pages+0x22/0x2b [] __free_slab+0xf5/0x102 [] discard_slab+0x45/0x47 [] kmem_cache_shrink+0x13a/0x21e [] acpi_os_purge_cache+0x9/0xd [] acpi_purge_cached_objects+0x10/0x38 [] acpi_initialize_objects+0x49/0x54 [] acpi_init+0x8c/0x221 [] kernel_init+0x1eb/0x344 [] child_rip+0xa/0x12 [] 0xffffffffffffffff -> #0 (&n->list_lock){++..}: [] __lock_acquire+0xad2/0xd5f [] lock_acquire+0x5e/0x78 [] _spin_lock+0x26/0x53 [] unfreeze_slab+0x58/0xb1 [] __slab_alloc+0xf0/0x481 [] kmem_cache_alloc+0x62/0xa8 [] __debug_object_init+0x14a/0x352 [] debug_object_init+0x14/0x17 [] init_timer+0x18/0x5b [] scsi_get_command+0x53/0xa8 [scsi_mod] [] scsi_setup_fs_cmnd+0x41/0x91 [scsi_mod] [] sd_prep_fn+0x72/0x79f [sd_mod] [] elv_next_request+0x158/0x21f [] scsi_request_fn+0x93/0x411 [scsi_mod] [] __generic_unplug_device+0x27/0x2b [] generic_unplug_device+0x29/0x39 [] blk_unplug+0x5c/0x63 [] dm_table_unplug_all+0x2b/0x3e [dm_mod] [] dm_unplug_all+0x25/0x32 [dm_mod] [] blk_unplug+0x5c/0x63 [] blk_backing_dev_unplug+0xd/0xf [] sync_buffer+0x39/0x42 [] __wait_on_bit+0x47/0x79 [] out_of_line_wait_on_bit+0x6a/0x77 [] __wait_on_buffer+0x1f/0x21 [] __bread+0x9a/0xb4 [] ext3_get_branch+0x76/0xe9 [ext3] [] ext3_get_blocks_handle+0x9d/0x8b1 [ext3] [] ext3_get_block+0xbe/0xfc [ext3] [] do_mpage_readpage+0x181/0x4d5 [] mpage_readpages+0xb2/0xf7 [] ext3_readpages+0x1a/0x1c [ext3] [] __do_page_cache_readahead+0x136/0x1ac [] do_page_cache_readahead+0x56/0x63 [] filemap_fault+0x16a/0x33a [] __do_fault+0x51/0x3a8 [] handle_mm_fault+0x339/0x6f3 [] do_page_fault+0x4aa/0x8b9 [] error_exit+0x0/0xa9 [] 0xffffffffffffffff other info that might help us debug this: 3 locks held by automount/2337: #0: (&mm->mmap_sem){----}, at: [] do_page_fault+0x3f2/0x8b9 #1: (&q->__queue_lock){.+..}, at: [] generic_unplug_device+0x21/0x39 #2: (&obj_hash[i].lock){++..}, at: [] __debug_object_init+0x2f/0x352 stack backtrace: Pid: 2337, comm: automount Not tainted 2.6.26-0.74.rc6.git4.fc10.x86_64 #1 Call Trace: [] print_circular_bug_tail+0x70/0x7b [] __lock_acquire+0xad2/0xd5f [] ? __debug_object_init+0x14a/0x352 [] lock_acquire+0x5e/0x78 [] ? unfreeze_slab+0x58/0xb1 [] _spin_lock+0x26/0x53 [] unfreeze_slab+0x58/0xb1 [] __slab_alloc+0xf0/0x481 [] ? __debug_object_init+0x14a/0x352 [] ? lock_release_holdtime+0x1e/0x108 [] ? __debug_object_init+0x14a/0x352 [] kmem_cache_alloc+0x62/0xa8 [] __debug_object_init+0x14a/0x352 [] debug_object_init+0x14/0x17 [] init_timer+0x18/0x5b [] :scsi_mod:scsi_get_command+0x53/0xa8 [] :scsi_mod:scsi_setup_fs_cmnd+0x41/0x91 [] ? list_add+0xc/0xf [] :sd_mod:sd_prep_fn+0x72/0x79f [] elv_next_request+0x158/0x21f [] :scsi_mod:scsi_request_fn+0x93/0x411 [] __generic_unplug_device+0x27/0x2b [] generic_unplug_device+0x29/0x39 [] blk_unplug+0x5c/0x63 [] ? _read_unlock+0x26/0x2b [] :dm_mod:dm_table_unplug_all+0x2b/0x3e [] :dm_mod:dm_unplug_all+0x25/0x32 [] blk_unplug+0x5c/0x63 [] blk_backing_dev_unplug+0xd/0xf [] sync_buffer+0x39/0x42 [] __wait_on_bit+0x47/0x79 [] ? sync_buffer+0x0/0x42 [] ? sync_buffer+0x0/0x42 [] out_of_line_wait_on_bit+0x6a/0x77 [] ? wake_bit_function+0x0/0x2a [] __wait_on_buffer+0x1f/0x21 [] __bread+0x9a/0xb4 [] :ext3:ext3_get_branch+0x76/0xe9 [] :ext3:ext3_get_blocks_handle+0x9d/0x8b1 [] ? mark_held_locks+0x5c/0x77 [] ? _spin_unlock_irq+0x2b/0x30 [] ? __make_request+0x3b2/0x3cf [] ? generic_make_request+0x3b4/0x3ef [] ? native_sched_clock+0x50/0x6d [] :ext3:ext3_get_block+0xbe/0xfc [] ? submit_bio+0xe0/0xe9 [] do_mpage_readpage+0x181/0x4d5 [] ? add_to_page_cache+0x93/0xa2 [] mpage_readpages+0xb2/0xf7 [] ? :ext3:ext3_get_block+0x0/0xfc [] ? :ext3:ext3_get_block+0x0/0xfc [] ? __alloc_pages_nodemask+0x9/0xb [] :ext3:ext3_readpages+0x1a/0x1c [] __do_page_cache_readahead+0x136/0x1ac [] do_page_cache_readahead+0x56/0x63 [] filemap_fault+0x16a/0x33a [] __do_fault+0x51/0x3a8 [] handle_mm_fault+0x339/0x6f3 [] ? do_page_fault+0x3f2/0x8b9 [] do_page_fault+0x4aa/0x8b9 [] ? __up_write+0xf0/0xff [] ? lock_release_holdtime+0x1e/0x108 [] ? _spin_unlock_irqrestore+0x3f/0x47 [] ? trace_hardirqs_on+0xf1/0x115 [] ? __up_write+0xf0/0xff [] ? trace_hardirqs_on_thunk+0x35/0x3a [] ? trace_hardirqs_on+0xf1/0x115 [] error_exit+0x0/0xa9 -- Jeff Layton