Annoying issue being unable to stop Lobby or Game Servers

Post Reply
monkoto
Posts: 3
Joined: Thu May 17, 2018 6:01 pm

Annoying issue being unable to stop Lobby or Game Servers

Post by monkoto » Thu May 17, 2018 6:20 pm

Hey all. Xelloss here, forgot my password and that email is no longer available.

I haven't run DSP in a few years, but it was fairly easy to get back on the bike. Stuff I've tested so far works as I would expect it to do so (admittedly only having played for 15ish mins in my testing atm). There's one annoyance currently though that's proving very irritating. The Lobby and Game servers refuse to die, and if you force kill them they throw a slew of errors. The Search server has no issues.

It's mainly an issue when rebooting the server (what should take 30 seconds on a VM takes 6+ mins with the delay timers) or restarting / stopping a service to load changes to LUA or if you want to pull new GIT files and rebuild.

I'm using Ubuntu 18.04, latest main branch as of this morning. While the logs below are via the SystemD setup, this occurs regardless if you just load it via screen and attempt to stop with a Ctrl+C as well.

Code: Select all

[17/May 23:13][Fatal Error] --- gdb backtrace ---
dsconnect: /usr/include/zmq.hpp:412: void zmq::context_t::close(): Assertion `rc == 0' failed.
/bin/sh: 1: Syntax error: Bad fd number
[17/May 23:13][Fatal Error] --- gdb backtrace ---
dsconnect: /usr/include/zmq.hpp:412: void zmq::context_t::close(): Assertion `rc == 0' failed.
/bin/sh: 1: Syntax error: Bad fd number

...Repeat x Infinity (no seriously it just spams past the buffer)

[17/May 23:13][Fatal Error] --- gdb backtrace ---
dsconnect: /usr/include/zmq.hpp:412: void zmq::context_t::close(): Assertion `rc == 0' failed.
[17/May 23:13][Error] pipe failed for gdb backtrace: Too many open files

Code: Select all

May 17 22:48:45 werfeirverne systemd[1]: Stopping Final Fantasy XI DarkStar Emulator Lobby Server...
May 17 22:50:16 werfeirverne systemd[1]: ffxi-lobby.service: State 'stop-sigterm' timed out. Killing.
May 17 22:50:16 werfeirverne systemd[1]: ffxi-lobby.service: Killing process 1100 (dsconnect) with signal SIGKILL.
May 17 22:50:16 werfeirverne systemd[1]: ffxi-lobby.service: Main process exited, code=killed, status=9/KILL
May 17 22:50:16 werfeirverne systemd[1]: ffxi-lobby.service: Failed with result 'timeout'.
May 17 22:50:16 werfeirverne systemd[1]: Stopped Final Fantasy XI DarkStar Emulator Lobby Server.

Code: Select all

May 17 22:47:15 werfeirverne systemd[1]: Stopping Final Fantasy XI DarkStar Emulator Game Server...
May 17 22:47:15 werfeirverne dsgame[1230]: [17/May] [22:47:15][Status] luautils::free:lua free...         - [OK]
May 17 22:47:15 werfeirverne dsgame[1230]: dsgame: /usr/include/zmq.hpp:406: zmq::context_t::~context_t(): Assertion `rc ==
May 17 22:47:15 werfeirverne dsgame[1230]: [17/May] [22:47:15][Fatal Error] --- gdb backtrace ---
May 17 22:47:15 werfeirverne dsgame[1230]: double free or corruption (!prev)
May 17 22:48:45 werfeirverne systemd[1]: ffxi-game.service: State 'stop-sigterm' timed out. Killing.
May 17 22:48:45 werfeirverne systemd[1]: ffxi-game.service: Killing process 1230 (dsgame) with signal SIGKILL.
May 17 22:48:45 werfeirverne systemd[1]: ffxi-game.service: Main process exited, code=killed, status=9/KILL
May 17 22:48:45 werfeirverne systemd[1]: ffxi-game.service: Failed with result 'timeout'.
May 17 22:48:45 werfeirverne systemd[1]: Stopped Final Fantasy XI DarkStar Emulator Game Server.
My SystemD files (though again, it happens with a straight load so it's not SystemDs fault)

Code: Select all

[Unit]
Description=Final Fantasy XI DarkStar Emulator Lobby Server
After=syslog.target network.target

[Service]
User=emu
Group=emu
PIDFile=/home/emu/ffxi-lobby.pid
WorkingDirectory=/home/emu/darkstar
ExecStart=/home/emu/darkstar/dsconnect
Restart=always

[Install]
WantedBy=multi-user.target

Code: Select all

[Unit]
Description=Final Fantasy XI DarkStar Emulator Game Server
Wants=ffxi-lobby.service
After=syslog.target network.target ffxi-lobby.service

[Service]
User=emu
Group=emu
PIDFile=/home/emu/ffxi-lobby.pid
WorkingDirectory=/home/emu/darkstar
ExecStart=/home/emu/darkstar/dsgame
Restart=always

[Install]
WantedBy=multi-user.target

Code: Select all

[Unit]
Description=Final Fantasy XI DarkStar Emulator AuctionHouse Server
Wants=ffxi-game.service
After=syslog.target network.target ffxi-game.service

[Service]
User=emu
Group=emu
PIDFile=/home/emu/ffxi-lobby.pid
WorkingDirectory=/home/emu/darkstar
ExecStart=/home/emu/darkstar/dssearch
Restart=always

[Install]
WantedBy=multi-user.target

Cloudef
Posts: 9
Joined: Fri Aug 22, 2014 10:38 am

Re: Annoying issue being unable to stop Lobby or Game Server

Post by Cloudef » Fri May 18, 2018 10:22 am

Do you have gdb installed for the backtraces?

monkoto
Posts: 3
Joined: Thu May 17, 2018 6:01 pm

Re: Annoying issue being unable to stop Lobby or Game Server

Post by monkoto » Fri May 18, 2018 6:30 pm

gdb 8.1 is installed + the dependencies Ubuntu requested for it.

monkoto
Posts: 3
Joined: Thu May 17, 2018 6:01 pm

Re: Annoying issue being unable to stop Lobby or Game Server

Post by monkoto » Fri May 18, 2018 10:30 pm

I will say something I didn't post before / notice before is that the Game Server is not not-stopping in the same manner as the Lobby server.

Code: Select all

May 18 23:37:39 werfeirverne systemd[1]: Stopping Final Fantasy XI DarkStar Emulator Game Server...
May 18 23:37:39 werfeirverne dsgame[1071]: [18/May] [23:37:39][Status] luautils::free:lua free...         - [OK]
May 18 23:37:39 werfeirverne dsgame[1071]: dsgame: /usr/include/zmq.hpp:406: zmq::context_t::~context_t(): Assertion `rc ==
May 18 23:37:43 werfeirverne dsgame[1071]: [18/May] [23:37:42][Fatal Error] --- gdb backtrace ---
May 18 23:37:43 werfeirverne dsgame[1071]: [Thread debugging using libthread_db enabled]
May 18 23:37:43 werfeirverne dsgame[1071]: Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
May 18 23:37:43 werfeirverne dsgame[1071]: 0x00007fee946a523a in __waitpid (pid=3169, stat_loc=0x0, options=0) at ../sysdep
May 18 23:37:43 werfeirverne dsgame[1071]: Saved corefile core.1071
May 18 23:37:43 werfeirverne dsgame[1071]: #0  0x00007fee946a523a in __waitpid (pid=3169, stat_loc=0x0, options=0) at ../sy
May 18 23:37:43 werfeirverne dsgame[1071]: #1  0x0000559fe16a9823 in dump_backtrace () at src/common/kernel.cpp:128
May 18 23:37:43 werfeirverne dsgame[1071]: #2  0x0000559fe16a9bc5 in sig_proc (sn=6) at src/common/kernel.cpp:162
May 18 23:37:43 werfeirverne dsgame[1071]: #3  <signal handler called>
May 18 23:37:43 werfeirverne dsgame[1071]: #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
May 18 23:37:43 werfeirverne dsgame[1071]: #5  0x00007fee934fd801 in __GI_abort () at abort.c:79
May 18 23:37:43 werfeirverne dsgame[1071]: #6  0x00007fee934ed39a in __assert_fail_base (fmt=0x7fee936747d8 "%s%s%s:%u: %s%
May 18 23:37:43 werfeirverne dsgame[1071]: #7  0x00007fee934ed412 in __GI___assert_fail (assertion=assertion@entry=0x559fe1
May 18 23:37:43 werfeirverne dsgame[1071]: #8  0x0000559fe170bba4 in zmq::context_t::~context_t (this=<optimized out>, __in
May 18 23:37:43 werfeirverne dsgame[1071]: #9  0x00007fee93500041 in __run_exit_handlers (status=status@entry=0, listp=0x7f
May 18 23:37:43 werfeirverne dsgame[1071]: #10 0x00007fee9350013a in __GI_exit (status=status@entry=0) at exit.c:139
May 18 23:37:43 werfeirverne dsgame[1071]: #11 0x0000559fe1793e09 in do_final (code=0) at src/map/map.cpp:284
May 18 23:37:43 werfeirverne dsgame[1071]: #12 0x0000559fe169941c in main (argc=1, argv=0x7ffcbc8bb5f8) at src/common/kerne
May 18 23:37:43 werfeirverne dsgame[1071]: double free or corruption (out)
May 18 23:39:09 werfeirverne systemd[1]: ffxi-game.service: State 'stop-sigterm' timed out. Killing.
May 18 23:39:09 werfeirverne systemd[1]: ffxi-game.service: Killing process 1071 (dsgame) with signal SIGKILL.
May 18 23:39:09 werfeirverne systemd[1]: ffxi-game.service: Main process exited, code=killed, status=9/KILL
May 18 23:39:09 werfeirverne systemd[1]: ffxi-game.service: Failed with result 'timeout'.
May 18 23:39:09 werfeirverne systemd[1]: Stopped Final Fantasy XI DarkStar Emulator Game Server.

Post Reply