Project

Profile

Help

Bug #3533

closed

Hotspot bytecode generation crashes under concurrent workload

Added by Michael Kay over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Multithreading
Sprint/Milestone:
-
Start date:
2017-11-16
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.8, trunk
Fix Committed on Branch:
9.8, trunk
Fixed in Maintenance Release:
Platforms:

Description

Various internal crashes occur when a single compiled stylesheet is run concurrently on a variety of different source documents, as happens when processing a directory of input files using a single stylesheet from the command line.

The crashes appear to suggest that two concurrent executions are triggering bytecode generation at the same time, and that the two compilation events are interfering with each other. Bytecode generation for a particular ByteCodeCandidate is synchronized, though compilation of two different expressions is allowed to proceed in parallel. Perhaps one of the expressions being compiled is a subexpression of another?

Actions #1

Updated by Michael Kay over 6 years ago

  • Description updated (diff)
Actions #2

Updated by Michael Kay over 6 years ago

I note that JavaPlatform.MyClassLoader.registerClass() updates a static HashMap and is not synchronized.

Actions #3

Updated by O'Neil Delpratt over 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
  • Applies to branch 9.8, trunk added
  • Fix Committed on Branch 9.8, trunk added

The issue here is the CompilerService which belongs to the configuration is shared between all threads when used in the ByteCodeCandidate. This is not good because different threads can update the CompilerService which can leave the CompilerService in an unstable state. The fix applied here was to make a new CompilerService in the ByteCodeCandidate class.

Regression tests run: Ran Xslt test suite

Actions #4

Updated by O'Neil Delpratt over 6 years ago

Bug fix applied in the Saxon 9.8.0.7 maintenance release.

Actions #5

Updated by O'Neil Delpratt over 6 years ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 9.8.0.7 added

Please register to edit this issue

Also available in: Atom PDF