1 Reply Latest reply on Dec 5, 2007 4:56 AM by gonzalad

    Critical bug with WebSphere

    Dmitriy Lapko Newbie

      Environment:
      IMB WebSphere 6.1.0.11

      D:\Program Files\IBM\WebSphere61\AppServer\java\jre\bin>java.exe -version
      java version "1.5.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build pwi32devifx-20070608 (SR5+IY99712))
      IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20070426 (JIT enabled)
      J9VM - 20070420_12448_lHdSMR
      JIT - 20070419_1806_r8
      GC - 200704_19)
      JCL - 20070608

      Application has some JavaBeans in Session scope. After some crazy stress tests it hangs.

      Reason - ReentranceLock in J9 can work in infinite loop. Description of similar bug in Sun JVM - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6241823

      The worst thing - the whole web server hangs and 100% uses processor. Possible way to avoid it - don't set to true

      private ReentrantLock lock = new ReentrantLock(true);


      in SynchronizationInterceptor.

      How to reproduce bug in WebSphere - run next code:
       Semaphore sem = new Semaphore(0,true);
       System.out.println(sem.tryAcquire(100,TimeUnit.MILLISECONDS));
       System.out.println(sem.tryAcquire(100,TimeUnit.MILLISECONDS));
       System.out.println("OK!");


      In Sun JVM it works ok, in IBM J9 - hangs.

      Should I post a JIRA issue?