From: Manfred Spraul <manfred@colorfullife.com>
To: Robert Love <rml@tech9.net>
Cc: linux-kernel@vger.kernel.org, "Shawn Starr" <spstarr@sh0n.net>
Subject: Re: [PANIC][2.5.66bk3+] run_timer_softirq - IRQ Mishandlings
Date: Sat, 29 Mar 2003 23:10:27 +0100 [thread overview]
Message-ID: <3E8619D3.7070201@colorfullife.com> (raw)
Robert wrote:
>> Code: 89 50 04 89 02 c7 41 30 00 00 00 00 81 3d 60 98 41 c0 3c 4b
>> kernel/timer.c:258: spin_lock(kernel/timer.c:c0419860) already locked by
>> kernel/timer.c/398
>> Kernel panic: Aiee, killing interrupt handler!
>> In interrupt handler - not syncing
>
>This is not a panic, just an oops. And it was just a debugging check
>from spin lock debugging, but unfortunately you were in an interrupt
>handler so the machine went bye bye.
>
>It is probably a simple double-lock deadlock, detected by spin lock
>debugging. Knowing the EIP would help... but timer_interrupt() is a
>good first guess.
>
>
No, this is wrong. spinlock debugging never forces an oops, it just
complains with printk and tries to continue.
What happened is that someone registered a timer, and then kfreed the
timer while it was still active. Then the call from run_timers() caused
a crash, which corrupted the spinlock state, which provoked a spinlock
debugging message.
Shawn: If you want to debug this, then you should try to print the "last
user" field of the slab object that contains the timer. Add a test into
run_timers that checks if timer->function is < 0xC0000000.
Something like
kmem_cache_t *c = GET_PAGE_CACHE(virt_to_page(timer));
struct slab *slabp = GET_PAGE_SLAB(virt_to_page(timer));
void * obj = slabp->s_mem+c->objsize*((timer-slabp->s_mem)/c->objsize);
unsigned long last_user = *(unsigned
long*)(obj+c->objsize-BYTE_PER_WORD);
finds address of the last caller of kfree() or kmem_cache_free() on the
slab object. It only works if slab debugging is enabled. Just print
last_user, and look it up in System.map. Or use print_symbol (see
mm/slab.c for an example).
If you need help I can write a patch.
--
Manfred
next reply other threads:[~2003-03-29 21:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-29 22:10 Manfred Spraul [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-03-29 20:45 [PANIC][2.5.66bk3+] run_timer_softirq - IRQ Mishandlings Shawn Starr
2003-03-29 21:15 ` Robert Love
2003-03-31 2:52 ` Zwane Mwaikambo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E8619D3.7070201@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rml@tech9.net \
--cc=spstarr@sh0n.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox