On Wed, Sep 12, 2012 at 02:18:06PM +0200, Maxim Bourmistrov wrote:
> Hi,
> 
> I'm getting "panic: mtx_enter: locking against myself" on not so
> -current OpenBSD 5.2-current (snapshot).
> 
> Machine is not dropping into ddb even if sysctl.conf says it should.
> Console is filled with "panic: mtx_enter: locking against myself"
> and seems to loop.

Hi!

Can we add something along these lines, to know at least something useful
in these cases?  Maybe, if someone had the binary/symbol table lying around,
one could trace where it came from (somewhere near ddb entry perhaps?).

Haven't tested it, though :-(
--
Martin Pelikan


Index: arch/amd64/amd64/mutex.S
===================================================================
RCS file: /cvs/src/sys/arch/amd64/amd64/mutex.S,v
retrieving revision 1.8
diff -u -p -r1.8 mutex.S
--- arch/amd64/amd64/mutex.S    24 Sep 2010 13:21:30 -0000      1.8
+++ arch/amd64/amd64/mutex.S    12 Sep 2012 17:51:02 -0000
@@ -83,9 +83,10 @@ ENTRY(mtx_enter)
        jz      1b
        jmp     3b
 #ifdef DIAGNOSTIC
-4:     movq    $5f, %rdi
+4:     movq    %rdi, %rsi
+       movq    $5f, %rdi
        call    _C_LABEL(panic)
-5:     .asciz  "mtx_enter: locking against myself"
+5:     .asciz  "mtx_enter: locking against myself, %p"
 #endif
 
 ENTRY(mtx_enter_try)

Reply via email to