fusion32
Intermediate OT User
- Joined
- Jun 7, 2010
- Messages
- 39
- Solutions
- 2
- Reaction score
- 113
@dajotsa @Gustinos Server crashed when running the version with the map refresh fix, so it did not include the new gold fix that seems to be available since 2 days ago so I will try the new release.
The error shows something about the depot 4. The person said a few minutes before the server crashed, he deposited some gold coins into the Edron depot. They said it didn't actually crash until they were on their way to the magic carpet, not sure if they actually used the magic carpet or they were just walking there or standing at the NPC so not sure if that was the actual cause or what happened.
Also:
It seems like when the server crashed and starting the game service again, everyone lost all progress since the last server save. Do I have an issue or is this expected? Is there a way to prevent this?
This could be related to a bug I fixed recently. But it could also be something else. The best thing is to have the server compiled with debug symbols (
make -B DEBUG=1 will do it) and then get the backtrace of the crash with GDB. If you're using the service file from the repo, you should get a coredump when the application crashes. They're usually right next to the executable but it depends on your system's configuration. Here are a few commands to get a backtrace when you have a coredump file:
Code:
cd path/to/tibia/game
gdb bin/game bin/core
(gdb) thread apply all backtrace # print backtrace for all threads -- probably too verbose
(gdb) thread N # switch to thread that caused the crash -- it usually tells when you open GDB
(gdb) backtrace # print backtrace for the current thread
(gdb) exit # exit gdb
This backtrace alone should usually be enough to track the source of the bug, but it'll only work with the executable that generated the coredump so you'd need to do this before recompiling/replacing the server's executable.
The scope the server was initially tested was pretty small so I do expect bugs to show up. Crashes should be rare because the design of the original application is on the "safe" side, but the problem with them is that player/world data (up to a limit) is cached in memory and only flushed at server save. This means you end up losing any progress since the last "server save", but is more subtle because you may end up with a partial save where some of the players were saved earlier because they were evicted from the cache.
Anyway, I'd recommend only running a test server for the time being, and always doing backups on server save so you can always rollback to a consistent save in case of a crash.
