0

看到非常奇怪的行为。我的代码执行良好,但不确定发生了什么,方法正在调用其他方法但没有调用其他方法(我看不到其他方法第一行中的日志)

"jaxws-engine-1-thread-2" id=447 idx=0x73c tid=4031 prio=5 alive, parked, native_blocked, daemon
    at jrockit/vm/Locks.park0(J)V(Native Method)
    at jrockit/vm/Locks.park(Locks.java:2230)
    at sun/misc/Unsafe.park(ZJ)V(Native Method)
    at java/util/concurrent/locks/LockSupport.parkNanos(LockSupport.java:196)
    at java/util/concurrent/SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
    at java/util/concurrent/SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
    at java/util/concurrent/SynchronousQueue.poll(SynchronousQueue.java:874)
    at java/util/concurrent/ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:955)
    at java/util/concurrent/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:917)
    at java/lang/Thread.run(Thread.java:682)
    at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
    -- end of trace

代码 -

  public static void startMicroSessionTimer(TimerName timerName, Data Data) {
        logger.debug("Starting a micro-timer for timer name: " + timerName);
        //Start a micro timer to process the soap response in worker thread
        SipApplicationSession applicationSession = Util.getAppSession((String)Data.get(DataAttribute.ID));
        Util. AbcTimer (applicationSession, 1L, timerName.getTimerName());
  }


public static void AbcTimer(SipApplicationSession appSession,
            long timeInMillies, String timerName) {

        logger.debug("Inside AbcTimer”);
        //Some Logic
}

日志 -

16 May 2018 09:13:07,506 [jaxws-engine-1-thread-12] DEBUG -----SOME LOGS…..
16 May 2018 09:13:07,506 [jaxws-engine-1-thread-12] DEBUG [AbcUtils] [ODhlNjQ0ZjAzMTMzN2U5MGNhMTE2MTgxOTg2MTdmYjA.] Starting a micro-timer for timer name: HAHAHA

在 Thread 的上述行之后无法看到任何日志jaxws-engine-1-thread-12。根据日志,该日志Inside AbcTimer应该在被调用方法(即 AbcTimer)的开头出现。没有发生异常。

我也采用了上面发布的 ThreadDump。

不确定,但认为这是特定于机器的问题。也谷歌它,看到其他人也发生了这种类型的问题,但我没有得到解决方案。

使用以下 JRocket 版本

java version "1.6.0_141"
Java(TM) SE Runtime Environment (build 1.6.0_141-b12)
Oracle JRockit(R) (build R28.3.13-15-173128-1.6.0_141-20161219-1845-linux-x86_64, compiled mode)
4

0 回答 0