Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unreleased lock when shutting down ShaclSail after a validation failure #1246

Closed
hmottestad opened this issue Jan 17, 2019 · 0 comments
Closed
Assignees
Labels
🐞 bug issue is a bug
Milestone

Comments

@hmottestad
Copy link
Contributor

There is an unreleased lock when shutting down the ShaclSail after a validation failure.

java.lang.Throwable: Read lock 615 acquired in main
	at org.eclipse.rdf4j.common.concurrent.locks.LockManager.createLock(LockManager.java:167)
	at org.eclipse.rdf4j.common.concurrent.locks.AbstractReadWriteLockManager.createReadLock(AbstractReadWriteLockManager.java:105)
	at org.eclipse.rdf4j.common.concurrent.locks.ReadPrefReadWriteLockManager.getReadLock(ReadPrefReadWriteLockManager.java:81)
	at org.eclipse.rdf4j.sail.memory.MemorySailStore.openStatementsReadLock(MemorySailStore.java:146)
	at org.eclipse.rdf4j.sail.memory.MemorySailStore.access$200(MemorySailStore.java:56)
	at org.eclipse.rdf4j.sail.memory.MemorySailStore$MemorySailSink.<init>(MemorySailStore.java:403)
	at org.eclipse.rdf4j.sail.memory.MemorySailStore$MemorySailSource.sink(MemorySailStore.java:361)
	at org.eclipse.rdf4j.sail.base.SailSourceBranch.prepare(SailSourceBranch.java:260)
	at org.eclipse.rdf4j.sail.base.UnionSailSource.prepare(UnionSailSource.java:68)
	at org.eclipse.rdf4j.sail.base.SailSourceConnection.prepareInternal(SailSourceConnection.java:409)
	at org.eclipse.rdf4j.sail.helpers.AbstractSailConnection.prepare(AbstractSailConnection.java:406)
	at org.eclipse.rdf4j.sail.helpers.SailConnectionWrapper.prepare(SailConnectionWrapper.java:259)
	at org.eclipse.rdf4j.sail.shacl.ShaclSailConnection.prepare(ShaclSailConnection.java:148)
	at org.eclipse.rdf4j.repository.sail.SailRepositoryConnection.commit(SailRepositoryConnection.java:168)
	at org.eclipse.rdf4j.sail.shacl.ShaclTest.runTestCase(ShaclTest.java:171)
	at org.eclipse.rdf4j.sail.shacl.ShaclTest.test(ShaclTest.java:80)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

I am unable to reproduce this without the ShaclSail, but I don't see anything wrong in the ShaclSail.

This bug can not be reproduced when using IsolationLevel.NONE or SERIALIZABLE. It is reproducible with SNAPSHOT.

hmottestad added a commit to eclipse-rdf4j/rdf4j-storage that referenced this issue Jan 17, 2019
hmottestad added a commit to eclipse-rdf4j/rdf4j-storage that referenced this issue Jan 17, 2019
hmottestad added a commit to eclipse-rdf4j/rdf4j-storage that referenced this issue Jan 17, 2019
@hmottestad hmottestad added the 🐞 bug issue is a bug label Jan 17, 2019
hmottestad added a commit to eclipse-rdf4j/rdf4j-storage that referenced this issue Jan 18, 2019
hmottestad added a commit to eclipse-rdf4j/rdf4j-storage that referenced this issue Jan 18, 2019
hmottestad added a commit to eclipse-rdf4j/rdf4j-storage that referenced this issue Jan 18, 2019
@abrokenjester abrokenjester added this to the 2.4.3 milestone Jan 18, 2019
abrokenjester pushed a commit to eclipse-rdf4j/rdf4j-storage that referenced this issue Jan 18, 2019
hmottestad added a commit to eclipse-rdf4j/rdf4j-storage that referenced this issue Jan 19, 2019
* master:
  eclipse-rdf4j/rdf4j#1246 close unclosed resource

Signed-off-by: Håvard Ottestad <[email protected]>
hmottestad added a commit to eclipse-rdf4j/rdf4j-storage that referenced this issue Jan 19, 2019
hmottestad added a commit to eclipse-rdf4j/rdf4j-storage that referenced this issue Jan 19, 2019
* develop:
  ignore code generated during mvn install
  eclipse-rdf4j/rdf4j#1246 shutdown repo to cause error
  eclipse-rdf4j/rdf4j#1246 close unclosed resource
  eclipse-rdf4j/rdf4j#1182 use logger instead of println

Signed-off-by: Håvard Ottestad <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug issue is a bug
Projects
None yet
Development

No branches or pull requests

2 participants