Comments (6)
It seems that in addition a timer is created during shematic saves that is not cancelled. This leads to a thread "Timer-1" from java.util.TimerThread that also remains live through the shutdown. I'm still tracking this down before filing the PR.
from worldedit.
Realistically for safety I believe that we should be properly shutting down the executor service on mod/plugin unload, not just making these daemon threads.
The Timer
should automatically be GC'd after the schematic save is complete. If a reference remains, that is what should be fixed. I would be interested in a heap dump to see where this is going wrong.
from worldedit.
The executor service should be properly shut down by the PR, that was not made a daemon thread.
The Timer is a bit funny. The actual timer that resolved the hang when it was made a daemon thread is only ever used by the FutureProgressListener constructor. I see an equal number of construltor calls and calls to the run() method which in turn cancels the timer. So in theory there should be no timer reverences anywhere. At the point of the hang all non-daemon threads are already dead except "Timer-1". Either one of the daemon threads hold the reference to the FutureProgressListner Timer or it holds it itself.
from worldedit.
The Timer timer in FutureProgressListener is a static field. It is not going to go away, I guess. Is it actually correct to use a single Timer shared by all instances of FutureProgressListener? That should make them interfere with each other, I think.
There is another Timer in worldedit SessionManager that also keeps the TimerThread alive.
For the Timers it may actually be a better idea to make the threads a daemon. It is unlikely that any timer callbacks can do much good once the server has shut down which it will have done by the time the daemon-ness of the timer (or not) matters.
I am trying to make the timers go away by making some changes:
- the FutureProgressListener timer was made non-static field.
- the SessionManager timer was explicitly nulled on unload.
I still sometimes see the TimerThread being kept alive by Timer@ThreadReaper for a long while, but it eventually goes away. Still, this delay is a can be a problem for servers.
I will look a bit more at this tomorrow.
from worldedit.
This issue has been automatically marked as stale because it has not been fully confirmed. It will be closed if no further activity occurs. Thank you for your contributions.
from worldedit.
Will test latest and get back if it is still an issue.
from worldedit.
Related Issues (20)
- /tool tree command producing trees with inadequate amount of log blocks HOT 2
- //forest, /forestgen, /brush forest not working correctly HOT 1
- Could not dispatch event: com.sk89q.worldedit.event.platform.CommandEvent@724cb3c4 to handler EventHandler{priority=NORMAL}
- When using the //paste or //stack command, the redstone is inserted incorrectly. HOT 3
- world stuck on loading screen
- not able to launch minecraft with world edit
- Compass Navigation Feature Not Working HOT 4
- OutOfMemoryError when using WorldEdit HOT 2
- WorldEdit + Chisel and bits HOT 1
- WorldEdit on Fabric Server causes players to not connect with Java error (packet larger then expected) HOT 7
- Crashing dedicated server 1.20.1 HOT 2
- WorldEdit not recognized by Paper Dedicated Server (ApexMC) HOT 4
- When you //sel to deselect, you get kicked due to packet size "larger than I expected" HOT 1
- worldedit.log is not generated HOT 1
- No support for 1.20.6 HOT 1
- Minecraft shows “connection lost” when running //sel In single player HOT 3
- Not all platforms have been registered yet! Please wait until WorldEdit is initialized. HOT 15
- Paper 1.20.6 - WorldEdit does not contain a paper-plugin.yml or plugin.yml HOT 2
- Adding a toggle for suffocation while generating spheres, pyramids, etc.
- Updating Causes Errors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from worldedit.