-
-
Notifications
You must be signed in to change notification settings - Fork 6
Saturated CPU after some daemon commands #9
Description
Hey, I don't know if this is the right channel to report this or if I should post it somewhere else (like in Discord). However it seems to be related to JNI
implementation according to thread dump below:
"paperd-Message-Response-Handler-7" #94 prio=5 os_prio=0 cpu=35830,13ms elapsed=42,75s tid=0x00007ff88c00a800 nid=0x1b1d runnable [0x00007ff7e5c13000] java.lang.Thread.State: RUNNABLE at com.destroystokyo.paper.daemon.PaperDaemonJni.receiveMessage(Native Method) at com.destroystokyo.paper.daemon.PaperDaemon$MessageHandler.run(PaperDaemon.java:448) at java.util.concurrent.Executors$RunnableAdapter.call([email protected]/Executors.java:515) at java.util.concurrent.FutureTask.run([email protected]/FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker([email protected]/ThreadPoolExecutor.java:1130) at java.util.concurrent.ThreadPoolExecutor$Worker.run([email protected]/ThreadPoolExecutor.java:630) at java.lang.Thread.run([email protected]/Thread.java:832)
I noticed that the paperd
daemon inside Paper fully satures the CPU after invoking some commands from the paperd
CLI. It spawns multiple threads and each of them get stuck at the line above.
Setup
Maybe it's just my setup. So here is what I tried. I compiled this project natively (without Docker) from the root project directory and Paper using the daemon feature branch. Copied paperclip out of it (soft symlinks would link to the original source) and started the server using the absolute path of paperd (~/[...]/paperd start
).
Testing
The issue occurs only after interacting with the daemon. I could reproduce it with the console command as well as the status command. Invoking the latter multiple times causes 100% CPU usage.
BTW:
Nice project idea, especially the console feature is very useful. It extends the feature set from existing tools like tmux
.