Closed adampauls closed 2 years ago
The issue seems to go away if I change these declarations in a unit test
val data1: DenseMatrix[Float] = DenseMatrix.eye[Float](1000).apply(0 until 10, ::)
val data2: DenseMatrix[Float] = DenseMatrix.ones[Float](10, 100)
to be lazy.
It reproduces on 2.0 but not 1.3. I've tried both Scala 2.12.14 and 2.12.15.
Probably this issue: https://stackoverflow.com/questions/27549671/how-to-diagnose-or-detect-deadlocks-in-java-static-initializers. Possibly a few val -> lazy val changes will fix the issue?
Or it may be that you need to move the definition of CanCopy[DenseVector[T]] out somewhere else outside of DenseVector so that it can be referenced from DenseVector_DoubleOps.scala:163
without referring to the DenseVector
companion object. You can still of course have an implicit
reference to it in DenseVector
.
Hey, sorry for being so slow. I just pushed 2.0.1-RC2 that has your fix
@adampauls can you let me know if 2.0.1-RC2 fixes for you
closing for lack of repro...
Breeze 2.0.1-RC1 is hanging, but only when two different tests that use it are run in parallel. When using these sbt options:
I can reliably reproduce hang. There seems to be some cycle in the initializer for
object DenseVector
andobject HasOps
according the output of ctrl+\ below. It always seems to involveDenseVector_DoubleOps.scala:163
, which isAny ideas?