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

zio-streams example does not terminate in scala-cli, but does when run in IntelliJ #1933

Closed
bbarker opened this issue Mar 16, 2023 · 4 comments · Fixed by #2033
Closed

zio-streams example does not terminate in scala-cli, but does when run in IntelliJ #1933

bbarker opened this issue Mar 16, 2023 · 4 comments · Fixed by #2033
Assignees
Labels
bug Something isn't working script-wrapper
Projects

Comments

@bbarker
Copy link

bbarker commented Mar 16, 2023

Version(s)

$ scala-cli --version
Scala CLI version: 0.2.1
Scala version (default): 3.2.2

This is running on OS X.

Describe the bug
A simple zio-streams example, included below, hangs when used in scala-cli, though it terminates normally when run in IntelliJ as a ZIO App:

object StreamExample extends ZIOAppDefault {
  override val run = {
    val points = Chunk(5, 10, 15, 20, 100, 200, 300)
​
    val natStream = ZStream.iterate(0) { i =>
      println(i)
      i + 1
    }
​
    ZIO.foreach(points)(point => natStream.take(point).runCollect.debug)
  }
}

To Reproduce

using lib "dev.zio::zio-streams:2.0.10"

import zio.*
import zio.stream.*

val points = Chunk(5, 10, 15, 20, 100, 200, 300)

val natStream = ZStream.iterate(0)( /* _ + 1*/ foo => { println(foo); foo + 1 })

val program =
  ZIO.foreach(points)(p => natStream.take(p).runCollect.map(_.sum))

Unsafe.unsafe { implicit unsafe =>
  Runtime.default.unsafe.run(program)
}

Then try running the script - for me it hangs at the end of executing the first stream (.take(5)):

$ scala-cli ZStreamIncrementalTake.sc 
Compiling project (Scala 3.2.2, JVM)
Compiled project (Scala 3.2.2, JVM)
0
1
2
3
4

Expected behaviour
The script should terminate normally.

@bbarker bbarker added the bug Something isn't working label Mar 16, 2023
@bbarker
Copy link
Author

bbarker commented Mar 16, 2023

Hmm, the following example does run (just adding StreamExample.main(Array.empty) to the ZIOAppDefault variant):

using lib "dev.zio::zio-streams:2.0.10"

import zio.*
import zio.stream.*

object StreamExample extends ZIOAppDefault {
  override val run = {
    val points = Chunk(5, 10, 15, 20, 100, 200, 300)

    val natStream = ZStream.iterate(0) { i =>
      println(i)
      i + 1
    }

    ZIO.foreach(points)(point => natStream.take(point).runCollect.debug)
  }
}

StreamExample.main(Array.empty)

Maybe it is a ZIO (or ZIO usage) issue.

@romanowski
Copy link
Member

Hi @bbarker ,

Indeed the app hangs in Scala CLI when Unsafe is used, and the stack trace shows that the main thread is blocked within Unsafe$.unsafe call, and at first glance, it does not look related to any of the transformations that Scala CLI does.

The code that works in Intellij works in Scala CLI as well (ones using ZIOAppDefault), both when used from within a .scala file or within .sc file calling main() directly.

"main" #1 prio=5 os_prio=31 cpu=270.46ms elapsed=41.61s tid=0x000000015880ae00 nid=0x1803 in Object.wait()  [0x000000016d789000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@17/Native Method)
	- waiting on <0x000000070ee1a780> (a zio.internal.OneShot)
	at java.lang.Object.wait(java.base@17/Object.java:338)
	at zio.internal.OneShot.get(OneShot.scala:83)
	- locked <0x000000070ee1a780> (a zio.internal.OneShot)
	at zio.Runtime$UnsafeAPIV1.run(Runtime.scala:139)
	at zio$u002Estream$.$init$$$anonfun$4(zio.stream.sc:14)
	at zio$u002Estream$$$Lambda$32/0x0000000800cfe9e0.apply(Unknown Source)
	at zio.Unsafe$.unsafe(Unsafe.scala:37)
	at zio$u002Estream$.<clinit>(zio.stream.sc:14)
	at zio$u002Estream_sc$.main(zio.stream.sc:31)
	at zio$u002Estream_sc.main(zio.stream.sc)

@dacr
Copy link

dacr commented Apr 2, 2023

Hi, I've many examples where scala-cli hangs in script mode, while the same code will run fine in the REPL. I've described some simples examples in #532, in the latest one I didn't find a workaround and I'm stucked :

"main" #1 prio=5 os_prio=0 cpu=865,59ms elapsed=383,93s tid=0x00007f38e401b570 nid=0x476e1 in Object.wait()  [0x00007f38e842e000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(java.base@17.0.6/Native Method)
        - waiting on <0x000000041a800000> (a zio.internal.OneShot)
        at java.lang.Object.wait(java.base@17.0.6/Object.java:338)
        at zio.internal.OneShot.get(OneShot.scala:83)
        - locked <0x000000041a800000> (a zio.internal.OneShot)
        at zio.Runtime$UnsafeAPIV1.run(Runtime.scala:139)
        at zio.worksheet.package$RunSyntax.unsafeRun$$anonfun$1(package.scala:9)
        at zio.worksheet.package$RunSyntax$$Lambda$57/0x0000000800cf28c8.apply(Unknown Source)
        at zio.Unsafe$.unsafeCompat(Unsafe.scala:41)
        at zio.worksheet.package$RunSyntax.unsafeRun(package.scala:9)
        at zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1$.<clinit>(zio-learning-sttp-client-json-circe-1.sc:61)
        at zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1_sc$.main(zio-learning-sttp-client-json-circe-1.sc:77)
        at zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1_sc.main(zio-learning-sttp-client-json-circe-1.sc)

May be something related to class initialization :

"ZScheduler-Worker-2" #16 daemon prio=5 os_prio=0 cpu=55,86ms elapsed=383,69s tid=0x00007f38e4638440 nid=0x476f6 in Object.wait()  [0x00007f388ddfc000]
   java.lang.Thread.State: RUNNABLE
        at zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1$$anon$2$$Lambda$799/0x0000000801060508.apply(Unknown Source)
        - waiting on the Class initialization monitor for zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1$
        at io.circe.derivation.ConfiguredDecoder.decodeProduct$$anonfun$3(ConfiguredDecoder.scala:139)
        at io.circe.derivation.ConfiguredDecoder$$Lambda$802/0x0000000801061750.apply(Unknown Source)
        at io.circe.derivation.ConfiguredDecoder.decodeProductBase(ConfiguredDecoder.scala:105)
        at io.circe.derivation.ConfiguredDecoder.decodeProduct(ConfiguredDecoder.scala:141)
        at io.circe.derivation.ConfiguredDecoder.decodeProduct$(ConfiguredDecoder.scala:12)
        at zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1$$anon$2.decodeProduct(zio-learning-sttp-client-json-circe-1.sc:81)
        at zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1$$anon$2.apply(zio-learning-sttp-client-json-circe-1.sc:35)
        at io.circe.Decoder.decodeJson(Decoder.scala:105)
        at io.circe.Decoder.decodeJson$(Decoder.scala:54)
        at zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1$$anon$2.decodeJson(zio-learning-sttp-client-json-circe-1.sc:81)
        at io.circe.Parser.finishDecode(Parser.scala:12)
        at io.circe.Parser.finishDecode$(Parser.scala:6)
        at io.circe.parser.package$.finishDecode(package.scala:5)
        at io.circe.Parser.decode(Parser.scala:27)
        at io.circe.Parser.decode$(Parser.scala:6)
        at io.circe.parser.package$.decode(package.scala:5)
        at sttp.client3.circe.SttpCirceApi.deserializeJson$$anonfun$1(SttpCirceApi.scala:48)

the script I was running :

// ---------------------
//> using scala  "3.2.2"
//> using dep "dev.zio::zio:2.0.10"
//> using dep "fr.janalyse::zio-worksheet:2.0.10.0"
//> using dep "com.softwaremill.sttp.client3::async-http-client-backend-zio:3.8.14"
//> using dep "com.softwaremill.sttp.client3::circe:3.8.14"
//> using dep "io.circe::circe-generic:0.14.5"
//> using dep "org.slf4j:slf4j-nop:2.0.7"
// ---------------------

import zio.*, zio.worksheet.*
import sttp.client3.*
import sttp.client3.asynchttpclient.zio.*
import sttp.client3.circe.*
import io.circe.generic.auto.*
import io.circe.parser.*
import io.circe.syntax.*

case class ClientInfo(clientIP: String, userAgent: String) // derives io.circe.codec.Codec.AsObject

// -------------------------------------------------------------
// THE APPLICATION LOGIC
val logic: ZIO[SttpBackend[Task, Any], Throwable, Unit] = for {
  backend    <- ZIO.service[SttpBackend[Task, Any]]
  request     = basicRequest.get(uri"https://mapland.fr/clientInfo").response(asJson[ClientInfo])
  response   <- backend.send(request)
  clientInfo <- ZIO.from(response.body)
  _          <- Console.printLine(clientInfo.userAgent)
  _          <- Console.printLine(clientInfo.asJson.toString)
} yield ()

// -------------------------------------------------------------

val httpRealLayer = AsyncHttpClientZioBackend.layer()

// -------------------------------------------------------------

val httpStubLayer = ZLayer.succeed(
  AsyncHttpClientZioBackend.stub
    .whenRequestMatches(_.uri.toString() == "https://mapland.fr/clientInfo")
    .thenRespond("""{"clientIP":"127.0.0.1","userAgent":"curl/42"}""")
)

// -------------------------------------------------------------

val app = for {
  _ <- logic.provide(httpRealLayer) // EXECUTED USING REAL STTP ENVIRONNEMENT
  _ <- logic.provide(httpStubLayer) // EXECUTED USING STUBBED STTP ENVIRONNEMENT
} yield ()

app.unsafeRun

@dacr
Copy link

dacr commented Apr 2, 2023

This is not the same issue as for #1905 I've checked and tested with the --server=false but in fact the compilation phase works fine, it hangs in early phasis when the code is started.

The full thread dump :

scl zio-learning-sttp-client-json-circe-1.sc --server=false
^\2023-04-02 18:00:42
Full thread dump OpenJDK 64-Bit Server VM (17.0.6+10-Ubuntu-0ubuntu122.04 mixed mode, sharing):

Threads class SMR info:
_java_thread_list=0x00007f37f4003fb0, length=26, elements={
0x00007f38e401b570, 0x00007f38e41c9060, 0x00007f38e41ca460, 0x00007f38e41cf5e0,
0x00007f38e41d09b0, 0x00007f38e41d1de0, 0x00007f38e41d37b0, 0x00007f38e41d4d00,
0x00007f38e41de180, 0x00007f38e41e5dd0, 0x00007f38e41e9880, 0x00007f38e46350c0,
0x00007f38e46379e0, 0x00007f38e4638440, 0x00007f38e46393a0, 0x00007f38e463aa90,
0x00007f38e463bb40, 0x00007f38e463cbf0, 0x00007f38e463dcb0, 0x00007f38e463ed70,
0x00007f38e4930fc0, 0x00007f38e4d950a0, 0x00007f3878000fe0, 0x00007f38300055c0,
0x00007f3800081830, 0x00007f37fc00d4c0
}

"main" #1 prio=5 os_prio=0 cpu=865,59ms elapsed=383,93s tid=0x00007f38e401b570 nid=0x476e1 in Object.wait()  [0x00007f38e842e000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(java.base@17.0.6/Native Method)
        - waiting on <0x000000041a800000> (a zio.internal.OneShot)
        at java.lang.Object.wait(java.base@17.0.6/Object.java:338)
        at zio.internal.OneShot.get(OneShot.scala:83)
        - locked <0x000000041a800000> (a zio.internal.OneShot)
        at zio.Runtime$UnsafeAPIV1.run(Runtime.scala:139)
        at zio.worksheet.package$RunSyntax.unsafeRun$$anonfun$1(package.scala:9)
        at zio.worksheet.package$RunSyntax$$Lambda$57/0x0000000800cf28c8.apply(Unknown Source)
        at zio.Unsafe$.unsafeCompat(Unsafe.scala:41)
        at zio.worksheet.package$RunSyntax.unsafeRun(package.scala:9)
        at zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1$.<clinit>(zio-learning-sttp-client-json-circe-1.sc:61)
        at zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1_sc$.main(zio-learning-sttp-client-json-circe-1.sc:77)
        at zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1_sc.main(zio-learning-sttp-client-json-circe-1.sc)

"Reference Handler" #2 daemon prio=10 os_prio=0 cpu=0,99ms elapsed=383,92s tid=0x00007f38e41c9060 nid=0x476e8 waiting on condition  [0x00007f38a44cf000]
   java.lang.Thread.State: RUNNABLE
        at java.lang.ref.Reference.waitForReferencePendingList(java.base@17.0.6/Native Method)
        at java.lang.ref.Reference.processPendingReferences(java.base@17.0.6/Reference.java:253)
        at java.lang.ref.Reference$ReferenceHandler.run(java.base@17.0.6/Reference.java:215)

"Finalizer" #3 daemon prio=8 os_prio=0 cpu=0,34ms elapsed=383,92s tid=0x00007f38e41ca460 nid=0x476e9 in Object.wait()  [0x00007f38a43cf000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(java.base@17.0.6/Native Method)
        - waiting on <0x000000041680d228> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(java.base@17.0.6/ReferenceQueue.java:155)
        - locked <0x000000041680d228> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(java.base@17.0.6/ReferenceQueue.java:176)
        at java.lang.ref.Finalizer$FinalizerThread.run(java.base@17.0.6/Finalizer.java:172)

"Signal Dispatcher" #4 daemon prio=9 os_prio=0 cpu=0,30ms elapsed=383,92s tid=0x00007f38e41cf5e0 nid=0x476ea waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Service Thread" #5 daemon prio=9 os_prio=0 cpu=2,45ms elapsed=383,92s tid=0x00007f38e41d09b0 nid=0x476eb runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Monitor Deflation Thread" #6 daemon prio=9 os_prio=0 cpu=12,69ms elapsed=383,92s tid=0x00007f38e41d1de0 nid=0x476ec runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #7 daemon prio=9 os_prio=0 cpu=1397,26ms elapsed=383,92s tid=0x00007f38e41d37b0 nid=0x476ed waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"C1 CompilerThread0" #10 daemon prio=9 os_prio=0 cpu=932,46ms elapsed=383,92s tid=0x00007f38e41d4d00 nid=0x476ee waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"Sweeper thread" #11 daemon prio=9 os_prio=0 cpu=0,12ms elapsed=383,92s tid=0x00007f38e41de180 nid=0x476ef runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Notification Thread" #12 daemon prio=9 os_prio=0 cpu=0,10ms elapsed=383,91s tid=0x00007f38e41e5dd0 nid=0x476f0 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Common-Cleaner" #13 daemon prio=8 os_prio=0 cpu=1,30ms elapsed=383,91s tid=0x00007f38e41e9880 nid=0x476f2 in Object.wait()  [0x00007f388ea0c000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(java.base@17.0.6/Native Method)
        - waiting on <no object reference available>
        at java.lang.ref.ReferenceQueue.remove(java.base@17.0.6/ReferenceQueue.java:155)
        - locked <0x0000000416804738> (a java.lang.ref.ReferenceQueue$Lock)
        at jdk.internal.ref.CleanerImpl.run(java.base@17.0.6/CleanerImpl.java:140)
        at java.lang.Thread.run(java.base@17.0.6/Thread.java:833)
        at jdk.internal.misc.InnocuousThread.run(java.base@17.0.6/InnocuousThread.java:162)

"ZScheduler-Worker-0" #14 daemon prio=5 os_prio=0 cpu=53,37ms elapsed=383,69s tid=0x00007f38e46350c0 nid=0x476f4 waiting on condition  [0x00007f388dffe000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@17.0.6/Native Method)
        at java.util.concurrent.locks.LockSupport.park(java.base@17.0.6/LockSupport.java:341)
        at zio.internal.ZScheduler$$anon$4.run(ZScheduler.scala:451)

"ZScheduler-Worker-1" #15 daemon prio=5 os_prio=0 cpu=1,70ms elapsed=383,69s tid=0x00007f38e46379e0 nid=0x476f5 waiting on condition  [0x00007f388defe000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@17.0.6/Native Method)
        at java.util.concurrent.locks.LockSupport.park(java.base@17.0.6/LockSupport.java:341)
        at zio.internal.ZScheduler$$anon$4.run(ZScheduler.scala:451)

"ZScheduler-Worker-2" #16 daemon prio=5 os_prio=0 cpu=55,86ms elapsed=383,69s tid=0x00007f38e4638440 nid=0x476f6 in Object.wait()  [0x00007f388ddfc000]
   java.lang.Thread.State: RUNNABLE
        at zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1$$anon$2$$Lambda$799/0x0000000801060508.apply(Unknown Source)
        - waiting on the Class initialization monitor for zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1$
        at io.circe.derivation.ConfiguredDecoder.decodeProduct$$anonfun$3(ConfiguredDecoder.scala:139)
        at io.circe.derivation.ConfiguredDecoder$$Lambda$802/0x0000000801061750.apply(Unknown Source)
        at io.circe.derivation.ConfiguredDecoder.decodeProductBase(ConfiguredDecoder.scala:105)
        at io.circe.derivation.ConfiguredDecoder.decodeProduct(ConfiguredDecoder.scala:141)
        at io.circe.derivation.ConfiguredDecoder.decodeProduct$(ConfiguredDecoder.scala:12)
        at zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1$$anon$2.decodeProduct(zio-learning-sttp-client-json-circe-1.sc:81)
        at zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1$$anon$2.apply(zio-learning-sttp-client-json-circe-1.sc:35)
        at io.circe.Decoder.decodeJson(Decoder.scala:105)
        at io.circe.Decoder.decodeJson$(Decoder.scala:54)
        at zio$minuslearning$minussttp$minusclient$minusjson$minuscirce$minus1$$anon$2.decodeJson(zio-learning-sttp-client-json-circe-1.sc:81)
        at io.circe.Parser.finishDecode(Parser.scala:12)
        at io.circe.Parser.finishDecode$(Parser.scala:6)
        at io.circe.parser.package$.finishDecode(package.scala:5)
        at io.circe.Parser.decode(Parser.scala:27)
        at io.circe.Parser.decode$(Parser.scala:6)
        at io.circe.parser.package$.decode(package.scala:5)
        at sttp.client3.circe.SttpCirceApi.deserializeJson$$anonfun$1(SttpCirceApi.scala:48)
        at sttp.client3.circe.SttpCirceApi$$Lambda$384/0x0000000800efefc0.apply(Unknown Source)
        at scala.Function1.$anonfun$andThen$1(Function1.scala:87)
        at scala.Function1$$Lambda$131/0x0000000800d6cca0.apply(Unknown Source)
        at sttp.client3.ResponseAs$.deserializeWithError$$anonfun$1(ResponseAs.scala:201)
        at sttp.client3.ResponseAs$$$Lambda$795/0x0000000801046fd8.apply(Unknown Source)
        at sttp.client3.ResponseAs$.deserializeRightWithError$$anonfun$1(ResponseAs.scala:181)
        at sttp.client3.ResponseAs$$$Lambda$385/0x0000000800eff9b8.apply(Unknown Source)
        at sttp.client3.MappedResponseAs.mapWithMetadata$$anonfun$1(ResponseAs.scala:92)
        at sttp.client3.MappedResponseAs$$Lambda$334/0x0000000800ea2e98.apply(Unknown Source)
        at sttp.client3.internal.BodyFromResponseAs.doApply$$anonfun$2$$anonfun$1$$anonfun$1(BodyFromResponseAs.scala:25)
        at sttp.client3.internal.BodyFromResponseAs$$Lambda$788/0x00000008010452d0.apply(Unknown Source)
        at sttp.client3.impl.zio.RIOMonadAsyncError.eval$$anonfun$1(RIOMonadAsyncError.scala:29)
        at sttp.client3.impl.zio.RIOMonadAsyncError$$Lambda$789/0x0000000801045590.apply(Unknown Source)
        at zio.ZIOCompanionVersionSpecific.attempt$$anonfun$1(ZIOCompanionVersionSpecific.scala:103)
        at zio.ZIOCompanionVersionSpecific$$Lambda$227/0x0000000800d9ab70.apply(Unknown Source)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1121)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:944)
        at zio.internal.FiberRuntime.evaluateEffect(FiberRuntime.scala:391)
        at zio.internal.FiberRuntime.evaluateMessageWhileSuspended(FiberRuntime.scala:514)
        at zio.internal.FiberRuntime.drainQueueOnCurrentThread(FiberRuntime.scala:230)
        at zio.internal.FiberRuntime.run(FiberRuntime.scala:139)
        at zio.internal.ZScheduler$$anon$4.run(ZScheduler.scala:476)

"ZScheduler-Worker-3" #17 daemon prio=5 os_prio=0 cpu=0,35ms elapsed=383,69s tid=0x00007f38e46393a0 nid=0x476f7 waiting on condition  [0x00007f388dcfe000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@17.0.6/Native Method)
        at java.util.concurrent.locks.LockSupport.park(java.base@17.0.6/LockSupport.java:341)
        at zio.internal.ZScheduler$$anon$4.run(ZScheduler.scala:451)

"ZScheduler-Worker-4" #18 daemon prio=5 os_prio=0 cpu=0,35ms elapsed=383,69s tid=0x00007f38e463aa90 nid=0x476f8 waiting on condition  [0x00007f388dbfe000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@17.0.6/Native Method)
        at java.util.concurrent.locks.LockSupport.park(java.base@17.0.6/LockSupport.java:341)
        at zio.internal.ZScheduler$$anon$4.run(ZScheduler.scala:451)

"ZScheduler-Worker-5" #19 daemon prio=5 os_prio=0 cpu=16,34ms elapsed=383,69s tid=0x00007f38e463bb40 nid=0x476f9 waiting on condition  [0x00007f388dafe000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@17.0.6/Native Method)
        at java.util.concurrent.locks.LockSupport.park(java.base@17.0.6/LockSupport.java:341)
        at zio.internal.ZScheduler$$anon$4.run(ZScheduler.scala:451)

"ZScheduler-Worker-6" #20 daemon prio=5 os_prio=0 cpu=10,73ms elapsed=383,69s tid=0x00007f38e463cbf0 nid=0x476fa waiting on condition  [0x00007f388d9fe000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@17.0.6/Native Method)
        at java.util.concurrent.locks.LockSupport.park(java.base@17.0.6/LockSupport.java:341)
        at zio.internal.ZScheduler$$anon$4.run(ZScheduler.scala:451)

"ZScheduler-Worker-7" #21 daemon prio=5 os_prio=0 cpu=0,13ms elapsed=383,69s tid=0x00007f38e463dcb0 nid=0x476fb waiting on condition  [0x00007f388d8fe000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@17.0.6/Native Method)
        at java.util.concurrent.locks.LockSupport.park(java.base@17.0.6/LockSupport.java:341)
        at zio.internal.ZScheduler$$anon$4.run(ZScheduler.scala:451)

"ZScheduler-Supervisor" #22 daemon prio=5 os_prio=0 cpu=221,34ms elapsed=383,69s tid=0x00007f38e463ed70 nid=0x476fc waiting on condition  [0x00007f388d7fe000]
   java.lang.Thread.State: TIMED_WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@17.0.6/Native Method)
        at java.util.concurrent.locks.LockSupport.parkUntil(java.base@17.0.6/LockSupport.java:410)
        at zio.internal.ZScheduler$$anon$3.run(ZScheduler.scala:316)

"AsyncHttpClient-timer-1-1" #24 prio=5 os_prio=0 cpu=223,08ms elapsed=383,47s tid=0x00007f38e4930fc0 nid=0x476fe waiting on condition  [0x00007f388d6fe000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(java.base@17.0.6/Native Method)
        at io.netty.util.HashedWheelTimer$Worker.waitForNextTick(HashedWheelTimer.java:569)
        at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:465)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(java.base@17.0.6/Thread.java:833)

"AsyncHttpClient-3-1" #25 prio=5 os_prio=0 cpu=135,77ms elapsed=383,06s tid=0x00007f38e4d950a0 nid=0x47707 runnable  [0x00007f388cdee000]
   java.lang.Thread.State: RUNNABLE
        at sun.nio.ch.EPoll.wait(java.base@17.0.6/Native Method)
        at sun.nio.ch.EPollSelectorImpl.doSelect(java.base@17.0.6/EPollSelectorImpl.java:118)
        at sun.nio.ch.SelectorImpl.lockAndDoSelect(java.base@17.0.6/SelectorImpl.java:129)
        - locked <0x0000000416c90b60> (a io.netty.channel.nio.SelectedSelectionKeySet)
        - locked <0x0000000416c90b10> (a sun.nio.ch.EPollSelectorImpl)
        at sun.nio.ch.SelectorImpl.select(java.base@17.0.6/SelectorImpl.java:146)
        at io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:68)
        at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:810)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:457)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(java.base@17.0.6/Thread.java:833)

"Attach Listener" #26 daemon prio=9 os_prio=0 cpu=95,12ms elapsed=382,73s tid=0x00007f3878000fe0 nid=0x47708 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"ZScheduler-2" #27 daemon prio=5 os_prio=0 cpu=0,12ms elapsed=382,59s tid=0x00007f38300055c0 nid=0x47709 waiting on condition  [0x00007f388c2fe000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@17.0.6/Native Method)
        at java.util.concurrent.locks.LockSupport.park(java.base@17.0.6/LockSupport.java:341)
        at zio.internal.ZScheduler$$anon$4.run(ZScheduler.scala:451)

"RMI TCP Accept-0" #28 daemon prio=9 os_prio=0 cpu=1,07ms elapsed=382,35s tid=0x00007f3800081830 nid=0x4770b runnable  [0x00007f388c1fe000]
   java.lang.Thread.State: RUNNABLE
        at sun.nio.ch.Net.accept(java.base@17.0.6/Native Method)
        at sun.nio.ch.NioSocketImpl.accept(java.base@17.0.6/NioSocketImpl.java:755)
        at java.net.ServerSocket.implAccept(java.base@17.0.6/ServerSocket.java:675)
        at java.net.ServerSocket.platformImplAccept(java.base@17.0.6/ServerSocket.java:641)
        at java.net.ServerSocket.implAccept(java.base@17.0.6/ServerSocket.java:617)
        at java.net.ServerSocket.implAccept(java.base@17.0.6/ServerSocket.java:574)
        at java.net.ServerSocket.accept(java.base@17.0.6/ServerSocket.java:532)
        at sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(jdk.management.agent@17.0.6/LocalRMIServerSocketFactory.java:52)
        at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(java.rmi@17.0.6/TCPTransport.java:413)
        at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(java.rmi@17.0.6/TCPTransport.java:377)
        at java.lang.Thread.run(java.base@17.0.6/Thread.java:833)

"RMI Scheduler(0)" #30 daemon prio=9 os_prio=0 cpu=0,83ms elapsed=382,33s tid=0x00007f37fc00d4c0 nid=0x4770e waiting on condition  [0x00007f380e7fd000]
   java.lang.Thread.State: TIMED_WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@17.0.6/Native Method)
        - parking to wait for  <0x00000004536c1f88> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.parkNanos(java.base@17.0.6/LockSupport.java:252)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(java.base@17.0.6/AbstractQueuedSynchronizer.java:1672)
        at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@17.0.6/ScheduledThreadPoolExecutor.java:1182)
        at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@17.0.6/ScheduledThreadPoolExecutor.java:899)
        at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@17.0.6/ThreadPoolExecutor.java:1062)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@17.0.6/ThreadPoolExecutor.java:1122)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@17.0.6/ThreadPoolExecutor.java:635)
        at java.lang.Thread.run(java.base@17.0.6/Thread.java:833)

"VM Thread" os_prio=0 cpu=33,27ms elapsed=383,93s tid=0x00007f38e41c50c0 nid=0x476e7 runnable  

"GC Thread#0" os_prio=0 cpu=11,46ms elapsed=383,94s tid=0x00007f38e404bbb0 nid=0x476e2 runnable  

"GC Thread#1" os_prio=0 cpu=10,23ms elapsed=383,39s tid=0x00007f3888006040 nid=0x476ff runnable  

"GC Thread#2" os_prio=0 cpu=10,63ms elapsed=383,39s tid=0x00007f3888006a90 nid=0x47700 runnable  

"GC Thread#3" os_prio=0 cpu=13,76ms elapsed=383,39s tid=0x00007f38880074e0 nid=0x47701 runnable  

"GC Thread#4" os_prio=0 cpu=6,80ms elapsed=383,39s tid=0x00007f3888007f30 nid=0x47702 runnable  

"GC Thread#5" os_prio=0 cpu=13,43ms elapsed=383,39s tid=0x00007f3888008980 nid=0x47703 runnable  

"GC Thread#6" os_prio=0 cpu=6,95ms elapsed=383,39s tid=0x00007f38880093d0 nid=0x47704 runnable  

"GC Thread#7" os_prio=0 cpu=12,86ms elapsed=383,39s tid=0x00007f3888009e20 nid=0x47705 runnable  

"G1 Main Marker" os_prio=0 cpu=0,54ms elapsed=383,94s tid=0x00007f38e405cca0 nid=0x476e3 runnable  

"G1 Conc#0" os_prio=0 cpu=8,74ms elapsed=383,94s tid=0x00007f38e405dc20 nid=0x476e4 runnable  

"G1 Conc#1" os_prio=0 cpu=9,56ms elapsed=383,25s tid=0x00007f3898000ea0 nid=0x47706 runnable  

"G1 Refine#0" os_prio=0 cpu=0,11ms elapsed=383,93s tid=0x00007f38e4191b10 nid=0x476e5 runnable  

"G1 Service" os_prio=0 cpu=79,87ms elapsed=383,93s tid=0x00007f38e4192a20 nid=0x476e6 runnable  

"VM Periodic Task Thread" os_prio=0 cpu=271,72ms elapsed=383,91s tid=0x00007f38e41e7b20 nid=0x476f1 waiting on condition  

JNI global refs: 29, weak refs: 0

Heap
 garbage-first heap   total 139264K, used 59742K [0x0000000414800000, 0x0000000800000000)
  region size 8192K, 4 young (32768K), 1 survivors (8192K)
 Metaspace       used 41160K, committed 41536K, reserved 1089536K
  class space    used 4700K, committed 4864K, reserved 1048576K

@Gedochao Gedochao added this to To do in Issue Board via automation Apr 3, 2023
@MaciejG604 MaciejG604 linked a pull request Apr 12, 2023 that will close this issue
@MaciejG604 MaciejG604 moved this from To do to In progress in Issue Board May 8, 2023
@MaciejG604 MaciejG604 self-assigned this May 8, 2023
@MaciejG604 MaciejG604 moved this from In progress to Done in Issue Board May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working script-wrapper
Projects
Development

Successfully merging a pull request may close this issue.

4 participants