[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:FYI- JProbe Threadalyzer



Peter, I _knew_ you wouldn't like this! How did you discovered this
product, Richard? It is a very good case for this comunity!

Exact words from
http://services.klgroup.com/pub/evals/jprobe-2.0-getting-started.pdf 

Thread stalls
..
Threadalyzer reports the following as possible thread stalls:
* If you configure it to do so, Threadalyzer will report when a 
  thread blocks, waiting to acquire a lock and does not acquire 
  the lock within a user-defined time.
* When a thread waits (wait() is called with no timeout value)
  for a notify() event that is not sent within a user defined time.

Threadalyzer will flag thread stalls as potential problems in your 
programs. Threadalyzer lets you control how long a thread must be
inactive before being flagged as stalled by the analyzer. This is 
done in the Threadalyzer tab of the Run Settings dialog.
..
Data Races
..
Sometimes, data races may be insignificant in the outcome of the
program, but more often than not, they can lead to unexpected 
results that are hard to debug. In short, data races are concurrency
problems waiting to rear their ugly heads. Threadalyzer will identify
any data races it encounters while running your program, and flag 
them for you to fix. Note that data race detection is resource 
intensive, and may slow down Threadalyzer performance.

--
Enough for their paper.

Perhaps we should be happy that they're addressing the problem! There
a product there, they say this is a problem, and they don't offer any
real solution! 

The thing I was wandering about when I wrote "Run-time version of occam
usage rules?" was: these kind of race hazards, as far as I can see,
they won't even pass the occam compiler. Right?

> Do they give any examples to demonstrate what they are really doing?

Just one code example of a deadlock thay they detect:

class Deadlocker
{
  int field_1; private Object lock_1 = new int[1];
  int field_2; private Object lock_2 = new int[1];
  public void method1( int value )
  { synchronized( lock_1 )
    { synchronized( lock_2 )
      {
        field_1 = 0;
        field_2 = 0;
      }
    }
  }
  public void method2( int value )
  { synchronized( lock_2 )
    { synchronized( lock_1 )
      {
        field_1 = 0;
        field_2 = 0;
      }
    }
  }
}

Nothing about how they do this. In any case, those technicalities
are very interesting!

-- 

|=======================================|==========================|
| Oyvind Teig                           | oyvind.teig@xxxxxxxxxxxx |
| Navia Maritime AS, division Autronica | oyvind.teig@xxxxxxxxxxxx |
| 7005 Trondhem     |    http://www.navia.no | Tel:+47 73 58 12 68 |
| Norway            |http://www.autronica.no | Fax:+47 73 91 93 20 |
|===================|========================|=====================|