Re: locking against myself

From: Jerry Toung (jtoung_at_arc.nasa.gov)
Date: 02/19/04

  • Next message: Ted Unangst: "use after free bugs"
    To: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
    Date: Thu, 19 Feb 2004 07:37:48 -0800
    
    

    Thanks a lot Andrey.

    On Thursday 19 February 2004 12:05 am, Andrey Simonenko wrote:
    > On Wed, Feb 18, 2004 at 11:52:26AM -0800, Jerry Toung wrote:
    > > Hello hackers,
    > > I am constantly getting the following message when I run my KLD:
    > >
    > > panic: lockmgr: locking against myself
    > > Debugger("panic")
    > > Stopped at Debugger+0x54: xchgl %ebx,in_Debugger.0
    > > db>
    > >
    > > What could possibly cause this?
    > > It seem to say that I'm locking an already locked variable.
    >
    > Hello Jerry,
    >
    > According to kern/kern_lock.c:lockmgr() your proc/thread already
    > has an exclusive lock and it tries to obtain a recursive exclusive
    > lock and lock doesn't have LK_CANRECURSE flag (also you allow to
    > sleep in lockmng()).
    >
    > This is documented in lock(9) manual page:
    >
    > LK_EXCLUSIVE Acquire an exclusive lock. If an exclusive
    > lock is already held, and LK_CANRECURSE is not
    > set, the system will panic(9).

    -- 
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: Ted Unangst: "use after free bugs"

    Relevant Pages

    • [UNIX] File Locking Local Denial of Service (Sendmails Impact)
      ... Any application which uses either flockor fcntlstyle locking or ... Since this attack requires a user to use their own account to lock a file, ... process holds an exclusive lock on a file, no other process can obtain an ... File locking is used throughout Sendmail for a variety of files including ...
      (Securiteam)
    • Re: Correct file locking techniques
      ... I have found that the most portable and least hassle way to lock files ... such as locking DBM-type files to which you wish to ... exclusive lock for (write another file, tie a hash to a DBM-type file, ... you wanted the shared lock for. ...
      (comp.lang.perl.misc)
    • Re: file locking
      ... What's the point of a lock if it isn't locking anybody else out? ... A shared lock locks out anyone who wants an exclusive lock. ...
      (comp.lang.ruby)
    • Re: using clustered index to optimize inserts ...
      ... I will try to explain locking in terms of Sybase docs... ... Allpages Locking: Allpages locking locks both data pages and index ... the data page is locked with an exclusive lock. ... Clustered Index: The datarows will be arranged as per the clustered ...
      (comp.databases.sybase)
    • Re: CSingleLock - known behaviour?
      ... It is better to design code that doesn't require locking. ... If you don't need the resource, don't lock it. ... magnitude less efficient, than locking once. ...
      (microsoft.public.vc.mfc)