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

          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.
          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 .
          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.
          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
          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
          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.

            People

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

              Dates

              • Created:
                Updated:

                Development