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

Unexpected IllegalMonitorStateException can be thrown in QueryInProgress

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11.0, 0.10.1
    • Component/s: None
    • Labels:
      None

      Description

      ReentrantReadWriteLock.WriteLock.unlock() throws IllegalMonitorStateException when the lock is not acquired by current thread.

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #626 (See https://builds.apache.org/job/Tajo-master-build/626/)
        TAJO-1396 Unexpected IllegalMonitorStateException can be thrown in QueryInProgress (jhkim: rev a9215852d4bf9e5d7a29598a992ef1884f098d4b)

        • CHANGES
        • tajo-core/src/main/java/org/apache/tajo/master/QueryManager.java
        • tajo-core/src/main/java/org/apache/tajo/master/QueryInProgress.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #626 (See https://builds.apache.org/job/Tajo-master-build/626/ ) TAJO-1396 Unexpected IllegalMonitorStateException can be thrown in QueryInProgress (jhkim: rev a9215852d4bf9e5d7a29598a992ef1884f098d4b) CHANGES tajo-core/src/main/java/org/apache/tajo/master/QueryManager.java tajo-core/src/main/java/org/apache/tajo/master/QueryInProgress.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-master-CODEGEN-build #264 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/264/)
        TAJO-1396 Unexpected IllegalMonitorStateException can be thrown in QueryInProgress (jhkim: rev a9215852d4bf9e5d7a29598a992ef1884f098d4b)

        • CHANGES
        • tajo-core/src/main/java/org/apache/tajo/master/QueryInProgress.java
        • tajo-core/src/main/java/org/apache/tajo/master/QueryManager.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-CODEGEN-build #264 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/264/ ) TAJO-1396 Unexpected IllegalMonitorStateException can be thrown in QueryInProgress (jhkim: rev a9215852d4bf9e5d7a29598a992ef1884f098d4b) CHANGES tajo-core/src/main/java/org/apache/tajo/master/QueryInProgress.java tajo-core/src/main/java/org/apache/tajo/master/QueryManager.java
        Hide
        jhkim Jinho Kim added a comment -

        committed it.
        Thank you for your contribution

        Show
        jhkim Jinho Kim added a comment - committed it. Thank you for your contribution
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

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

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

        Github user jinossy commented on the pull request:

        https://github.com/apache/tajo/pull/416#issuecomment-85323118

        +1 This PR will remove the possible IllegalMonitorStateException

        Show
        githubbot ASF GitHub Bot added a comment - Github user jinossy commented on the pull request: https://github.com/apache/tajo/pull/416#issuecomment-85323118 +1 This PR will remove the possible IllegalMonitorStateException
        Hide
        jhkim Jinho Kim added a comment -

        Navis
        I just want to know the cause of interrupt because a possible point is master shutdown.
        If you give a more in-depth clarification, we can fix a possible hidden bug

        Show
        jhkim Jinho Kim added a comment - Navis I just want to know the cause of interrupt because a possible point is master shutdown. If you give a more in-depth clarification, we can fix a possible hidden bug
        Hide
        navis Navis added a comment -

        It would be very hard to produce the exception. As described in summary, it's just a possibility. But for lock-things, it will happen someday once.

        Show
        navis Navis added a comment - It would be very hard to produce the exception. As described in summary, it's just a possibility. But for lock-things, it will happen someday once.
        Hide
        jhkim Jinho Kim added a comment -

        Sorry for confusing you.
        Can you add real error trace logs in jira description ?

        Show
        jhkim Jinho Kim added a comment - Sorry for confusing you. Can you add real error trace logs in jira description ?
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user navis commented on the pull request:

        https://github.com/apache/tajo/pull/416#issuecomment-82935996

        Added more log messages

        Show
        githubbot ASF GitHub Bot added a comment - Github user navis commented on the pull request: https://github.com/apache/tajo/pull/416#issuecomment-82935996 Added more log messages
        Hide
        jhkim Jinho Kim added a comment -

        Navis
        Can you add some error logs ? It will be help to review

        Show
        jhkim Jinho Kim added a comment - Navis Can you add some error logs ? It will be help to review
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user navis commented on a diff in the pull request:

        https://github.com/apache/tajo/pull/416#discussion_r26628704

        — Diff: tajo-core/src/main/java/org/apache/tajo/master/QueryInProgress.java —
        @@ -163,6 +168,12 @@ public void submmitQueryToMaster() {

        try

        { writeLock.lockInterruptibly(); + }

        catch (Exception e)

        { + LOG.error(e.getMessage(), e); + return; + }

        + try {
        + writeLock.lockInterruptibly();
        — End diff –

        Ah, you are saying on this. Forgot to remove it, sorry

        Show
        githubbot ASF GitHub Bot added a comment - Github user navis commented on a diff in the pull request: https://github.com/apache/tajo/pull/416#discussion_r26628704 — Diff: tajo-core/src/main/java/org/apache/tajo/master/QueryInProgress.java — @@ -163,6 +168,12 @@ public void submmitQueryToMaster() { try { writeLock.lockInterruptibly(); + } catch (Exception e) { + LOG.error(e.getMessage(), e); + return; + } + try { + writeLock.lockInterruptibly(); — End diff – Ah, you are saying on this. Forgot to remove it, sorry
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user navis commented on a diff in the pull request:

        https://github.com/apache/tajo/pull/416#discussion_r26570331

        — Diff: tajo-core/src/main/java/org/apache/tajo/master/QueryInProgress.java —
        @@ -163,6 +168,12 @@ public void submmitQueryToMaster() {

        try

        { writeLock.lockInterruptibly(); + }

        catch (Exception e) {
        — End diff –

        It just excluded locking from try/finally clause, avoiding releasing lock which is not held by the thread.

        Show
        githubbot ASF GitHub Bot added a comment - Github user navis commented on a diff in the pull request: https://github.com/apache/tajo/pull/416#discussion_r26570331 — Diff: tajo-core/src/main/java/org/apache/tajo/master/QueryInProgress.java — @@ -163,6 +168,12 @@ public void submmitQueryToMaster() { try { writeLock.lockInterruptibly(); + } catch (Exception e) { — End diff – It just excluded locking from try/finally clause, avoiding releasing lock which is not held by the thread.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user jihoonson commented on a diff in the pull request:

        https://github.com/apache/tajo/pull/416#discussion_r26355505

        — Diff: tajo-core/src/main/java/org/apache/tajo/master/QueryInProgress.java —
        @@ -163,6 +168,12 @@ public void submmitQueryToMaster() {

        try

        { writeLock.lockInterruptibly(); + }

        catch (Exception e) {
        — End diff –

        I have a question.
        Would you explain why writeLock.lockInterruptibly() is called subsequently?

        Show
        githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/416#discussion_r26355505 — Diff: tajo-core/src/main/java/org/apache/tajo/master/QueryInProgress.java — @@ -163,6 +168,12 @@ public void submmitQueryToMaster() { try { writeLock.lockInterruptibly(); + } catch (Exception e) { — End diff – I have a question. Would you explain why writeLock.lockInterruptibly() is called subsequently?
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user navis opened a pull request:

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

        TAJO-1396 Unexpected IllegalMonitorStateException can be thrown in QueryInProgress

        Simple / trivial patch

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

        $ git pull https://github.com/navis/tajo TAJO-1396

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

        https://github.com/apache/tajo/pull/416.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 #416


        commit 95e73f17d08b6571c207d07984d39d02f2fa7e53
        Author: navis.ryu <navis@apache.org>
        Date: 2015-03-12T13:15:49Z

        TAJO-1396 Unexpected IllegalMonitorStateException can be thrown in QueryInProgress


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user navis opened a pull request: https://github.com/apache/tajo/pull/416 TAJO-1396 Unexpected IllegalMonitorStateException can be thrown in QueryInProgress Simple / trivial patch You can merge this pull request into a Git repository by running: $ git pull https://github.com/navis/tajo TAJO-1396 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/416.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 #416 commit 95e73f17d08b6571c207d07984d39d02f2fa7e53 Author: navis.ryu <navis@apache.org> Date: 2015-03-12T13:15:49Z TAJO-1396 Unexpected IllegalMonitorStateException can be thrown in QueryInProgress

          People

          • Assignee:
            navis Navis
            Reporter:
            navis Navis
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development