Project

Profile

Help

Bug #1635

closed

Spurious error "License has expired" when multi-threading

Added by Michael Kay over 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2012-10-12
Due date:
% Done:

100%

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

Description

If two threads using the same Configuration attempt to verify the Saxon license key at the same time, a spurious error can occur: "License (serial number XXXX) has expired". The problem arises because the method to load the license file and read its properties is not synchronized. A patch is being created; in the meantime, a workaround is to ensure that the license file is verified before multiple threads are allowed to access a Configuration; this can be forced by calling the method config.isLicensedFeature(8) on the Configuration object.

Actions #1

Updated by Michael Kay over 11 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

A patch has been committed on the 9.4 branch (and cleared on the development branch), which will find its way into the next maintenance release. No testing attempted.

Actions #2

Updated by Community Admin over 11 years ago

On 15/10/2012 13:57, wrote:

[Bug #1635]

Hi Michael,

Even after applying the suggested workaround we have just seen a

similar recurrance of the issue:

net.sf.saxon.trans.LicenseException: License (serial number null) has

expired

    at com.saxonica.config.Verifier.configure(Verifier.java:293)
    at com.saxonica.config.Verifier.readLicenseFile(Verifier.java:237)
    at com.saxonica.config.Verifier.loadLicense(Verifier.java:144)
    at 

com.saxonica.config.ProfessionalConfiguration.loadLicense(ProfessionalConfiguration.java:376)

    at 

com.saxonica.config.EnterpriseConfiguration.checkLicensedFeature(EnterpriseConfiguration.java:152)

    at 

net.sf.saxon.expr.instruct.Executable.setSchemaAware(Executable.java:758)

    at 

net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:30)

As before the problem is intermittent.

Regards,

Rob

I'm racking my brains on this one because there's very little to go on.

The stack frame shows that the license is being loaded during a call on

IdentityTransformer.transform(). It wouldn't attempt to load it if the

license were already loaded in the ProfessionalConfiguration. I would be

looking hard at the code to check that the workaround has been correctly

implemented - that you really are loading the license file before

starting multiple threads against the Configuration object. Could you

show the code you are using to do this?

Michael Kay

Saxonica

Actions #3

Updated by O'Neil Delpratt about 11 years ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 9.4.0.7

Bug closed. Fixed in Saxon maintenance release 9.4.0.7

Please register to edit this issue

Also available in: Atom PDF