Re: TDB blocked

2020-03-26 Thread Andy Seaborne

Fork - what sort of fork?  Java's Fork/join  or OS process fork?

Doesn't forking (no exec) a JVM bypass all JVM related initialization, 
e.g. classes.  That will break a lot of things, TDB included. I don't 
know if OS-fork clones everything anyway (e.g. threads and that means 
ThreadLocal might be broken). [The scala doc is a little parsimonius]


---

There is no need to have one shared dataset/connection object anyway.

TDBFactory.create* is cheap after the dataset is first used in the JVM 
process. It's little more than a cache lookup.


A test can be

   TDBFactory.create*
   

and be fast enough i.e push the dataset connect/create into the test or 
test suite.


Bonus - create an in-memory TDB dataset so it leaves no on disk foot 
print.  Or the equivalent of a JUnit Temp folder but the create 
in-memeory has lower start-up costs.


Andy

In-memory TDB dataset is not designed for production use - it is very 
careful to be true TDB, just without peristent storage.  It runs its own 
copy-in/copy-out block cache so a lot of data copying to get proper 
isolation of storage and usage.


Use DatasetFactory.createTxnMem() for a production in-memory database.

On 26/03/2020 08:24, Jean-Marc Vanel wrote:

Le mer. 25 mars 2020 à 17:17, Andy Seaborne  a écrit :



On 25/03/2020 14:36, Jean-Marc Vanel wrote:

Le mer. 25 mars 2020 à 13:07, Andy Seaborne  a écrit :






...





What's the full stack trace?
(What's the blocking thread?)

I was looking for the other thread that is blocking this one at
being(write).  Same JVM.



See details below. Tell me if you still want it.



Yes, another unended W transaction in the same process might be the

cause.



I thought rather, another unended W transaction in *another* process,

since

the tests execution was parallel.


If I understand correctly,

parallelExecution in Test := false

means parallel in the same JVM.



Yes indeed, that's for taking advantage of multicore CPU's.
The parameter that actually created the freeze problem in the original post
was

fork = true

and it clear that calling TDBFactory.createDataset() and close() , and
other calls, randomly from different JVM's on the same TDB directory is
bound to fail.

On the other hand, the combination

fork := false
parallelExecution in Test := true

is not good for this kind of tests. My understanding is that TDB is made
for multi-thread access in reading and writing (and it works perfectly in
my Play Framework application for years), but not made for creating and
closing.
All tests pass, but one, with this stack (complete!):

[info] TimeSeriesTestJena:
[info] - notifyDataEvent + getTimeSeries
[info] deductions.runtime.semlogs.TimeSeriesTestJena *** ABORTED ***
[info]   java.util.*ConcurrentModificationException*: Reader = 0, Writer = 2
[info]   at
org.apache.jena.tdb.sys.DatasetControlMRSW.policyError(DatasetControlMRSW.java:147)
[info]   at
org.apache.jena.tdb.sys.DatasetControlMRSW.policyError(DatasetControlMRSW.java:143)
[info]   at
org.apache.jena.tdb.sys.DatasetControlMRSW.checkConcurrency(DatasetControlMRSW.java:75)
[info]   at
org.apache.jena.tdb.sys.DatasetControlMRSW.startUpdate(DatasetControlMRSW.java:57)
[info]   at
org.apache.jena.tdb.store.nodetupletable.NodeTupleTableConcrete.startWrite(NodeTupleTableConcrete.java:65)
[info]   at
org.apache.jena.tdb.store.nodetupletable.NodeTupleTableConcrete.sync(NodeTupleTableConcrete.java:251)
[info]   at org.apache.jena.tdb.store.TableBase.sync(TableBase.java:51)
[info]   at
org.apache.jena.tdb.store.DatasetGraphTDB.sync(DatasetGraphTDB.java:253)
[info]   at
org.apache.jena.tdb.transaction.DatasetGraphTransaction.close(DatasetGraphTransaction.java:296)
[info]   at
org.apache.jena.sparql.core.DatasetImpl.close(DatasetImpl.java:231)



  Andy




Test code:


https://github.com/jmvanel/semantic_forms/blob/master/scala/forms/src/test/scala/deductions/runtime/sparql_cache/TestRDFCache.scala

=
Thread [pool-1-thread-1-ScalaTest-running-TestRDFCache] (Suspended)
Unsafe.park(boolean, long) line: not available [native method]
LockSupport.park(Object) line: 175
Semaphore$FairSync(AbstractQueuedSynchronizer).parkAndCheckInterrupt()
line: 836


Semaphore$FairSync(AbstractQueuedSynchronizer).doAcquireSharedInterruptibly(int)

line: 997


Semaphore$FairSync(AbstractQueuedSynchronizer).acquireSharedInterruptibly(int)

line: 1304
Semaphore.acquire() line: 312
TransactionManager.acquireWriterLock(boolean) line: 616
TransactionManager.beginInternal(TxnType, TxnType, String) line: 358
TransactionManager.begin(TxnType, String) line: 343
StoreConnection.begin(TxnType, String) line: 128
StoreConnection.begin(TxnType) line: 108
DatasetGraphTransaction.begin(TxnType) line: 169
DatasetGraphTransaction.begin(ReadWrite) line: 162
DatasetImpl.begin(ReadWrite) line: 122
JenaDatasetStore.$anonfun$rw$1(Dataset, Function0) line: 23
52027729.apply() line: not available
Try$.apply(Function0) line: 213
JenaDatasetStore.rw(Dataset, Function0) line: 22

Re: TDB blocked

2020-03-26 Thread Jean-Marc Vanel
Le mer. 25 mars 2020 à 17:17, Andy Seaborne  a écrit :

>
> On 25/03/2020 14:36, Jean-Marc Vanel wrote:
> > Le mer. 25 mars 2020 à 13:07, Andy Seaborne  a écrit :
>


> ...
>


> >> What's the full stack trace?
> >> (What's the blocking thread?)
> I was looking for the other thread that is blocking this one at
> being(write).  Same JVM.
>

See details below. Tell me if you still want it.


> >> Yes, another unended W transaction in the same process might be the
> cause.
> >>
> > I thought rather, another unended W transaction in *another* process,
> since
> > the tests execution was parallel.
>
> If I understand correctly,
>
> parallelExecution in Test := false
>
> means parallel in the same JVM.
>

Yes indeed, that's for taking advantage of multicore CPU's.
The parameter that actually created the freeze problem in the original post
was

fork = true

and it clear that calling TDBFactory.createDataset() and close() , and
other calls, randomly from different JVM's on the same TDB directory is
bound to fail.

On the other hand, the combination

fork := false
parallelExecution in Test := true

is not good for this kind of tests. My understanding is that TDB is made
for multi-thread access in reading and writing (and it works perfectly in
my Play Framework application for years), but not made for creating and
closing.
All tests pass, but one, with this stack (complete!):

[info] TimeSeriesTestJena:
[info] - notifyDataEvent + getTimeSeries
[info] deductions.runtime.semlogs.TimeSeriesTestJena *** ABORTED ***
[info]   java.util.*ConcurrentModificationException*: Reader = 0, Writer = 2
[info]   at
org.apache.jena.tdb.sys.DatasetControlMRSW.policyError(DatasetControlMRSW.java:147)
[info]   at
org.apache.jena.tdb.sys.DatasetControlMRSW.policyError(DatasetControlMRSW.java:143)
[info]   at
org.apache.jena.tdb.sys.DatasetControlMRSW.checkConcurrency(DatasetControlMRSW.java:75)
[info]   at
org.apache.jena.tdb.sys.DatasetControlMRSW.startUpdate(DatasetControlMRSW.java:57)
[info]   at
org.apache.jena.tdb.store.nodetupletable.NodeTupleTableConcrete.startWrite(NodeTupleTableConcrete.java:65)
[info]   at
org.apache.jena.tdb.store.nodetupletable.NodeTupleTableConcrete.sync(NodeTupleTableConcrete.java:251)
[info]   at org.apache.jena.tdb.store.TableBase.sync(TableBase.java:51)
[info]   at
org.apache.jena.tdb.store.DatasetGraphTDB.sync(DatasetGraphTDB.java:253)
[info]   at
org.apache.jena.tdb.transaction.DatasetGraphTransaction.close(DatasetGraphTransaction.java:296)
[info]   at
org.apache.jena.sparql.core.DatasetImpl.close(DatasetImpl.java:231)


>  Andy
>
>
> >
> > Test code:
> >
> https://github.com/jmvanel/semantic_forms/blob/master/scala/forms/src/test/scala/deductions/runtime/sparql_cache/TestRDFCache.scala
> > =
> > Thread [pool-1-thread-1-ScalaTest-running-TestRDFCache] (Suspended)
> > Unsafe.park(boolean, long) line: not available [native method]
> > LockSupport.park(Object) line: 175
> > Semaphore$FairSync(AbstractQueuedSynchronizer).parkAndCheckInterrupt()
> > line: 836
> >
> Semaphore$FairSync(AbstractQueuedSynchronizer).doAcquireSharedInterruptibly(int)
> > line: 997
> >
> Semaphore$FairSync(AbstractQueuedSynchronizer).acquireSharedInterruptibly(int)
> > line: 1304
> > Semaphore.acquire() line: 312
> > TransactionManager.acquireWriterLock(boolean) line: 616
> > TransactionManager.beginInternal(TxnType, TxnType, String) line: 358
> > TransactionManager.begin(TxnType, String) line: 343
> > StoreConnection.begin(TxnType, String) line: 128
> > StoreConnection.begin(TxnType) line: 108
> > DatasetGraphTransaction.begin(TxnType) line: 169
> > DatasetGraphTransaction.begin(ReadWrite) line: 162
> > DatasetImpl.begin(ReadWrite) line: 122
> > JenaDatasetStore.$anonfun$rw$1(Dataset, Function0) line: 23
> > 52027729.apply() line: not available
> > Try$.apply(Function0) line: 213
> > JenaDatasetStore.rw(Dataset, Function0) line: 22
> > JenaDatasetStore.rw(Object, Function0) line: 10
> > TestRDFCache(RDFCacheAlgo).readStoreURI(Object, Object,
> > DATASET) line: 368
> > RDFCacheAlgo.readStoreURI$(RDFCacheAlgo, Object, Object,
> > Object) line: 366
> > TestRDFCache.readStoreURI(Object, Object, Object) line: 10
> > TestRDFCache(RDFCacheAlgo).readStoreURIinOwnGraph(Object)
> > line: 334
> > TestRDFCache(RDFCacheAlgo).readStoreUriInNamedGraph(Object)
> > line: 326
> > RDFCacheAlgo.readStoreUriInNamedGraph$(RDFCacheAlgo, Object)
> > line: 325
> > TestRDFCache.readStoreUriInNamedGraph(Object) line: 10
> > TestRDFCache.$anonfun$new$4(TestRDFCache) line: 63
> > 1708361043.apply$mcV$sp() line: not available
> > 1708361043(JFunction0$mcV$sp).apply() line: 23
> > OutcomeOf$(OutcomeOf).outcomeOf(Function0) line: 85
> > OutcomeOf.outcomeOf$(OutcomeOf, Function0) line: 83
> > OutcomeOf$.outcomeOf(Function0) line: 104
> > Transformer.apply() line: 22
> > Transformer.apply() line: 20
> > AnyFunSuiteLike$$anon$1.apply() line: 189
> > TestRDFCache(TestSuite).withFixture(TestSuite$NoArgTest) line: 196
> > TestSuite.withFixture$(TestSuite, 

Re: TDB blocked

2020-03-25 Thread Andy Seaborne




On 25/03/2020 14:36, Jean-Marc Vanel wrote:

Le mer. 25 mars 2020 à 13:07, Andy Seaborne  a écrit :


What's the full stack trace?
(What's the blocking thread?)



See below.


I was looking for the other thread that is blocking this one at 
being(write).  Same JVM.


There is no across different JVM locking in TDB.





Yes, another unended W transaction in the same process might be the cause.



I thought rather, another unended W transaction in *another* process, since
the tests execution was parallel.


If I understand correctly,

parallelExecution in Test := false

means parallel in the same JVM.

Andy




Test code:
https://github.com/jmvanel/semantic_forms/blob/master/scala/forms/src/test/scala/deductions/runtime/sparql_cache/TestRDFCache.scala
=
Thread [pool-1-thread-1-ScalaTest-running-TestRDFCache] (Suspended)
Unsafe.park(boolean, long) line: not available [native method]
LockSupport.park(Object) line: 175
Semaphore$FairSync(AbstractQueuedSynchronizer).parkAndCheckInterrupt()
line: 836
Semaphore$FairSync(AbstractQueuedSynchronizer).doAcquireSharedInterruptibly(int)
line: 997
Semaphore$FairSync(AbstractQueuedSynchronizer).acquireSharedInterruptibly(int)
line: 1304
Semaphore.acquire() line: 312
TransactionManager.acquireWriterLock(boolean) line: 616
TransactionManager.beginInternal(TxnType, TxnType, String) line: 358
TransactionManager.begin(TxnType, String) line: 343
StoreConnection.begin(TxnType, String) line: 128
StoreConnection.begin(TxnType) line: 108
DatasetGraphTransaction.begin(TxnType) line: 169
DatasetGraphTransaction.begin(ReadWrite) line: 162
DatasetImpl.begin(ReadWrite) line: 122
JenaDatasetStore.$anonfun$rw$1(Dataset, Function0) line: 23
52027729.apply() line: not available
Try$.apply(Function0) line: 213
JenaDatasetStore.rw(Dataset, Function0) line: 22
JenaDatasetStore.rw(Object, Function0) line: 10
TestRDFCache(RDFCacheAlgo).readStoreURI(Object, Object,
DATASET) line: 368
RDFCacheAlgo.readStoreURI$(RDFCacheAlgo, Object, Object,
Object) line: 366
TestRDFCache.readStoreURI(Object, Object, Object) line: 10
TestRDFCache(RDFCacheAlgo).readStoreURIinOwnGraph(Object)
line: 334
TestRDFCache(RDFCacheAlgo).readStoreUriInNamedGraph(Object)
line: 326
RDFCacheAlgo.readStoreUriInNamedGraph$(RDFCacheAlgo, Object)
line: 325
TestRDFCache.readStoreUriInNamedGraph(Object) line: 10
TestRDFCache.$anonfun$new$4(TestRDFCache) line: 63
1708361043.apply$mcV$sp() line: not available
1708361043(JFunction0$mcV$sp).apply() line: 23
OutcomeOf$(OutcomeOf).outcomeOf(Function0) line: 85
OutcomeOf.outcomeOf$(OutcomeOf, Function0) line: 83
OutcomeOf$.outcomeOf(Function0) line: 104
Transformer.apply() line: 22
Transformer.apply() line: 20
AnyFunSuiteLike$$anon$1.apply() line: 189
TestRDFCache(TestSuite).withFixture(TestSuite$NoArgTest) line: 196
TestSuite.withFixture$(TestSuite, TestSuite$NoArgTest) line: 195
TestRDFCache(AnyFunSuite).withFixture(TestSuite$NoArgTest) line: 1562
TestRDFCache(AnyFunSuiteLike).invokeWithFixture$1(SuperEngine$TestLeaf,
Args, String) line: 187
AnyFunSuiteLike.$anonfun$runTest$1(AnyFunSuiteLike, Args, String,
SuperEngine$TestLeaf) line: 199
1593480726.apply(Object) line: not available
Engine(SuperEngine).runTestImpl(Suite, String, Args, boolean,
Function1,Outcome>) line: 306
TestRDFCache(AnyFunSuiteLike).runTest(String, Args) line: 199
AnyFunSuiteLike.runTest$(AnyFunSuiteLike, String, Args) line: 181
TestRDFCache(AnyFunSuite).runTest(String, Args) line: 1562
AnyFunSuiteLike.$anonfun$runTests$1(AnyFunSuiteLike, String, Args) line:
232
438507753.apply(Object, Object) line: not available
SuperEngine.$anonfun$runTestsInBranch$1(SuperEngine, Args, Suite,
SuperEngine$Branch, ListBuffer, Function2, boolean, SuperEngine$Node) line:
413
855709148.apply(Object) line: not available
$colon$colon(List).foreach(Function1) line: 392
Engine(SuperEngine).traverseSubNodes$1(SuperEngine$Branch, Args, Suite,
ListBuffer, Function2, boolean) line: 401
Engine(SuperEngine).runTestsInBranch(Suite, SuperEngine, Args,
boolean, Function2) line: 396
Engine(SuperEngine).runTestsImpl(Suite, Option, Args, Informer,
boolean, Function2) line: 475
TestRDFCache(AnyFunSuiteLike).runTests(Option, Args) line: 232
AnyFunSuiteLike.runTests$(AnyFunSuiteLike, Option, Args) line: 231
TestRDFCache(AnyFunSuite).runTests(Option, Args) line: 1562
TestRDFCache(Suite).run(Option, Args) line: 1112
Suite.run$(Suite, Option, Args) line: 1094
TestRDFCache(AnyFunSuite).org$scalatest$funsuite$AnyFunSuiteLike$$super$run(Option,
Args) line: 1562
AnyFunSuiteLike.$anonfun$run$1(AnyFunSuiteLike, Option, Args) line: 236
113821125.apply(Object, Object) line: not available
Engine(SuperEngine).runImpl(Suite, Option, Args,
Function2,Args,Status>) line: 535
TestRDFCache(AnyFunSuiteLike).run(Option, Args) line: 236
AnyFunSuiteLike.run$(AnyFunSuiteLike, Option, Args) line: 235
TestRDFCache.org$scalatest$BeforeAndAfterAll$$super$run(Option, Args) line:
10
TestRDFCache(BeforeAndAfterAll).liftedTree1$1(Args, Option) line: 213

Re: TDB blocked

2020-03-25 Thread Jean-Marc Vanel
Le mer. 25 mars 2020 à 13:07, Andy Seaborne  a écrit :

> What's the full stack trace?
> (What's the blocking thread?)
>

See below.


> Yes, another unended W transaction in the same process might be the cause.
>

I thought rather, another unended W transaction in *another* process, since
the tests execution was parallel.

Test code:
https://github.com/jmvanel/semantic_forms/blob/master/scala/forms/src/test/scala/deductions/runtime/sparql_cache/TestRDFCache.scala
=
Thread [pool-1-thread-1-ScalaTest-running-TestRDFCache] (Suspended)
Unsafe.park(boolean, long) line: not available [native method]
LockSupport.park(Object) line: 175
Semaphore$FairSync(AbstractQueuedSynchronizer).parkAndCheckInterrupt()
line: 836
Semaphore$FairSync(AbstractQueuedSynchronizer).doAcquireSharedInterruptibly(int)
line: 997
Semaphore$FairSync(AbstractQueuedSynchronizer).acquireSharedInterruptibly(int)
line: 1304
Semaphore.acquire() line: 312
TransactionManager.acquireWriterLock(boolean) line: 616
TransactionManager.beginInternal(TxnType, TxnType, String) line: 358
TransactionManager.begin(TxnType, String) line: 343
StoreConnection.begin(TxnType, String) line: 128
StoreConnection.begin(TxnType) line: 108
DatasetGraphTransaction.begin(TxnType) line: 169
DatasetGraphTransaction.begin(ReadWrite) line: 162
DatasetImpl.begin(ReadWrite) line: 122
JenaDatasetStore.$anonfun$rw$1(Dataset, Function0) line: 23
52027729.apply() line: not available
Try$.apply(Function0) line: 213
JenaDatasetStore.rw(Dataset, Function0) line: 22
JenaDatasetStore.rw(Object, Function0) line: 10
TestRDFCache(RDFCacheAlgo).readStoreURI(Object, Object,
DATASET) line: 368
RDFCacheAlgo.readStoreURI$(RDFCacheAlgo, Object, Object,
Object) line: 366
TestRDFCache.readStoreURI(Object, Object, Object) line: 10
TestRDFCache(RDFCacheAlgo).readStoreURIinOwnGraph(Object)
line: 334
TestRDFCache(RDFCacheAlgo).readStoreUriInNamedGraph(Object)
line: 326
RDFCacheAlgo.readStoreUriInNamedGraph$(RDFCacheAlgo, Object)
line: 325
TestRDFCache.readStoreUriInNamedGraph(Object) line: 10
TestRDFCache.$anonfun$new$4(TestRDFCache) line: 63
1708361043.apply$mcV$sp() line: not available
1708361043(JFunction0$mcV$sp).apply() line: 23
OutcomeOf$(OutcomeOf).outcomeOf(Function0) line: 85
OutcomeOf.outcomeOf$(OutcomeOf, Function0) line: 83
OutcomeOf$.outcomeOf(Function0) line: 104
Transformer.apply() line: 22
Transformer.apply() line: 20
AnyFunSuiteLike$$anon$1.apply() line: 189
TestRDFCache(TestSuite).withFixture(TestSuite$NoArgTest) line: 196
TestSuite.withFixture$(TestSuite, TestSuite$NoArgTest) line: 195
TestRDFCache(AnyFunSuite).withFixture(TestSuite$NoArgTest) line: 1562
TestRDFCache(AnyFunSuiteLike).invokeWithFixture$1(SuperEngine$TestLeaf,
Args, String) line: 187
AnyFunSuiteLike.$anonfun$runTest$1(AnyFunSuiteLike, Args, String,
SuperEngine$TestLeaf) line: 199
1593480726.apply(Object) line: not available
Engine(SuperEngine).runTestImpl(Suite, String, Args, boolean,
Function1,Outcome>) line: 306
TestRDFCache(AnyFunSuiteLike).runTest(String, Args) line: 199
AnyFunSuiteLike.runTest$(AnyFunSuiteLike, String, Args) line: 181
TestRDFCache(AnyFunSuite).runTest(String, Args) line: 1562
AnyFunSuiteLike.$anonfun$runTests$1(AnyFunSuiteLike, String, Args) line:
232
438507753.apply(Object, Object) line: not available
SuperEngine.$anonfun$runTestsInBranch$1(SuperEngine, Args, Suite,
SuperEngine$Branch, ListBuffer, Function2, boolean, SuperEngine$Node) line:
413
855709148.apply(Object) line: not available
$colon$colon(List).foreach(Function1) line: 392
Engine(SuperEngine).traverseSubNodes$1(SuperEngine$Branch, Args, Suite,
ListBuffer, Function2, boolean) line: 401
Engine(SuperEngine).runTestsInBranch(Suite, SuperEngine, Args,
boolean, Function2) line: 396
Engine(SuperEngine).runTestsImpl(Suite, Option, Args, Informer,
boolean, Function2) line: 475
TestRDFCache(AnyFunSuiteLike).runTests(Option, Args) line: 232
AnyFunSuiteLike.runTests$(AnyFunSuiteLike, Option, Args) line: 231
TestRDFCache(AnyFunSuite).runTests(Option, Args) line: 1562
TestRDFCache(Suite).run(Option, Args) line: 1112
Suite.run$(Suite, Option, Args) line: 1094
TestRDFCache(AnyFunSuite).org$scalatest$funsuite$AnyFunSuiteLike$$super$run(Option,
Args) line: 1562
AnyFunSuiteLike.$anonfun$run$1(AnyFunSuiteLike, Option, Args) line: 236
113821125.apply(Object, Object) line: not available
Engine(SuperEngine).runImpl(Suite, Option, Args,
Function2,Args,Status>) line: 535
TestRDFCache(AnyFunSuiteLike).run(Option, Args) line: 236
AnyFunSuiteLike.run$(AnyFunSuiteLike, Option, Args) line: 235
TestRDFCache.org$scalatest$BeforeAndAfterAll$$super$run(Option, Args) line:
10
TestRDFCache(BeforeAndAfterAll).liftedTree1$1(Args, Option) line: 213
TestRDFCache(BeforeAndAfterAll).run(Option, Args) line: 210
BeforeAndAfterAll.run$(BeforeAndAfterAll, Option, Args) line: 208
TestRDFCache.run(Option, Args) line: 10
Framework.org$scalatest$tools$Framework$$runSuite(TaskDef, String, Suite,
ClassLoader, SuiteSortingReporter, Tracker, EventHandler, Set,
Set, Selector[], 

Re: TDB blocked

2020-03-25 Thread Andy Seaborne

What's the full stack trace?
(What's the blocking thread?)

Yes, another unended W transaction in the same process might be the cause.

Andy


On 25/03/2020 11:08, Jean-Marc Vanel wrote:

I investigated on that.
Now my test suite passes without Jena TDB trouble. I just added this in
Scala SBT :
parallelExecution in Test := false

I didn't know that parallel execution was the default.
So apparently this was an issue with 2 processes accessing the same TDB .
Normally this is detected and an explicit Jena TDB message appears, but not
this time.

Jean-Marc Vanel

+33 (0)6 89 16 29 52
Twitter: @jmvanel , @jmvanel_fr ; chat: irc://irc.freenode.net#eulergui
  Chroniques jardin



Le mar. 24 mars 2020 à 18:56, Jean-Marc Vanel  a
écrit :


Hi Jena users!

After changing my test suite in* semantic_forms
*  , I get
consistently a thread blocked forever. I upgraded to latest Jena Version =
"3.14.0" , and happily my Web application seems to be working fine on my
laptop, and the test suite sort of works, that is running tests one by one.
In my test suite I used to recursively delete the TDB directories after
each test. What changed is that instead I kept the same TDB directories for
each test, calling close() after each test.
This is with TDB 1. Is another unended transaction the issue? Then how to
discover that ?

Thread [pool-1-thread-1-ScalaTest-running-TestRDFCache] (Suspended)
Unsafe.park(boolean, long) line: not available [native method]
LockSupport.park(Object) line: 175
Semaphore$FairSync(AbstractQueuedSynchronizer).parkAndCheckInterrupt()
line: 836
Semaphore$FairSync(AbstractQueuedSynchronizer).doAcquireSharedInterruptibly(int)
line: 997
Semaphore$FairSync(AbstractQueuedSynchronizer).acquireSharedInterruptibly(int)
line: 1304
Semaphore.acquire() line: 312

* TransactionManager.acquireWriterLock(boolean) line: 616 *
TransactionManager.beginInternal(TxnType, TxnType, String) line: 358
TransactionManager.begin(TxnType, String) line: 343
StoreConnection.begin(TxnType, String) line: 128
StoreConnection.begin(TxnType) line: 108
DatasetGraphTransaction.begin(TxnType) line: 169
DatasetGraphTransaction.begin(ReadWrite) line: 162
DatasetImpl.begin(ReadWrite) line: 122
JenaDatasetStore.$anonfun$rw$1(Dataset, Function0) line: 23


Jean-Marc Vanel

+33 (0)6 89 16 29 52
Twitter: @jmvanel , @jmvanel_fr ; chat: irc://irc.freenode.net#eulergui
  Chroniques jardin






Re: TDB blocked

2020-03-25 Thread Jean-Marc Vanel
I investigated on that.
Now my test suite passes without Jena TDB trouble. I just added this in
Scala SBT :
parallelExecution in Test := false

I didn't know that parallel execution was the default.
So apparently this was an issue with 2 processes accessing the same TDB .
Normally this is detected and an explicit Jena TDB message appears, but not
this time.

Jean-Marc Vanel

+33 (0)6 89 16 29 52
Twitter: @jmvanel , @jmvanel_fr ; chat: irc://irc.freenode.net#eulergui
 Chroniques jardin



Le mar. 24 mars 2020 à 18:56, Jean-Marc Vanel  a
écrit :

> Hi Jena users!
>
> After changing my test suite in* semantic_forms
> *  , I get
> consistently a thread blocked forever. I upgraded to latest Jena Version =
> "3.14.0" , and happily my Web application seems to be working fine on my
> laptop, and the test suite sort of works, that is running tests one by one.
> In my test suite I used to recursively delete the TDB directories after
> each test. What changed is that instead I kept the same TDB directories for
> each test, calling close() after each test.
> This is with TDB 1. Is another unended transaction the issue? Then how to
> discover that ?
>
> Thread [pool-1-thread-1-ScalaTest-running-TestRDFCache] (Suspended)
> Unsafe.park(boolean, long) line: not available [native method]
> LockSupport.park(Object) line: 175
> Semaphore$FairSync(AbstractQueuedSynchronizer).parkAndCheckInterrupt()
> line: 836
> Semaphore$FairSync(AbstractQueuedSynchronizer).doAcquireSharedInterruptibly(int)
> line: 997
> Semaphore$FairSync(AbstractQueuedSynchronizer).acquireSharedInterruptibly(int)
> line: 1304
> Semaphore.acquire() line: 312
>
> * TransactionManager.acquireWriterLock(boolean) line: 616 *
> TransactionManager.beginInternal(TxnType, TxnType, String) line: 358
> TransactionManager.begin(TxnType, String) line: 343
> StoreConnection.begin(TxnType, String) line: 128
> StoreConnection.begin(TxnType) line: 108
> DatasetGraphTransaction.begin(TxnType) line: 169
> DatasetGraphTransaction.begin(ReadWrite) line: 162
> DatasetImpl.begin(ReadWrite) line: 122
> JenaDatasetStore.$anonfun$rw$1(Dataset, Function0) line: 23
>
>
> Jean-Marc Vanel
> 
> +33 (0)6 89 16 29 52
> Twitter: @jmvanel , @jmvanel_fr ; chat: irc://irc.freenode.net#eulergui
>  Chroniques jardin
> 
>