[jira] [Commented] (HIVE-4574) XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[ https://issues.apache.org/jira/browse/HIVE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13845856#comment-13845856 ] Steven Wong commented on HIVE-4574: --- [https://bugs.openjdk.java.net/browse/JDK-8028054] now says that the bug is fixed in 8 and backported to 7u60. XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck -- Key: HIVE-4574 URL: https://issues.apache.org/jira/browse/HIVE-4574 Project: Hive Issue Type: Bug Components: HiveServer2 Affects Versions: 0.11.0, 0.12.0 Reporter: Thejas M Nair Assignee: Thejas M Nair Attachments: HIVE-4574.1.patch In open jdk7, XMLEncoder.writeObject call leads to calls to java.beans.MethodFinder.findMethod(). MethodFinder class not thread safe because it uses a static WeakHashMap that would get used from multiple threads. See - http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/com/sun/beans/finder/MethodFinder.java#46 Concurrent access to HashMap implementation that are not thread safe can sometimes result in infinite-loops and other problems. If jdk7 is in use, it makes sense to synchronize calls to XMLEncoder.writeObject . -- This message was sent by Atlassian JIRA (v6.1.4#6159)
[jira] [Commented] (HIVE-4574) XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[ https://issues.apache.org/jira/browse/HIVE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13817506#comment-13817506 ] Ian Robertson commented on HIVE-4574: - For those tracking this issue, the underlying issue is now in the openjdk bug tracker: https://bugs.openjdk.java.net/browse/JDK-8028054 . It's currently scheduled for JDK8; not clear whether it will also be backported to a release of 7. XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck -- Key: HIVE-4574 URL: https://issues.apache.org/jira/browse/HIVE-4574 Project: Hive Issue Type: Bug Components: HiveServer2 Affects Versions: 0.11.0, 0.12.0 Reporter: Thejas M Nair Assignee: Thejas M Nair Attachments: HIVE-4574.1.patch In open jdk7, XMLEncoder.writeObject call leads to calls to java.beans.MethodFinder.findMethod(). MethodFinder class not thread safe because it uses a static WeakHashMap that would get used from multiple threads. See - http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/com/sun/beans/finder/MethodFinder.java#46 Concurrent access to HashMap implementation that are not thread safe can sometimes result in infinite-loops and other problems. If jdk7 is in use, it makes sense to synchronize calls to XMLEncoder.writeObject . -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (HIVE-4574) XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[ https://issues.apache.org/jira/browse/HIVE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13815086#comment-13815086 ] Ian Robertson commented on HIVE-4574: - I'm seeing this issue in CDH 5 beta 1, which runs jdk1.7.0_25-cloudera and hive-0.11. I have verified it is the same issue - we're seeing stack traces similar to the above in three threads across multiple thread dumps, and the heap dump shows a corrupted WeakHashMap (owned by a WeakCache) with a circular reference in the linked list for one of its buckets. Notably, CDH5b1 also has a backported patch of HIVE-1511 - see http://archive.cloudera.com/cdh5/cdh/5/hive-0.11.0-cdh5.0.0-beta-1.CHANGES.txt. Perhaps this needs an additional fix? XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck -- Key: HIVE-4574 URL: https://issues.apache.org/jira/browse/HIVE-4574 Project: Hive Issue Type: Bug Components: HiveServer2 Affects Versions: 0.11.0 Reporter: Thejas M Nair Assignee: Thejas M Nair Attachments: HIVE-4574.1.patch In open jdk7, XMLEncoder.writeObject call leads to calls to java.beans.MethodFinder.findMethod(). MethodFinder class not thread safe because it uses a static WeakHashMap that would get used from multiple threads. See - http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/com/sun/beans/finder/MethodFinder.java#46 Concurrent access to HashMap implementation that are not thread safe can sometimes result in infinite-loops and other problems. If jdk7 is in use, it makes sense to synchronize calls to XMLEncoder.writeObject . -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (HIVE-4574) XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[ https://issues.apache.org/jira/browse/HIVE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13815087#comment-13815087 ] Ian Robertson commented on HIVE-4574: - I'm seeing this issue in CDH 5 beta 1, which runs jdk1.7.0_25-cloudera and hive-0.11. I have verified it is the same issue - we're seeing stack traces similar to the above in three threads across multiple thread dumps, and the heap dump shows a corrupted WeakHashMap (owned by a WeakCache) with a circular reference in the linked list for one of its buckets. Notably, CDH5b1 also has a backported patch of HIVE-1511 - see http://archive.cloudera.com/cdh5/cdh/5/hive-0.11.0-cdh5.0.0-beta-1.CHANGES.txt. Perhaps this needs an additional fix? XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck -- Key: HIVE-4574 URL: https://issues.apache.org/jira/browse/HIVE-4574 Project: Hive Issue Type: Bug Components: HiveServer2 Affects Versions: 0.11.0 Reporter: Thejas M Nair Assignee: Thejas M Nair Attachments: HIVE-4574.1.patch In open jdk7, XMLEncoder.writeObject call leads to calls to java.beans.MethodFinder.findMethod(). MethodFinder class not thread safe because it uses a static WeakHashMap that would get used from multiple threads. See - http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/com/sun/beans/finder/MethodFinder.java#46 Concurrent access to HashMap implementation that are not thread safe can sometimes result in infinite-loops and other problems. If jdk7 is in use, it makes sense to synchronize calls to XMLEncoder.writeObject . -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (HIVE-4574) XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[ https://issues.apache.org/jira/browse/HIVE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13815191#comment-13815191 ] Brock Noland commented on HIVE-4574: I believe that HIVE-5411 will resolve this issue. XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck -- Key: HIVE-4574 URL: https://issues.apache.org/jira/browse/HIVE-4574 Project: Hive Issue Type: Bug Components: HiveServer2 Affects Versions: 0.11.0 Reporter: Thejas M Nair Assignee: Thejas M Nair Attachments: HIVE-4574.1.patch In open jdk7, XMLEncoder.writeObject call leads to calls to java.beans.MethodFinder.findMethod(). MethodFinder class not thread safe because it uses a static WeakHashMap that would get used from multiple threads. See - http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/com/sun/beans/finder/MethodFinder.java#46 Concurrent access to HashMap implementation that are not thread safe can sometimes result in infinite-loops and other problems. If jdk7 is in use, it makes sense to synchronize calls to XMLEncoder.writeObject . -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (HIVE-4574) XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[ https://issues.apache.org/jira/browse/HIVE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13724939#comment-13724939 ] Chris Drome commented on HIVE-4574: --- Thanks for your thoughts. We are concerned with 0.10 at this point, but your point is taken. Looking forward to HIVE-1511! XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck -- Key: HIVE-4574 URL: https://issues.apache.org/jira/browse/HIVE-4574 Project: Hive Issue Type: Bug Components: HiveServer2 Affects Versions: 0.11.0 Reporter: Thejas M Nair Assignee: Thejas M Nair Attachments: HIVE-4574.1.patch In open jdk7, XMLEncoder.writeObject call leads to calls to java.beans.MethodFinder.findMethod(). MethodFinder class not thread safe because it uses a static WeakHashMap that would get used from multiple threads. See - http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/com/sun/beans/finder/MethodFinder.java#46 Concurrent access to HashMap implementation that are not thread safe can sometimes result in infinite-loops and other problems. If jdk7 is in use, it makes sense to synchronize calls to XMLEncoder.writeObject . -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-4574) XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[ https://issues.apache.org/jira/browse/HIVE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13723526#comment-13723526 ] Thejas M Nair commented on HIVE-4574: - Regarding the bug report, that has gone into the black hole of oracle bug reporting system. I haven't heard back from the review process. I wish it was really more *open* ! Maybe, switching to a different serialization format as suggested in HIVE-1511 is the best bet. XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck -- Key: HIVE-4574 URL: https://issues.apache.org/jira/browse/HIVE-4574 Project: Hive Issue Type: Bug Components: HiveServer2 Affects Versions: 0.11.0 Reporter: Thejas M Nair Assignee: Thejas M Nair Attachments: HIVE-4574.1.patch In open jdk7, XMLEncoder.writeObject call leads to calls to java.beans.MethodFinder.findMethod(). MethodFinder class not thread safe because it uses a static WeakHashMap that would get used from multiple threads. See - http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/com/sun/beans/finder/MethodFinder.java#46 Concurrent access to HashMap implementation that are not thread safe can sometimes result in infinite-loops and other problems. If jdk7 is in use, it makes sense to synchronize calls to XMLEncoder.writeObject . -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-4574) XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[ https://issues.apache.org/jira/browse/HIVE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13723972#comment-13723972 ] Edward Capriolo commented on HIVE-4574: --- I am pretty close to having an xstream patch on HIVE-1511 XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck -- Key: HIVE-4574 URL: https://issues.apache.org/jira/browse/HIVE-4574 Project: Hive Issue Type: Bug Components: HiveServer2 Affects Versions: 0.11.0 Reporter: Thejas M Nair Assignee: Thejas M Nair Attachments: HIVE-4574.1.patch In open jdk7, XMLEncoder.writeObject call leads to calls to java.beans.MethodFinder.findMethod(). MethodFinder class not thread safe because it uses a static WeakHashMap that would get used from multiple threads. See - http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/com/sun/beans/finder/MethodFinder.java#46 Concurrent access to HashMap implementation that are not thread safe can sometimes result in infinite-loops and other problems. If jdk7 is in use, it makes sense to synchronize calls to XMLEncoder.writeObject . -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-4574) XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[ https://issues.apache.org/jira/browse/HIVE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13724653#comment-13724653 ] Chris Drome commented on HIVE-4574: --- [~thejas], I was wondering why none of the other methods which use XMLEncoder are not synchronized as well. Is there something specific about serializeExpression that makes it different? XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck -- Key: HIVE-4574 URL: https://issues.apache.org/jira/browse/HIVE-4574 Project: Hive Issue Type: Bug Components: HiveServer2 Affects Versions: 0.11.0 Reporter: Thejas M Nair Assignee: Thejas M Nair Attachments: HIVE-4574.1.patch In open jdk7, XMLEncoder.writeObject call leads to calls to java.beans.MethodFinder.findMethod(). MethodFinder class not thread safe because it uses a static WeakHashMap that would get used from multiple threads. See - http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/com/sun/beans/finder/MethodFinder.java#46 Concurrent access to HashMap implementation that are not thread safe can sometimes result in infinite-loops and other problems. If jdk7 is in use, it makes sense to synchronize calls to XMLEncoder.writeObject . -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-4574) XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[ https://issues.apache.org/jira/browse/HIVE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13724679#comment-13724679 ] Chris Drome commented on HIVE-4574: --- Specifically, it appears that serializeMapRedWork and serializeMapRedLocalWork may also be called by hive. XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck -- Key: HIVE-4574 URL: https://issues.apache.org/jira/browse/HIVE-4574 Project: Hive Issue Type: Bug Components: HiveServer2 Affects Versions: 0.11.0 Reporter: Thejas M Nair Assignee: Thejas M Nair Attachments: HIVE-4574.1.patch In open jdk7, XMLEncoder.writeObject call leads to calls to java.beans.MethodFinder.findMethod(). MethodFinder class not thread safe because it uses a static WeakHashMap that would get used from multiple threads. See - http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/com/sun/beans/finder/MethodFinder.java#46 Concurrent access to HashMap implementation that are not thread safe can sometimes result in infinite-loops and other problems. If jdk7 is in use, it makes sense to synchronize calls to XMLEncoder.writeObject . -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-4574) XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[ https://issues.apache.org/jira/browse/HIVE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13724693#comment-13724693 ] Thejas M Nair commented on HIVE-4574: - bq, I was wondering why none of the other methods which use XMLEncoder are not synchronized as well. I had a brief look at the OpenJDK code again, I could not find a reason why I might not have synchronized other calls to XMLEncoder. It was probably an oversight. XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck -- Key: HIVE-4574 URL: https://issues.apache.org/jira/browse/HIVE-4574 Project: Hive Issue Type: Bug Components: HiveServer2 Affects Versions: 0.11.0 Reporter: Thejas M Nair Assignee: Thejas M Nair Attachments: HIVE-4574.1.patch In open jdk7, XMLEncoder.writeObject call leads to calls to java.beans.MethodFinder.findMethod(). MethodFinder class not thread safe because it uses a static WeakHashMap that would get used from multiple threads. See - http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/com/sun/beans/finder/MethodFinder.java#46 Concurrent access to HashMap implementation that are not thread safe can sometimes result in infinite-loops and other problems. If jdk7 is in use, it makes sense to synchronize calls to XMLEncoder.writeObject . -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-4574) XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[ https://issues.apache.org/jira/browse/HIVE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13724840#comment-13724840 ] Chris Drome commented on HIVE-4574: --- [~thejas], sorry I was unclear in my previous comment. I was concerned about about other methods in the Utilities.java class that similarly call writeObject on XMLEncoder. It doesn't look like we need to worry about Utilities.serializeTasks or Utilities.serializeQueryPlan. However, it looks like Utilities.serializeMapRedWork or Utilities.serializeMapRedLocalWork. Additionally, I'm not sure if we have to be concerned about deserialization which calls readObject. XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck -- Key: HIVE-4574 URL: https://issues.apache.org/jira/browse/HIVE-4574 Project: Hive Issue Type: Bug Components: HiveServer2 Affects Versions: 0.11.0 Reporter: Thejas M Nair Assignee: Thejas M Nair Attachments: HIVE-4574.1.patch In open jdk7, XMLEncoder.writeObject call leads to calls to java.beans.MethodFinder.findMethod(). MethodFinder class not thread safe because it uses a static WeakHashMap that would get used from multiple threads. See - http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/com/sun/beans/finder/MethodFinder.java#46 Concurrent access to HashMap implementation that are not thread safe can sometimes result in infinite-loops and other problems. If jdk7 is in use, it makes sense to synchronize calls to XMLEncoder.writeObject . -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-4574) XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[ https://issues.apache.org/jira/browse/HIVE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13724894#comment-13724894 ] Thejas M Nair commented on HIVE-4574: - With latest version of code (post HIVE-4825 ), in Utilities.java looks like we need the synchronization in only two functions - serializeObject and serializeExpression . Regarding deserialization calls, I haven't traced openjdk call hierarchy for that. But the culprit (com.sun.beans.finder.MethodFinder.findMethod) seems to be a call that might be used in deserialization call path as well. Also, I don't have much faith remaining in the overall thread safety of this part of the code. As the deserialization calls (deserializeExpression, deserializeObject) are called from client side, it would be safer to synchronize them (until of course HIVE-1511 removes use of XMLEncoder) PTFUtils class is also using XMLEncoder, but those function that uses them don't seem to get used anywhere (PTFUtils.serialize) . XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck -- Key: HIVE-4574 URL: https://issues.apache.org/jira/browse/HIVE-4574 Project: Hive Issue Type: Bug Components: HiveServer2 Affects Versions: 0.11.0 Reporter: Thejas M Nair Assignee: Thejas M Nair Attachments: HIVE-4574.1.patch In open jdk7, XMLEncoder.writeObject call leads to calls to java.beans.MethodFinder.findMethod(). MethodFinder class not thread safe because it uses a static WeakHashMap that would get used from multiple threads. See - http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/com/sun/beans/finder/MethodFinder.java#46 Concurrent access to HashMap implementation that are not thread safe can sometimes result in infinite-loops and other problems. If jdk7 is in use, it makes sense to synchronize calls to XMLEncoder.writeObject . -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-4574) XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[ https://issues.apache.org/jira/browse/HIVE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13660856#comment-13660856 ] Thejas M Nair commented on HIVE-4574: - The stack trace of threads in hiveserver2 when it gets into this state looks like this - {code} - java.util.WeakHashMap.get(java.lang.Object) @bci=72, line=470 (Compiled frame; information may be imprecise) - com.sun.beans.WeakCache.get(java.lang.Object) @bci=5, line=55 (Interpreted frame) - com.sun.beans.finder.MethodFinder.findMethod(java.lang.Class, java.lang.String, java.lang.Class[]) @bci=33, line=68 (Interpreted frame) - java.beans.Statement.getMethod(java.lang.Class, java.lang.String, java.lang.Class[]) @bci=3, line=357 (Interpreted frame) - java.beans.Statement.invokeInternal() @bci=419, line=287 (Interpreted frame) - java.beans.Statement.access$000(java.beans.Statement) @bci=1, line=58 (Interpreted frame) - java.beans.Statement$2.run() @bci=4, line=185 (Interpreted frame) - java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction, java.security.AccessControlContext) @bci=0 (Interpreted frame) - java.beans.Statement.invoke() @bci=34, line=182 (Compiled frame) - java.beans.Expression.getValue() @bci=12, line=153 (Compiled frame) - java.beans.DefaultPersistenceDelegate.doProperty(java.lang.Class, java.beans.PropertyDescriptor, java.lang.Object, java.lang.Object, java.beans.Encoder) @bci=63, line=192 (Interpreted frame) - java.beans.DefaultPersistenceDelegate.initBean(java.lang.Class, java.lang.Object, java.lang.Object, java.beans.Encoder) @bci=254, line=253 (Interpreted frame) - java.beans.DefaultPersistenceDelegate.initialize(java.lang.Class, java.lang.Object, java.lang.Object, java.beans.Encoder) @bci=23, line=400 (Interpreted frame) - java.beans.PersistenceDelegate.writeObject(java.lang.Object, java.beans.Encoder) @bci=42, line=118 (Interpreted frame) - java.beans.Encoder.writeObject(java.lang.Object) @bci=26, line=74 (Interpreted frame) - java.beans.XMLEncoder.writeObject(java.lang.Object) @bci=9, line=327 (Interpreted frame) - java.beans.Encoder.writeExpression(java.beans.Expression) @bci=36, line=330 (Interpreted frame) - java.beans.XMLEncoder.writeExpression(java.beans.Expression) @bci=46, line=454 (Interpreted frame) - java.beans.PersistenceDelegate.writeObject(java.lang.Object, java.beans.Encoder) @bci=28, line=115 (Interpreted frame) - java.beans.Encoder.writeObject(java.lang.Object) @bci=26, line=74 (Interpreted frame) - java.beans.XMLEncoder.writeObject(java.lang.Object) @bci=9, line=327 (Interpreted frame) - java.beans.Encoder.writeExpression(java.beans.Expression) @bci=36, line=330 (Interpreted frame) - java.beans.XMLEncoder.writeExpression(java.beans.Expression) @bci=46, line=454 (Interpreted frame) - java.beans.DefaultPersistenceDelegate.doProperty(java.lang.Class, java.beans.PropertyDescriptor, java.lang.Object, java.lang.Object, java.beans.Encoder) @bci=79, line=194 (Interpreted frame) - java.beans.DefaultPersistenceDelegate.initBean(java.lang.Class, java.lang.Object, java.lang.Object, java.beans.Encoder) @bci=254, line=253 (Interpreted frame) - java.beans.DefaultPersistenceDelegate.initialize(java.lang.Class, java.lang.Object, java.lang.Object, java.beans.Encoder) @bci=23, line=400 (Interpreted frame) - java.beans.PersistenceDelegate.writeObject(java.lang.Object, java.beans.Encoder) @bci=42, line=118 (Interpreted frame) - java.beans.Encoder.writeObject(java.lang.Object) @bci=26, line=74 (Interpreted frame) - java.beans.XMLEncoder.writeObject(java.lang.Object) @bci=9, line=327 (Interpreted frame) (many more java.beans* calls in stack) - java.beans.XMLEncoder.writeObject(java.lang.Object) @bci=9, line=327 (Interpreted frame) - java.beans.Encoder.writeObject1(java.lang.Object) @bci=12, line=258 (Interpreted frame) - java.beans.Encoder.cloneStatement(java.beans.Statement) @bci=46, line=271 (Interpreted frame) - java.beans.Encoder.writeStatement(java.beans.Statement) @bci=2, line=301 (Interpreted frame) - java.beans.XMLEncoder.writeStatement(java.beans.Statement) @bci=12, line=400 (Interpreted frame) - java.beans.XMLEncoder.writeObject(java.lang.Object) @bci=34, line=330 (Interpreted frame) - org.apache.hadoop.hive.ql.exec.Utilities.serializeMapRedWork(org.apache.hadoop.hive.ql.plan.MapredWork, java.io.OutputStream) @bci=41, line=549 (Interpreted frame) - org.apache.hadoop.hive.ql.exec.Utilities.setMapRedWork(org.apache.hadoop.conf.Configuration, org.apache.hadoop.hive.ql.plan.MapredWork, java.lang.String) @bci=53, line=396 (Interpreted frame) - org.apache.hadoop.hive.ql.exec.ExecDriver.execute(org.apache.hadoop.hive.ql.DriverContext) @bci=1273, line=410 (Interpreted frame) {code} XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[jira] [Commented] (HIVE-4574) XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck
[ https://issues.apache.org/jira/browse/HIVE-4574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13660858#comment-13660858 ] Thejas M Nair commented on HIVE-4574: - I have filed a bug report with openjdk (oracle). Unfortunately, they create the public bug only after review, so I don't have a link to it right now. XMLEncoder thread safety issues in openjdk7 causes HiveServer2 to be stuck -- Key: HIVE-4574 URL: https://issues.apache.org/jira/browse/HIVE-4574 Project: Hive Issue Type: Bug Components: HiveServer2 Affects Versions: 0.11.0 Reporter: Thejas M Nair Assignee: Thejas M Nair In open jdk7, XMLEncoder.writeObject call leads to calls to java.beans.MethodFinder.findMethod(). MethodFinder class not thread safe because it uses a static WeakHashMap that would get used from multiple threads. See - http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/com/sun/beans/finder/MethodFinder.java#46 Concurrent access to HashMap implementation that are not thread safe can sometimes result in infinite-loops and other problems. If jdk7 is in use, it makes sense to synchronize calls to XMLEncoder.writeObject . -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira