Debugging rw lock
Ian Lepore
ian at FreeBSD.org
Thu Feb 13 21:06:33 UTC 2014
Does option DEADLKRES not work with rwlocks? (I've never used it, just
seen it in the NOTES).
-- Ian
On Thu, 2014-02-13 at 12:59 -0800, Vijay Singh wrote:
> You're talking about instrumenting the code, right? But which thread? I was
> thinking of augmenting the rw lock to record the readers, but wanted to
> check if something is possible without instrumentation.
>
>
> On Thu, Feb 13, 2014 at 12:53 PM, Alfred Perlstein <bright at mu.org> wrote:
>
> > Keep a stack of rwlocks owned in the struct thread.
> >
> > -Alfred
> >
> > On 2/13/14, 12:51 PM, Vijay Singh wrote:
> >
> >> I am running into an issue where an rw lock is read locked and never
> >> unlocked, and causes a system to livelock. I was wondering if its possible
> >> to figure out which thread owns the read lock?
> >>
> >> It's the tcp pcbinfo lock.
> >>
> >> (kgdb-amd64-7.4-08) show_rwlock rw
> >> name : tcp
> >> class: rw
> >> flags: {SLEEP, INITED, WITNESS, RECURSE, UPGRADABLE}
> >> state: RLOCK: 1 locks
> >> waiters: writers
> >>
> >> Any help is appreciated.
> >>
> >> -vijay
> >> _______________________________________________
> >> freebsd-hackers at freebsd.org mailing list
> >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org
> >> "
> >>
> >>
> >
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
More information about the freebsd-hackers
mailing list