Hive
  1. Hive
  2. HIVE-4317

StackOverflowError when add jar concurrently

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.9.0, 0.10.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      scenario: multiple thread add jar and do select operation by jdbc concurrently , when hiveserver serializeMapRedWork sometimes, it will throw StackOverflowError from XMLEncoder.

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Patch Available Patch Available
          2h 34m 1 wangwenli 09/Apr/13 08:41
          Patch Available Patch Available Open Open
          101d 12h 8m 1 Brock Noland 19/Jul/13 20:50
          Hide
          dima machlin added a comment -

          I can confirm that this also happens in Hive 0.12 and is fully reproducible.

          Show
          dima machlin added a comment - I can confirm that this also happens in Hive 0.12 and is fully reproducible.
          Brock Noland made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Hide
          Brock Noland added a comment -

          Cancelling patch since there are questions about this occurs and an open request for a RB item.

          Show
          Brock Noland added a comment - Cancelling patch since there are questions about this occurs and an open request for a RB item.
          Hide
          Brock Noland added a comment -

          Where is the SOE occurring? I.e. jdbc client, HS1, HS2, etc?

          Please add a review item for this patch, this is described under "Review Process" here: https://cwiki.apache.org/confluence/display/Hive/HowToContribute

          Show
          Brock Noland added a comment - Where is the SOE occurring? I.e. jdbc client, HS1, HS2, etc? Please add a review item for this patch, this is described under "Review Process" here: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
          Hide
          Navis added a comment -

          I think JDBC connection is not thread-safe and should not be used like that.

          Show
          Navis added a comment - I think JDBC connection is not thread-safe and should not be used like that.
          wangwenli made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          wangwenli made changes -
          Link This issue is related to HIVE-2666 [ HIVE-2666 ]
          wangwenli made changes -
          Link This issue is related to HIVE-2706 [ HIVE-2706 ]
          wangwenli made changes -
          Attachment hive-4317.1.patch [ 12577742 ]
          wangwenli made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          wangwenli made changes -
          Attachment hive-4317.patch [ 12577729 ]
          Hide
          wangwenli added a comment -

          this issue is similar with hive-2706, hive-2666, pls reference .

          Show
          wangwenli added a comment - this issue is similar with hive-2706, hive-2666, pls reference .
          wangwenli made changes -
          Field Original Value New Value
          Attachment hive-4317.patch [ 12577729 ]
          Hide
          wangwenli added a comment -

          i checked the problem, it seems the java.beans.PersistenceDelegate.mutatesTo(Object oldInstance, Object newInstance) will return false even the oldInstance and newInstance is same class name, but because the classloader is different,it will lead to the class different.
          i found the add jar will change the classloader by create new URLClassloader, so i modified the code by reusing the old classloader, i verified, by this way, the classloader will not change. i still not know why the classloader will changed in the cocurrent scenario.
          i provide one patch, hope you people can review and give suggestion.

          Show
          wangwenli added a comment - i checked the problem, it seems the java.beans.PersistenceDelegate.mutatesTo(Object oldInstance, Object newInstance) will return false even the oldInstance and newInstance is same class name, but because the classloader is different,it will lead to the class different. i found the add jar will change the classloader by create new URLClassloader, so i modified the code by reusing the old classloader, i verified, by this way, the classloader will not change. i still not know why the classloader will changed in the cocurrent scenario. i provide one patch, hope you people can review and give suggestion.
          wangwenli created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              wangwenli
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:

                Development