
[Bug Report]: RCON Listener stuck thread when requested to shut down
thegamecracks opened this issue ยท 13 comments
Modpack Version
1.23.0
Describe your issue.
When I try to shut down my server, AllTheLeaks is left continuously reporting RCON Listener as a stuck thread and won't exit indefinitely. This message repeats every 10 seconds:
[02:38:06] [Thread-755/INFO] [STDOUT/]: [dev.uncandango.alltheleaks.AllTheLeaks:lambda$printNonDaemonThreads$2:73]: AllTheLeaks: Listing stuck threads...
[02:38:06] [Thread-755/INFO] [STDOUT/]: [dev.uncandango.alltheleaks.AllTheLeaks:listThreads:86]: Stuck thread: RCON Listener #1
I believe it only happens with Confirmed in the comments, this issue is reproducible only with enable-rcon=true
just from the message, but I haven't tried disabling RCON yet and still need it to be enabled for my backup script to work.enable-rcon=true
and an RCON password set. With RCON disabled, the server shuts down normally.
I've tried stopping it using Ctrl+C, the /stop command, and SIGINT in a systemd service, all of which result in the same issue. The last one does have a timeout to SIGKILL the process group, but that only happens if I request a restart with systemctl; if I trigger it with /stop, Craftoria hangs on the stuck thread and systemd doesn't treat the process as stopping, so it never sends the SIGKILL timeout.
Also FWIW, if I run startserver.sh directly from a shell and then interrupt it, the server returns control to my shell and I can run commands again, but AllTheLeaks prints over what I'm typing/viewing. Manually sending SIGINT to the java process from htop stops it.
Crash Report
No response
Latest Log
https://gist.github.com/thegamecracks/4071bfde7315517610f2cd482950537f
Have you modified the modpack?
No
User Modifications
No response
Did the issue happen in singleplayer or on a server?
Server
Discord Username
thegamecracks (see also #bug-reports post)
are you able to provide the full latest.log rather than cutting out what you think may be important?
can you also provide the debug.log?
are you able to provide the full latest.log rather than cutting out what you think may be important? can you also provide the debug.log?
Re-ran startserver.sh on a fresh instance with enable-rcon=true
in server.properties, and stopped from console with stop
command:
- latest.log: https://gist.github.com/thegamecracks/4b3ebf12603103de1d3d249a7212d866
- debug.log: debug.log (direct uploaded due to filesize limit)
When repeating with enable-rcon=false
, the server shuts down as expected.
does your system retain a constant connection to rcon or does it only connect when it needs to send a command?
also, can you attempt running your server with neoforge's server starter using the java argument --installer 21.1.193
for example: java -Xmx5G -jar neoforge-server-starter.jar --installer 21.1.193
https://github.com/neoforged/ServerStarterJar/releases/tag/0.1.34
edit: oops, its 21.1.193
does your system retain a constant connection to rcon or does it only connect when it needs to send a command?
The latter, my script connects each time to send commands. The above issue was also triggered without an RCON connection, just starting the server and stopping it.
also, can you attempt running your server with neoforge's server starter using the java argument
--installer 21.1.193
Re-ran with java -Xmx5G -jar serverstarter-2.4.1.jar --installer 21.1.193
, issue occured again:
- latest.log: https://gist.github.com/thegamecracks/92375a913d98af759997adc5960a8b4c
- debug.log: debug.log
just to clarify, you are using neoforge's serverstarter (linked) not the one provided by AOE's server pack, right?
and just as a test, to make sure its not crashing out before clearing rcon thread due to craftoria core's config lookup at server close, can you remove craftoria core from the mods folder or replace it with a nightly build (i have it build via github actions here https://github.com/Linguardium/craftoria-core/actions/runs/16433016140/artifacts/3583330094 )
just to clarify, you are using neoforge's serverstarter (linked) not the one provided by AOE's server pack, right?
Ahh my mistake, I didn't try it with their executable. Here's the output, crashed during startup:
- latest.log: https://gist.github.com/thegamecracks/45a21d9893d8ee586545209fa74c5855
- debug.log: debug.log
and just as a test, to make sure its not crashing out before clearing rcon thread due to craftoria core's config lookup at server close, can you remove craftoria core from the mods folder or replace it with a nightly build (i have it build via github actions here https://github.com/Linguardium/craftoria-core/actions/runs/16433016140/artifacts/3583330094 )
Ran with craftoria_core removed (using starter from server pack), server successfully stopped:
- latest.log: https://gist.github.com/thegamecracks/815273fc25fb3d84aa70e87fe335d492
- debug.log: debug.log
And with your linked artifiact, the config value exception was fixed and server successfully stopped as well:
- latest.log: https://gist.github.com/thegamecracks/f718ccad6956af8d2456ef2782c39105
- debug.log: debug.log
Thanks for the help! Would it be fine to use this build server-side only until the next release of Craftoria comes out?
it may be required on both sides in order to connect, due to some of the changes in dev. you can try connecting with the "from curseforge" version on client and the nightly on server and see if it lets you connect
Oh yeah, I should have tried that earlier! My client dropped with the message, The server send registries with unknown keys: ResourceKey[minecraft:item / craftoria_core:logo]
, so it looks like it isn't compatible.
I reverted the changes and cherry picked just the crash fix changes. should be building now and will be listed in the Artifacts section once done. try that on server with normal one on client https://github.com/Linguardium/craftoria-core/actions/runs/16855881327
Swapped out Craftoria Core on server and I can now join it as normal and shut down the server without the config exception. Thanks! I'll link it in the Discord too, in case anyone else comes across the thread.