Server can't fully stop after placing battery
XenonDB opened this issue ยท 2 comments
Issue type:
- ๐ Bug
Short description:
This bug is found when I playing Direwolf20 1.16 pack with friends. Here is the issue posted at there.
After lots of testing, I found a strange thread still alive after stopping the server.
This thread comes from IntegratedDynamics.
Then I found this thread is created by Energy Battery in my base after lots of chunk deleting testing.
Steps to reproduce the problem:
- Start a server only have IntegratedDynamics and its library installed.
- Join the server and take an Energy battery from creative tab.
- Put the battery in the world and stop the server.
- JVM can't fully shutdown even though server thread has died.
Expected behaviour:
Server and JVM should be fully shutdown.
Versions:
- This mod: IntegratedDynamics-1.16.5-1.5.1
- Minecraft: 1.16.5
- Forge: 1.16.5_36.0.45
Additional information:
This bug can be prevented by setting "ingredientNetworkObserverEnableMultithreading" to false in integrateddynamics-common.toml or launching server by OpenJ9.
Moreover, I think the actual reason is "Executors.newFixedThreadPool"
The document indicates "The threads in the pool will exist until it is explicitly shutdown"
https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool-int-