Quantcast
Channel: R.NET
Viewing all articles
Browse latest Browse all 1634

Closed Task: Put in place reproducible tests for multi-threading issues [113]

$
0
0

rdotnet\TestApps\StressTest\Program.cs
method doMultiThreadingOperation
and a method testing the finalization of objects. Single threaded, except that the finalization occurs on another thread. Also test what happens if a safe handle to a SEXP is disposed of, then finalized.

__doMultiThreadingOperation__

Various error messages, but definitely fails quite fast.

```
Error in (function (vecLen) :
'rho' must be an environment not pairlist: detected in C-level eval
```

```
Error in rnorm(vecLen) : object 'n' not found
Warning: stack imbalance in '{', 20 then 21
```

```
Additional information: Error in .External(C_rnorm, n, mean, sd) :
Incorrect number of arguments (6), expecting 3 for 'rnorm'
```

__doTestObjectFinalization__
Much more of a concern.
After a few iterations of creating arrays of NumericVectors, a check on the validity of each vector (its length) fails. This is using single-threading, notwithstanding the object finalizations. Ouch. This leads to exceptions quite easily, thankfully. Dare not think if corrupted data was too silent. However, on the bright side, using engine.EnableLock does make the issue go away. Time to make this a default behavior.

Comments: Captured in unit test, pretty clear case with/without fix

Viewing all articles
Browse latest Browse all 1634

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>