Re: Incorrect comparison of ticks in deadlkres

2013-05-28 Thread Attilio Rao
On Wed, May 29, 2013 at 1:18 AM, Ryan Stone wrote: > On Tue, May 28, 2013 at 5:29 PM, Ian Lepore wrote: >> >> ticks is defined as a signed integer but conceptually it is unsigned -- >> it increments from 0 to UINT_MAX (not INT_MAX) then rolls over. If >> td->td_blktick is captured while ticks =

Re: Incorrect comparison of ticks in deadlkres

2013-05-28 Thread Ryan Stone
On Tue, May 28, 2013 at 5:29 PM, Ian Lepore wrote: > ticks is defined as a signed integer but conceptually it is unsigned -- > it increments from 0 to UINT_MAX (not INT_MAX) then rolls over. If > td->td_blktick is captured while ticks = UINT_MAX and later ticks has > rolled over and counted back

Re: Incorrect comparison of ticks in deadlkres

2013-05-28 Thread Ian Lepore
On Sun, 2013-05-26 at 02:53 +0200, Attilio Rao wrote: > On Sat, May 25, 2013 at 11:55 PM, Ryan Stone wrote: > > Currently deadlkres performs the following comparison when trying to check > > for threads that have been blocked on a mutex or sleeping on an sx lock: > > > > if (TD_ON_LOCK(td) && tick

Re: Incorrect comparison of ticks in deadlkres

2013-05-25 Thread Attilio Rao
On Sat, May 25, 2013 at 11:55 PM, Ryan Stone wrote: > Currently deadlkres performs the following comparison when trying to check > for threads that have been blocked on a mutex or sleeping on an sx lock: > > if (TD_ON_LOCK(td) && ticks < td->td_blktick) { > /* check for deadlock...*/ Yes the

Incorrect comparison of ticks in deadlkres

2013-05-25 Thread Ryan Stone
Currently deadlkres performs the following comparison when trying to check for threads that have been blocked on a mutex or sleeping on an sx lock: if (TD_ON_LOCK(td) && ticks < td->td_blktick) { /* check for deadlock...*/ The test against ticks is incorrect. It results in deadlkres only si