mojira.dev
MC-63802

Server hangs after /stop when players are still online

When I do /stop, my server console will not close. It saves and all that, then I have to cmd-opt-esc (open force quit menu) and force quit the console. When I restart it, everything is saved, but the only problem is that force-quitting just does not feel right. I'll edit this if it comes out not saving. I am running a mac OSX Mountain Loin. Thanks.

P.s. It closes normally if there is no one on the server.

CONSOLE OUTPUT:
[11:22:39 INFO]: Stopping server
[11:22:39 INFO]: Saving players
[11:22:39 INFO]: Saving worlds
[11:22:39 INFO]: Saving chunks for level 'New Creative Server Photos'/Overworld
[11:22:40 INFO]: Saving chunks for level 'New Creative Server Photos'/Nether
[11:22:40 INFO]: Saving chunks for level 'New Creative Server Photos'/The End
[11:22:40 INFO]: Stopping server
at the 'Stopping server' part it does nothing else and won't close unless I force quit the console.

Linked issues

Comments 27

Cannot confirm, getting that in the console:

D:\MineCraft\server-test>java.exe -Xmx2G -Xms2G -jar minecraft_server.14w30c.jar --nogui
[09:01:52] [Server thread/INFO]: Starting minecraft server version 14w30c
[09:01:52] [Server thread/INFO]: Loading properties
[09:01:52] [Server thread/INFO]: Default game type: SURVIVAL
[09:01:52] [Server thread/INFO]: Generating keypair
[09:01:52] [Server thread/INFO]: Starting Minecraft server on *:25566
[09:01:53] [Server thread/INFO]: Preparing level "Molokai"
[09:01:53] [Server thread/INFO]: Preparing start region for level 0
[09:01:54] [Server thread/INFO]: Preparing spawn area: 2%
[09:01:55] [Server thread/INFO]: Preparing spawn area: 27%
[09:01:56] [Server thread/INFO]: Done (3,319s)! For help, type "help" or "?"
stop
[09:02:07] [Server thread/INFO]: Stopping the server
[09:02:07] [Server thread/INFO]: Stopping server
[09:02:07] [Server thread/INFO]: Saving players
[09:02:07] [Server thread/INFO]: Saving worlds
[09:02:07] [Server thread/INFO]: Saving chunks for level 'Molokai'/Overworld
[09:02:07] [Server thread/INFO]: Saving chunks for level 'Molokai'/Nether
[09:02:07] [Server thread/INFO]: Saving chunks for level 'Molokai'/The End
[09:02:07] [Server Shutdown Thread/INFO]: Stopping server

D:\MineCraft\server-test>

Please attach your console output after issuing "stop"

I can confirm this is an issue. The console output is the same except it doesn't exit.
SIGTERM is ignored so I have to SIGKILL.

Tested on:
CentOS 6.5

openjdk version "1.8.0-internal"
OpenJDK Runtime Environment (build 1.8.0-internal-0)
OpenJDK 64-Bit Server VM (build 25.0-b57-internal, mixed mode)

I just did a few tests and it only happens if people are still connected when you do /stop. Entering the command into an empty server (i.e. 0 players online) will successfully exit.

Also confirmed on:
Kubuntu 14.04

java version "1.8.0_11"
Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)

Ultimate Omicron

Also happens for me on latest (32b, 32c crashes everyone for me) when there are online players.

This makes zero-maintenance batch-restarters useless, because when I remotely /stop I'm still online and it locks up, requiring me to get to the physical machine.

If command blocks could /stop, this would have a workaround.

A usable workaround, though, would be to have a sniffer program look up a magic word on server log files and kill java when it finds that.

Ultimate Omicron

Was this fixed? I am currently using a sniffer to manually kill the server due to being unable to stop from inside.

17 more comments
Dlawso the Really Lucky Rabbit

Is this fixed in 1.8.1-pre3?

According to MC-72806 it's fixed.
Also I can not reproduce it in 1.8.1-pre3 any more while I can in earlier versions.
It's fixed 🙂

Thanks a lot for fixing this bug!
It really helps

Can someone change 'fix versions' to 1.8.1 pre-3?

Resolved as duplicate of MC-72806

Random Ness

(Unassigned)

Community Consensus

Minecraft 14w30c, Minecraft 1.8-pre1, Minecraft 1.8-pre3, Minecraft 1.8, Minecraft 1.8.1-pre1

Retrieved