Bug 93226

Summary: DEBUG_LOCKS (really stack_save()) causes panics on sparc64
Product: Base System Reporter: Kris Kennaway <kris>
Component: sparc64Assignee: freebsd-sparc64 (Nobody) <sparc64>
Status: Closed FIXED    
Severity: Affects Only Me CC: antoine.brodin
Priority: Normal    
Version: 7.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
sparc64-stack_save.diff none

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.