Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-821

IllegalStateException occurs when a NettyClientBase object is created within single thread.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0, 0.8.1
    • Component/s: None
    • Labels:
      None

      Description

      When I created a TajoClient instance which uses a NettyClientBase on a TajoMaster's RPC handler, the following exception occurs.

          
      java.lang.IllegalStateException: await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread.
      at org.jboss.netty.channel.DefaultChannelFuture.checkDeadLock(DefaultChannelFuture.java:343)
      at org.jboss.netty.channel.DefaultChannelFuture.await0(DefaultChannelFuture.java:307)
      at org.jboss.netty.channel.DefaultChannelFuture.await(DefaultChannelFuture.java:248)
      at com.cloudhopper.smpp.impl.DefaultSmppClient.createConnectedChannel(DefaultSmppClient.java:266)
      at com.cloudhopper.smpp.impl.DefaultSmppClient.doOpen(DefaultSmppClient.java:216)
      at com.cloudhopper.smpp.impl.DefaultSmppClient.bind(DefaultSmppClient.java:185)
      

      There is some issues about this error in Netty 3.6. Check the following url.
      https://community.jboss.org/thread/221243

      This issue can be resolved by setting the deadLockChecker to false.

      DefaultChannelFuture.setUseDeadLockChecker(false);
      

      But this solution is to have a potential problem. So I suggest that NettyClientBase uses ChannelFutureListener.operationComplete() instead of awaitUninterruptibly()

      1. TAJO-821.patch
        0.7 kB
        Hyoungjun Kim

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-0.8.1-build #99 (See https://builds.apache.org/job/Tajo-0.8.1-build/99/)
        TAJO-821: IllegalStateException occurs when a NettyClientBase object is created within single thread. (hyoungjunkim via jinho) (jinossy: rev 49bc60b4d3c8fecd1b1c6df469c396ba38dfe7e9)

        • tajo-rpc/src/main/java/org/apache/tajo/rpc/NettyClientBase.java
        • CHANGES
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-0.8.1-build #99 (See https://builds.apache.org/job/Tajo-0.8.1-build/99/ ) TAJO-821 : IllegalStateException occurs when a NettyClientBase object is created within single thread. (hyoungjunkim via jinho) (jinossy: rev 49bc60b4d3c8fecd1b1c6df469c396ba38dfe7e9) tajo-rpc/src/main/java/org/apache/tajo/rpc/NettyClientBase.java CHANGES
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-master-build #219 (See https://builds.apache.org/job/Tajo-master-build/219/)
        TAJO-821: IllegalStateException occurs when a NettyClientBase object is created within single thread. (hyoungjunkim via jinho) (jinossy: rev d0528d1bcb5b57b2287fd435701234cd226e8ac2)

        • CHANGES
        • tajo-rpc/src/main/java/org/apache/tajo/rpc/NettyClientBase.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-build #219 (See https://builds.apache.org/job/Tajo-master-build/219/ ) TAJO-821 : IllegalStateException occurs when a NettyClientBase object is created within single thread. (hyoungjunkim via jinho) (jinossy: rev d0528d1bcb5b57b2287fd435701234cd226e8ac2) CHANGES tajo-rpc/src/main/java/org/apache/tajo/rpc/NettyClientBase.java
        Hide
        jhkim Jinho Kim added a comment -

        I've just committed it to both master branch and branch-0.8.1.
        Thank you for your contribution!

        Show
        jhkim Jinho Kim added a comment - I've just committed it to both master branch and branch-0.8.1. Thank you for your contribution!
        Hide
        jhkim Jinho Kim added a comment -

        +1 for the patch
        I've verified 'mvn clean install' and local cluster

        Show
        jhkim Jinho Kim added a comment - +1 for the patch I've verified 'mvn clean install' and local cluster
        Hide
        tajoqa Tajo QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12644795/TAJO-821.patch
        against master revision 9350a80.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The applied patch does not increase the total number of javadoc warnings.

        +1 checkstyle. The patch generated 0 code style errors.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in tajo-rpc.

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/426//testReport/
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/426//console

        This message is automatically generated.

        Show
        tajoqa Tajo QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12644795/TAJO-821.patch against master revision 9350a80. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The applied patch does not increase the total number of javadoc warnings. +1 checkstyle. The patch generated 0 code style errors. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in tajo-rpc. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/426//testReport/ Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/426//console This message is automatically generated.
        Hide
        hyunsik Hyunsik Choi added a comment -

        Thank you for your contribution.

        Jinho Kim,

        Could you review this? You may know this part more than me.

        Show
        hyunsik Hyunsik Choi added a comment - Thank you for your contribution. Jinho Kim , Could you review this? You may know this part more than me.
        Hide
        hjkim Hyoungjun Kim added a comment -

        There is some missing code in the TAJO-812 patch.

        Show
        hjkim Hyoungjun Kim added a comment - There is some missing code in the TAJO-812 patch.
        Hide
        hjkim Hyoungjun Kim added a comment -

        This issue already resolved by TAJO-812.

        Show
        hjkim Hyoungjun Kim added a comment - This issue already resolved by TAJO-812 .

          People

          • Assignee:
            hjkim Hyoungjun Kim
            Reporter:
            hjkim Hyoungjun Kim
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development