Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751471AbaDOWJE (ORCPT ); Tue, 15 Apr 2014 18:09:04 -0400 Received: from www.meduna.org ([92.240.244.38]:47261 "EHLO meduna.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbaDOWJB (ORCPT ); Tue, 15 Apr 2014 18:09:01 -0400 Message-ID: <534DADF1.6060608@meduna.org> Date: Wed, 16 Apr 2014 00:08:49 +0200 From: Stanislav Meduna User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: "linux-rt-users@vger.kernel.org" CC: Linux ARM Kernel , "linux-kernel@vger.kernel.org" , bigeasy@linutronix.de, Steven Rostedt , Thomas Gleixner Subject: Re: BUG: spinlock trylock failure on UP, i.MX28 3.12.15-rt25 References: <534C3606.7010206@meduna.org> <534C731F.1050406@meduna.org> In-Reply-To: <534C731F.1050406@meduna.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Authenticated-User: stano@meduna.org X-Authenticator: dovecot_plain X-Spam-Score: -6.9 X-Spam-Score-Int: -68 X-Exim-Version: 4.72 (build at 25-Oct-2012 18:35:58) X-Date: 2014-04-16 00:08:55 X-Connected-IP: 95.105.163.217:44055 X-Message-Linecount: 75 X-Body-Linecount: 58 X-Message-Size: 4708 X-Body-Size: 3893 X-Received-Count: 1 X-Recipient-Count: 6 X-Local-Recipient-Count: 6 X-Local-Recipient-Defer-Count: 0 X-Local-Recipient-Fail-Count: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15.04.2014 01:45, Stanislav Meduna wrote: >> BUG: spinlock trylock failure on UP on CPU#0, ksoftirqd/0/3 I am now getting this quite reproducibly a few seconds into the boot and the path is always similar. Depending on what modules I am loading the source changes, but it is nearly always a schedule_timeout with a following timer interrupt. Disabling highres timers just changes the bug path but it happens also in that case. I am using CONFIG_HZ_PERIODIC. I tried to disable the serial console and several drivers to rule out some interference but it did not change anything. Freescale i.MX28, 3.12.15-rt25 + patches enabling the platform, none of them touches anything in kernel/* or the MXS timer. Up to now no freeze or other BUGs, it was always only this one. I see that the relevant code was touched a few times in the last few months, maybe there is still something lurking. Hmm... how is it in the rt-case guaranteed that the timer interrupt does not preempt someone trying to modify the timer? The run_local_timers looks to have arrived via hardirq context. The spinlock in the tvec_base is a normal one and spin_lock_irqsave does not disable interrupts on rt, right? [ 11.797460] BUG: spinlock trylock failure on UP on CPU#0, rcu_preempt/11 [ 11.797522] lock: boot_tvec_bases+0x0/0x10c0, .magic: dead4ead, .owner: rcu_preempt/11, .owner_cpu: 0 [ 11.797550] CPU: 0 PID: 11 Comm: rcu_preempt Not tainted 3.12.15-rt25+ #52 [ 11.797630] [] (unwind_backtrace+0x0/0xf4) from [] (show_stack+0x10/0x14) [ 11.797691] [] (show_stack+0x10/0x14) from [] (do_raw_spin_trylock+0x4c/0x58) [ 11.797748] [] (do_raw_spin_trylock+0x4c/0x58) from [] (_raw_spin_trylock+0x20/0x98) [ 11.797792] [] (_raw_spin_trylock+0x20/0x98) from [] (rt_spin_trylock+0x14/0xd0) [ 11.797851] [] (rt_spin_trylock+0x14/0xd0) from [] (run_local_timers+0x24/0x78) [ 11.797892] [] (run_local_timers+0x24/0x78) from [] (update_process_times+0x34/0x68) [ 11.797940] [] (update_process_times+0x34/0x68) from [] (tick_sched_timer+0x58/0x22c) [ 11.797990] [] (tick_sched_timer+0x58/0x22c) from [] (__run_hrtimer+0x88/0x2b8) [ 11.798029] [] (__run_hrtimer+0x88/0x2b8) from [] (hrtimer_interrupt+0x104/0x30c) [ 11.798076] [] (hrtimer_interrupt+0x104/0x30c) from [] (mxs_timer_interrupt+0x20/0x2c) [ 11.798123] [] (mxs_timer_interrupt+0x20/0x2c) from [] (handle_irq_event_percpu+0x80/0x2f8) [ 11.798161] [] (handle_irq_event_percpu+0x80/0x2f8) from [] (handle_irq_event+0x3c/0x5c) [ 11.798201] [] (handle_irq_event+0x3c/0x5c) from [] (handle_level_irq+0x8c/0x118) [ 11.798239] [] (handle_level_irq+0x8c/0x118) from [] (generic_handle_irq+0x28/0x30) [ 11.798281] [] (generic_handle_irq+0x28/0x30) from [] (handle_IRQ+0x30/0x84) [ 11.798322] [] (handle_IRQ+0x30/0x84) from [] (__irq_svc+0x44/0x88) [ 11.798364] [] (__irq_svc+0x44/0x88) from [] (rt_spin_lock_slowlock+0x60/0x204) [ 11.798402] [] (rt_spin_lock_slowlock+0x60/0x204) from [] (rt_spin_lock+0x28/0x60) [ 11.798451] [] (rt_spin_lock+0x28/0x60) from [] (lock_timer_base+0x28/0x48) [ 11.798494] [] (lock_timer_base+0x28/0x48) from [] (schedule_timeout+0x78/0x254) [ 11.798531] [] (schedule_timeout+0x78/0x254) from [] (rcu_gp_kthread+0x2d4/0x5f0) [ 11.798578] [] (rcu_gp_kthread+0x2d4/0x5f0) from [] (kthread+0xa0/0xa8) [ 11.798621] [] (kthread+0xa0/0xa8) from [] (ret_from_fork+0x14/0x34) Thanks -- Stano -- 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/