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

RpcConnectionPool::getConnection can cause NPE at initialization

    Details

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

      Description

      I can see the following NPE exception when I submit the first query after cluster startup. Although the NPE does not abort a running query, it should be fixed.

      2014-09-02 09:41:12,925 INFO org.apache.tajo.worker.TajoResourceAllocator: Start TajoWorkerAllocationThread
      2014-09-02 09:41:12,970 INFO org.apache.tajo.worker.TajoResourceAllocator: Stop TajoWorkerAllocationThread
      2014-09-02 09:41:12,970 INFO org.apache.tajo.master.querymaster.SubQuery: SubQuery (eb_1409618466499_0001_000001) has 3 containers!
      2014-09-02 09:41:13,010 ERROR org.apache.tajo.master.ContainerProxy: 
      java.lang.NullPointerException
      	at org.apache.tajo.rpc.RpcConnectionPool.getConnection(RpcConnectionPool.java:87)
      	at org.apache.tajo.master.TajoContainerProxy.assignExecutionBlock(TajoContainerProxy.java:99)
      	at org.apache.tajo.master.TajoContainerProxy.launch(TajoContainerProxy.java:70)
      	at org.apache.tajo.worker.TajoResourceAllocator$LaunchRunner.run(TajoResourceAllocator.java:170)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:744)
      2014-09-02 09:41:13,010 ERROR org.apache.tajo.master.ContainerProxy: 
      java.lang.NullPointerException
      	at org.apache.tajo.rpc.RpcConnectionPool.getConnection(RpcConnectionPool.java:87)
      	at org.apache.tajo.master.TajoContainerProxy.assignExecutionBlock(TajoContainerProxy.java:99)
      	at org.apache.tajo.master.TajoContainerProxy.launch(TajoContainerProxy.java:70)
      	at org.apache.tajo.worker.TajoResourceAllocator$LaunchRunner.run(TajoResourceAllocator.java:170)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:744)
      2014-09-02 09:41:13,031 INFO org.apache.tajo.worker.TaskRunner: Tajo Root Dir: hdfs://localhost:8020/tajo
      2014-09-02 09:41:13,031 INFO org.apache.tajo.worker.TaskRunner: Worker Local Dir: /tmp/tajo-hyunsik/tmpdir
      2014-09-02 09:41:13,047 INFO org.apache.tajo.worker.TaskRunner: QueryMaster Address:/172.20.10.7:28093
      2014-09-02 09:41:13,048 INFO org.apache.tajo.worker.TaskRunnerManager: Start TaskRunner:eb_1409618466499_0001_000001,container_1409618466499_0001_01_000003
      

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #358 (See https://builds.apache.org/job/Tajo-master-build/358/)
        TAJO-1024: RpcConnectionPool::getConnection can cause NPE at initialization. (hyunsik: rev e6e164f15f485661932e4fb6e866f93a7c2f5935)

        • tajo-rpc/src/main/java/org/apache/tajo/rpc/RpcConnectionPool.java
        • CHANGES
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #358 (See https://builds.apache.org/job/Tajo-master-build/358/ ) TAJO-1024 : RpcConnectionPool::getConnection can cause NPE at initialization. (hyunsik: rev e6e164f15f485661932e4fb6e866f93a7c2f5935) tajo-rpc/src/main/java/org/apache/tajo/rpc/RpcConnectionPool.java CHANGES
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/tajo/pull/139

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/139
        Hide
        hyunsik Hyunsik Choi added a comment -

        committed.

        Show
        hyunsik Hyunsik Choi added a comment - committed.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user jinossy commented on the pull request:

        https://github.com/apache/tajo/pull/139#issuecomment-55549115

        +1
        Thanks you for your work!

        Show
        githubbot ASF GitHub Bot added a comment - Github user jinossy commented on the pull request: https://github.com/apache/tajo/pull/139#issuecomment-55549115 +1 Thanks you for your work!
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user hyunsik opened a pull request:

        https://github.com/apache/tajo/pull/139

        TAJO-1024: RpcConnectionPool::getConnection can cause NPE at initialization

        It's concurrency bug. So, it is hard to reproduce the case. So, I omitted the unit tests. But, it definitely fixes the bug. After I apply it, I couldn't see the bug again. @jinossy helped this work.

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/hyunsik/tajo TAJO-1024

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/tajo/pull/139.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #139


        commit faba3e372e8f9397f73a627db9c65f9467ae27a8
        Author: Hyunsik Choi <hyunsik@apache.org>
        Date: 2014-09-14T13:06:08Z

        TAJO-1024: RpcConnectionPool::getConnection can cause NPE at initialization.


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user hyunsik opened a pull request: https://github.com/apache/tajo/pull/139 TAJO-1024 : RpcConnectionPool::getConnection can cause NPE at initialization It's concurrency bug. So, it is hard to reproduce the case. So, I omitted the unit tests. But, it definitely fixes the bug. After I apply it, I couldn't see the bug again. @jinossy helped this work. You can merge this pull request into a Git repository by running: $ git pull https://github.com/hyunsik/tajo TAJO-1024 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/139.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #139 commit faba3e372e8f9397f73a627db9c65f9467ae27a8 Author: Hyunsik Choi <hyunsik@apache.org> Date: 2014-09-14T13:06:08Z TAJO-1024 : RpcConnectionPool::getConnection can cause NPE at initialization.

          People

          • Assignee:
            hyunsik Hyunsik Choi
            Reporter:
            hyunsik Hyunsik Choi
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development