This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/6487] kernel.function("internal_add_timer") freezes system.
- From: "mhiramat at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 7 May 2008 18:15:49 -0000
- Subject: [Bug runtime/6487] kernel.function("internal_add_timer") freezes system.
- References: <20080507143402.6487.mhiramat@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From mhiramat at redhat dot com 2008-05-07 18:15 -------
(In reply to comment #0)
> I ran the below command:
>
> $ stap -e 'probe kernel.function("internal_add_timer") {printf("%s\n",pp())}'
>
> It worked few seconds. However, after a while, the system was frozen.
I tested it on x86-64.
Fortunately, this time, I found a deadlock on mod_timer.
---
BUG: spinlock lockup on CPU#0, swapper/0, ffffffff809bba80
Pid: 0, comm: swapper Not tainted 2.6.25 #10
Call Trace:
<#DB> [<ffffffff8033317c>] ? __delay+0x18/0x24
[<ffffffff803365fa>] _raw_spin_lock+0xfb/0x123
[<ffffffff804a2945>] _spin_lock+0x2d/0x31
[<ffffffff8023e22c>] __mod_timer+0x8e/0xca
[<ffffffff8026d266>] relay_switch_subbuf+0xa2/0x130
[<ffffffff8852a306>]
:stap_2a9a9c2834db4b34b8386b192ef333bb_390:stp_print_flush+0xb8/0xc9
[<ffffffff8852bc10>]
:stap_2a9a9c2834db4b34b8386b192ef333bb_390:probe_1062+0xd8/0x107
[<ffffffff8852f08e>]
:stap_2a9a9c2834db4b34b8386b192ef333bb_390:enter_kprobe_probe+0x14a/0x2d4
[<ffffffff804a4381>] kprobe_exceptions_notify+0x1ad/0x402
[<ffffffff804a52e9>] notifier_call_chain+0x33/0x5b
[<ffffffff804a536b>] __atomic_notifier_call_chain+0x5a/0x83
[<ffffffff804a53a3>] atomic_notifier_call_chain+0xf/0x11
[<ffffffff8024bd30>] notify_die+0x2e/0x30
[<ffffffff804a3c3c>] do_int3+0x43/0xaa
[<ffffffff804a3333>] int3+0x93/0xb0
[<ffffffff8023dac4>] ? internal_add_timer+0x1/0xbd
<<EOE>> <IRQ> [<ffffffff8023e24a>] ? __mod_timer+0xac/0xca
[<ffffffff8023e420>] ? mod_timer+0x25/0x27
[<ffffffff8852e082>] ?
:stap_2a9a9c2834db4b34b8386b192ef333bb_390:__stp_time_timer_callback+0x8d/0xb7
[<ffffffff8852dff5>] ?
:stap_2a9a9c2834db4b34b8386b192ef333bb_390:__stp_time_timer_callback+0x0/0xb7
[<ffffffff8023dd92>] ? run_timer_softirq+0x14c/0x1c6
[<ffffffff8023a5d9>] ? __do_softirq+0x5f/0xe3
[<ffffffff8020d12c>] ? call_softirq+0x1c/0x28
[<ffffffff8020ea77>] ? do_softirq+0x39/0x8a
[<ffffffff8023a578>] ? irq_exit+0x4e/0x50
[<ffffffff8021df7c>] ? smp_apic_timer_interrupt+0x8b/0xa7
[<ffffffff8020cbdb>] ? apic_timer_interrupt+0x6b/0x70
<EOI> [<ffffffff8020ae9d>] ? default_idle+0x43/0x73
[<ffffffff8020ae9b>] ? default_idle+0x41/0x73
[<ffffffff8020ae5a>] ? default_idle+0x0/0x73
[<ffffffff8020af4c>] ? cpu_idle+0x7f/0x9d
[<ffffffff8048ca36>] ? rest_init+0x5a/0x5c
---
Hmm, relay_switch_subbuf() calls __mod_timer() for waking a reader process up.
And, the __mod_timer() acquires a spin lock of timer->base->lock which has been
acquired in the previous __mod_timer(). So it causes a deadlock.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6487
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.