Bug 93226 - DEBUG_LOCKS (really stack_save()) causes panics on sparc64
Summary: DEBUG_LOCKS (really stack_save()) causes panics on sparc64
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: sparc64 (show other bugs)
Version: 7.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-sparc64 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-12 06:30 UTC by Kris Kennaway
Modified: 2006-02-19 11:58 UTC (History)
1 user (show)

See Also:


Attachments
sparc64-stack_save.diff (713 bytes, patch)
2006-02-13 11:44 UTC, Antoine Brodin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kris Kennaway freebsd_committer freebsd_triage 2006-02-12 06:30:06 UTC
With option DEBUG_LOCKS in the kernel, the stack(9) code that is
intended to save stack traces when lockmgr locks are acquired is
broken:

> panic: trap: fast data access mmu miss
> cpuid = 1
> KDB: enter: panic
> [thread pid 1 tid 100009 ]
> Stopped at      kdb_enter+0x3c: ta              %xcc, 1
> db> wh
> Tracing pid 1 tid 100009 td 0xfffff800fed24750
> panic() at panic+0x164
> trap() at trap+0x418
> -- fast data access mmu miss tar=0x7fdffffe000 %o7=0xc027c940 --
> stack_save() at stack_save+0x24
[...]

Fix: 

A similar bug existed on i386, and was fixed in

  http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/i386/db_trace.c.diff?r1=1.69&r2=1.70
How-To-Repeat: 
Build and boot a kernel with options DEBUG_LOCKS
Comment 1 Antoine Brodin 2006-02-13 11:44:34 UTC
Here is a proposed patch.

It is untested (just compile tested) since I don't have this hardware.
Comment 2 Marius Strobl freebsd_committer freebsd_triage 2006-02-19 11:55:16 UTC
State Changed
From-To: open->closed


Close; fixed in sys/sparc64/sparc64/db_trace.c rev. 1.25, 
sys/sparc64/sparc64/exception.S rev. 1.72.