History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: SES-698
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Arjohn Kampman
Reporter: Nick Giles
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Sesame

AssertionError: Created a duplicate MemLiteral for literal 'x'

Created: 06/Jan/10 03:56 PM   Updated: 28/May/10 02:36 PM
Component/s: Memory Sail
Affects Version/s: 2.3.0
Fix Version/s: 2.3.1

Issue Links:
Related
 
This issue is related to:
SES-711 Created a duplicate MemLiteral for li... Major Resolved


 Description   
We are seeing this error in a small but noticeable number of cases. Inspecting the code of MemoryStore and MemValueFactory, it looks like there's a synchronisation issue. For this specific case, MemoryStore:532 checks whether its value factory knows about the literal, and if it doesn't the value factory is asked to create the literal. The creation method is synchronized, but the whole check and create should be inside the same synchronized block, probably in the value factory, since that is what is shared across threads. It looks like this has been split in order to differentiate the new and repeated literal cases.

 All   Comments   Change History      Sort Order:
Change by Arjohn Kampman [08/Jan/10 08:52 AM]
Field Original Value New Value
Fix Version/s 2.3.1 [ 10430 ]
Assignee Arjohn Kampman [ arjohn ]

Change by Arjohn Kampman [18/Jan/10 11:41 AM]
Field Original Value New Value
Status Open [ 1 ] In Progress [ 3 ]

Comment by Arjohn Kampman [18/Jan/10 04:59 PM]
The check for existing values and the creation of new ones is now combined in a single synchronized "getOrCreate" operation. Unfortunately, I haven't been able to reproduce the problem yet. Please let me know if you're still seeing this issue with the (likely) fix.

Change by Arjohn Kampman [18/Jan/10 04:59 PM]
Field Original Value New Value
Status In Progress [ 3 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]

Comment by Michele Mostarda [13/May/10 05:14 PM]
Dear Arjohn,

I've found this same issue and can be reproduced systematically.
Just check out the Any23 library source trunk from google code ( svn checkout http://any23.googlecode.com/svn/trunk/ any23-read-only ), build it through Maven or Ant and run the test org.deri.any23.extractor.rdfa.RDFaExtractorTest with the assertions enabled.

You'll obtain this exception:

java.lang.AssertionError: Created a duplicate MemLiteral for literal "2004-12-20"^^<http://www.w3.org/2001/XMLSchema#dateTime>
at org.openrdf.sail.memory.model.MemValueFactory.createMemLiteral(MemValueFactory.java:328)
at org.openrdf.sail.memory.model.MemValueFactory.createMemValue(MemValueFactory.java:215)

This test aims to verify a tolerant parsing support, in fact as you can notice the literal is a date declared as a datetime.
Any23 is currently using Sesame 2.2.4, a version lover to the declared fix verions, but I tried also an update to 2.3.1 obtaining the same result.

Hope this helps.

Mic

Change by Arjohn Kampman [28/May/10 02:35 PM]
Field Original Value New Value
Link This issue is related to SES-711 [ SES-711 ]

Comment by Arjohn Kampman [28/May/10 02:36 PM]
Thanks Michele for your detailed report. I can reproduce the problem with the current snapshot code from the 2.3 branch. I've copied your comments to a new issue since this one has already been closed: SES-711.