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
Server won't stop #505
Comments
I can't reproduce this on a brand new world on linux. I'll add some more debug info to see whats going on in your setup. Through if this is what I suspect it is that might fix it. |
I can't reproduce this again either. Must have been some sort of a race condition or some glitch. |
THere is a race condition in BlockTillQueueEmpty that I'm aware of but can't work out how to fix as it involves a modification between releasing a Mutex and Starting to wait on an event. Keep the Issue open though until Its fixed to track it. Its only an issue when shutting down as otherwise another item is queued and then removed at some point waking it up. |
I got the deadlock again. It seems to happen everytime when the nightbuild is run to produce the APIDump documentation to be uploaded. The nightbuild uses the release mode, so I guess I'll have less info analysing it, wish me luck. I'll check if it happens again in a regular release mode, too. |
It seems that it's the |
I'll fix this. |
Good luck. I couldn't work out any way of getting that method to be race free at all. Theres always a gap between releasing the mutex and starting the wait, during which the event can occur. |
Reopened as the issue still exists only is smaller. |
The issue is fixed, as I've explained in the commit comments. |
Only its not. This code is exactly the same but without the size query hidden behind a method call. |
All you've done is change the timings so there must still be race condition there thats just not surfacing now. |
Right, the issue is still present, but not because of the wait function, that works well, rather it's the WorldStorage code. |
Oh yeah, of course. You changed the way items are enqueued, you first set the "added" event and only then enqueue; that needs to be swapped - first enqueue, then set event. |
When the
stop
command is issued on the server console, the server goes as far asWaiting for the world storage to finish saving
and stays there forever. This is probably caused by the new cQueue class introduced in PR #494.Seen on a Windows version, might be present on other platforms, too.
The text was updated successfully, but these errors were encountered: