Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751999AbaBLEEO (ORCPT ); Tue, 11 Feb 2014 23:04:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:16635 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750975AbaBLEEM (ORCPT ); Tue, 11 Feb 2014 23:04:12 -0500 Date: Tue, 11 Feb 2014 23:03:58 -0500 From: Dave Jones To: Linus Torvalds Cc: Al Viro , Eric Sandeen , Dave Chinner , Linux Kernel , xfs@oss.sgi.com Subject: Re: 3.14-rc2 XFS backtrace because irqs_disabled. Message-ID: <20140212040358.GA25327@redhat.com> Mail-Followup-To: Dave Jones , Linus Torvalds , Al Viro , Eric Sandeen , Dave Chinner , Linux Kernel , xfs@oss.sgi.com References: <20140211172707.GA1749@redhat.com> <20140211210841.GM13647@dastard> <52FA9ADA.9040803@sandeen.net> <20140212004403.GA17129@redhat.com> <20140212010941.GM18016@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 11, 2014 at 06:52:19PM -0800, Linus Torvalds wrote: > On Tue, Feb 11, 2014 at 5:09 PM, Al Viro wrote: > > > > Slap the check in vfs_create(), see if interrupts had been disabled by it or > > by something in ->create(). Since it's reproducible... > > path_openat() starts off with a get_empty_filp(), which allocates a > file pointer with GFP_KERNEL. So that should have triggered the > might_sleep warning if irq's were already disabled at that point. > > So it's not before that - in particular, it's not in the signal > handling or do_coredump() paths. > > Also, at least xfs_buf_lock() - which is much deeper in that chain - > does a down(&bp->b_sema). I'm disguested that that doesn't have a > might_sleep() in it. > > Dave, mind adding a "might_sleep()" to the top of > "down[_interruptible]()". It's silly to not have coverage of semaphore > use in bad contexts. Added those, didn't trigger. Neither did Al's suggestion. Slightly different trace, but still from the coredump path. Dave [ 3111.403822] BUG: sleeping function called from invalid context at mm/mempool.c:203 [ 3111.404414] in_atomic(): 0, irqs_disabled(): 1, pid: 19213, name: trinity-c46 [ 3111.404884] 5 locks held by trinity-c46/19213: [ 3111.405354] #0: (sb_writers#9){......}, at: [] do_coredump+0xe05/0xf60 [ 3111.405862] #1: (shrinker_rwsem){......}, at: [] shrink_slab+0x3f/0x180 [ 3111.406374] #2: (&type->s_umount_key#30){......}, at: [] grab_super_passive+0x44/0x90 [ 3111.406905] #3: (&pag->pag_ici_reclaim_lock){......}, at: [] xfs_reclaim_inodes_ag+0x31a/0x430 [xfs] [ 3111.407466] #4: (&(&ip->i_lock)->mr_lock){......}, at: [] xfs_ilock+0x16f/0x1b0 [xfs] [ 3111.408039] CPU: 0 PID: 19213 Comm: trinity-c46 Not tainted 3.14.0-rc2+ #113 [ 3111.409779] ffffffff8da3fde6 000000004f998871 ffff88023715cce0 ffffffff8d72b091 [ 3111.410396] 0000000000000000 ffff88023715cd08 ffffffff8d09ddb5 0000000000000010 [ 3111.411021] ffff880243566288 0000000000000008 ffff88023715cd88 ffffffff8d1534f3 [ 3111.411656] Call Trace: [ 3111.412283] [] dump_stack+0x4e/0x7a [ 3111.412922] [] __might_sleep+0x105/0x150 [ 3111.413562] [] mempool_alloc+0xa3/0x170 [ 3111.414202] [] bio_alloc_bioset+0x156/0x210 [ 3111.414855] [] _xfs_buf_ioapply+0x1c1/0x3c0 [xfs] [ 3111.415517] [] ? xlog_bdstrat+0x22/0x60 [xfs] [ 3111.416175] [] xfs_buf_iorequest+0x6b/0xf0 [xfs] [ 3111.416843] [] xlog_bdstrat+0x22/0x60 [xfs] [ 3111.417509] [] xlog_sync+0x3a7/0x5b0 [xfs] [ 3111.418175] [] xlog_state_release_iclog+0x10f/0x120 [xfs] [ 3111.418846] [] xlog_write+0x6f0/0x800 [xfs] [ 3111.419518] [] xlog_cil_push+0x2f1/0x410 [xfs] [ 3111.420195] [] xlog_cil_force_lsn+0x1d8/0x210 [xfs] [ 3111.420865] [] ? __bit_spin_unlock.constprop.66+0x19/0x40 [ 3111.421551] [] _xfs_log_force_lsn+0x93/0x340 [xfs] [ 3111.422239] [] xfs_log_force_lsn+0x2e/0xb0 [xfs] [ 3111.422932] [] ? xfs_iunpin_wait+0x19/0x20 [xfs] [ 3111.423625] [] __xfs_iunpin_wait+0xd0/0x1a0 [xfs] [ 3111.424310] [] ? autoremove_wake_function+0x40/0x40 [ 3111.425008] [] xfs_iunpin_wait+0x19/0x20 [xfs] [ 3111.425705] [] xfs_reclaim_inode+0x8c/0x380 [xfs] [ 3111.426405] [] xfs_reclaim_inodes_ag+0x27b/0x430 [xfs] [ 3111.427104] [] ? xfs_reclaim_inodes_ag+0x100/0x430 [xfs] [ 3111.427797] [] xfs_reclaim_inodes_nr+0x33/0x40 [xfs] [ 3111.428481] [] xfs_fs_free_cached_objects+0x15/0x20 [xfs] [ 3111.429150] [] super_cache_scan+0x16c/0x180 [ 3111.429824] [] shrink_slab_node+0x14b/0x2e0 [ 3111.430489] [] ? shrink_slab+0x3f/0x180 [ 3111.431146] [] shrink_slab+0x8e/0x180 [ 3111.431796] [] try_to_free_pages+0x516/0x970 [ 3111.432436] [] ? __set_page_dirty+0x27/0xc0 [ 3111.433065] [] __alloc_pages_nodemask+0x7a9/0xb00 [ 3111.433689] [] alloc_pages_current+0x106/0x1f0 [ 3111.434304] [] ? pte_alloc_one+0x17/0x80 [ 3111.434911] [] pte_alloc_one+0x17/0x80 [ 3111.435510] [] __pte_alloc+0x27/0x130 [ 3111.436098] [] handle_mm_fault+0xafc/0xbb0 [ 3111.436681] [] __get_user_pages+0x1ce/0x620 [ 3111.437254] [] get_dump_page+0x54/0x80 [ 3111.437810] [] elf_core_dump+0x12d9/0x1420 [ 3111.438356] [] ? elf_core_dump+0x860/0x1420 [ 3111.438884] [] do_coredump+0xc02/0xf60 [ 3111.439398] [] get_signal_to_deliver+0x2b8/0x6b0 [ 3111.439898] [] do_signal+0x57/0x9d0 [ 3111.440386] [] ? __acct_update_integrals+0x8e/0x120 [ 3111.440873] [] ? preempt_count_sub+0x6b/0xf0 [ 3111.441357] [] ? _raw_spin_unlock+0x31/0x50 [ 3111.441833] [] ? vtime_account_user+0x91/0xa0 [ 3111.442307] [] ? context_tracking_user_exit+0x9b/0x100 [ 3111.442783] [] do_notify_resume+0x5c/0xa0 [ 3111.443260] [] retint_signal+0x46/0x90 [ 3111.443773] ------------[ cut here ]------------ [ 3111.444248] WARNING: CPU: 0 PID: 19213 at block/blk.h:227 generic_make_request_checks+0x33f/0x460() [ 3111.444742] Modules linked in: fuse can_bcm can_raw scsi_transport_iscsi ipt_ULOG nfnetlink nfc caif_socket caif af_802154 phonet af_rxrpc can pppoe pppox ppp_generic slhc irda crc_ccitt rds rose x25 atm netrom appletalk ipx p8023 psnap p8022 llc ax25 cfg80211 xfs libcrc32c coretemp hwmon x86_pkg_temp_thermal kvm_intel kvm crct10dif_pclmul crc32c_intel ghash_clmulni_intel snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic microcode serio_raw pcspkr btusb bluetooth 6lowpan_iphc rfkill usb_debug snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm e1000e ptp pps_core shpchp snd_timer snd soundcore [ 3111.447600] CPU: 0 PID: 19213 Comm: trinity-c46 Not tainted 3.14.0-rc2+ #113 [ 3111.449427] 0000000000000009 000000004f998871 ffff88023715cc90 ffffffff8d72b091 [ 3111.450062] 0000000000000000 ffff88023715ccc8 ffffffff8d06d0cd ffff8801ef3a1440 [ 3111.450697] 00000000ffffffff 00000000197e5088 0000000000800005 ffff88024091b740 [ 3111.451339] Call Trace: [ 3111.451968] [] dump_stack+0x4e/0x7a [ 3111.452608] [] warn_slowpath_common+0x7d/0xa0 [ 3111.453247] [] warn_slowpath_null+0x1a/0x20 [ 3111.453882] [] generic_make_request_checks+0x33f/0x460 [ 3111.454523] [] generic_make_request+0x27/0x130 [ 3111.455159] [] submit_bio+0x78/0x160 [ 3111.455790] [] ? bio_alloc_bioset+0x180/0x210 [ 3111.456432] [] _xfs_buf_ioapply+0x2bb/0x3c0 [xfs] [ 3111.457179] [] ? xlog_bdstrat+0x22/0x60 [xfs] [ 3111.457825] [] xfs_buf_iorequest+0x6b/0xf0 [xfs] [ 3111.458472] [] xlog_bdstrat+0x22/0x60 [xfs] [ 3111.459120] [] xlog_sync+0x3a7/0x5b0 [xfs] [ 3111.459768] [] xlog_state_release_iclog+0x10f/0x120 [xfs] [ 3111.460422] [] xlog_write+0x6f0/0x800 [xfs] [ 3111.461069] [] xlog_cil_push+0x2f1/0x410 [xfs] [ 3111.461714] [] xlog_cil_force_lsn+0x1d8/0x210 [xfs] [ 3111.462349] [] ? __bit_spin_unlock.constprop.66+0x19/0x40 [ 3111.463001] [] _xfs_log_force_lsn+0x93/0x340 [xfs] [ 3111.463654] [] xfs_log_force_lsn+0x2e/0xb0 [xfs] [ 3111.464311] [] ? xfs_iunpin_wait+0x19/0x20 [xfs] [ 3111.464966] [] __xfs_iunpin_wait+0xd0/0x1a0 [xfs] [ 3111.465609] [] ? autoremove_wake_function+0x40/0x40 [ 3111.466266] [] xfs_iunpin_wait+0x19/0x20 [xfs] [ 3111.466920] [] xfs_reclaim_inode+0x8c/0x380 [xfs] [ 3111.467573] [] xfs_reclaim_inodes_ag+0x27b/0x430 [xfs] [ 3111.468226] [] ? xfs_reclaim_inodes_ag+0x100/0x430 [xfs] [ 3111.468881] [] xfs_reclaim_inodes_nr+0x33/0x40 [xfs] [ 3111.469535] [] xfs_fs_free_cached_objects+0x15/0x20 [xfs] [ 3111.470182] [] super_cache_scan+0x16c/0x180 [ 3111.470831] [] shrink_slab_node+0x14b/0x2e0 [ 3111.471478] [] ? shrink_slab+0x3f/0x180 [ 3111.472121] [] shrink_slab+0x8e/0x180 [ 3111.472761] [] try_to_free_pages+0x516/0x970 [ 3111.473401] [] ? __set_page_dirty+0x27/0xc0 [ 3111.474040] [] __alloc_pages_nodemask+0x7a9/0xb00 [ 3111.474670] [] alloc_pages_current+0x106/0x1f0 [ 3111.475285] [] ? pte_alloc_one+0x17/0x80 [ 3111.475879] [] pte_alloc_one+0x17/0x80 [ 3111.476455] [] __pte_alloc+0x27/0x130 [ 3111.477012] [] handle_mm_fault+0xafc/0xbb0 [ 3111.477549] [] __get_user_pages+0x1ce/0x620 [ 3111.478072] [] get_dump_page+0x54/0x80 [ 3111.478576] [] elf_core_dump+0x12d9/0x1420 [ 3111.479065] [] ? elf_core_dump+0x860/0x1420 [ 3111.479546] [] do_coredump+0xc02/0xf60 [ 3111.480021] [] get_signal_to_deliver+0x2b8/0x6b0 [ 3111.480498] [] do_signal+0x57/0x9d0 [ 3111.480964] [] ? __acct_update_integrals+0x8e/0x120 [ 3111.481435] [] ? preempt_count_sub+0x6b/0xf0 [ 3111.481906] [] ? _raw_spin_unlock+0x31/0x50 [ 3111.482377] [] ? vtime_account_user+0x91/0xa0 [ 3111.482847] [] ? context_tracking_user_exit+0x9b/0x100 [ 3111.483324] [] do_notify_resume+0x5c/0xa0 [ 3111.483800] [] retint_signal+0x46/0x90 [ 3111.484274] ---[ end trace 8cc272739908f779 ]--- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/