You dont have enough ram.
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See coredump.conf(5) for details.
[Coredump]
#Storage=external
#Compress=yes
#ProcessSizeMax=2G
#ExternalSizeMax=2G
#JournalSizeMax=767M
#MaxUse=
#KeepFree=
1. Some bugged LUA script may allocated all RAM in 1 second [generate big table/string in 'while' / 'for'], so you don't see it goes out of RAM.
2. There can be some C++ bug that crashes TFS.
You need to run it with 'ulimit -c unlimited' to generate 'core' file on crash. 'core' file is dump of RAM in moment of crash.
You can detect problem nr 1 (is this file 600MB or 3GB?). If it's 600MB, you can try to find C++ problem with 'gdb'.
Yes, by default it does not dump at all. You need to use '-c unlimited' before running TFS, to edit your current linux terminal limit.is it o right before ulimit -c unlimited my core file size is 0?
From frames #11 and #10 we know it's something about Scheduler and there were many changes in Scheduler 4 days ago:
@nowitskyImplement scheduler timers using asio deadline timers (#3278) · otland/forgottenserver@0d12ee8
Co-authored-by: cristofer_martins <[email protected]>github.com
I reported possible problem after changes from commit above. There are some new answers in PR: Implement scheduler timers using asio deadline timers by ranisalt · Pull Request #3278 · otland/forgottenserver (https://github.com/otland/forgottenserver/pull/3278#issuecomment-779525741)
Maybe someone will find reason of crash and fix it soon.
They fixed bug 3 hours ago:Thank you, i will use my older version at this moment beacuse i download fresh one and i still have a problem.
They fixed bug 3 hours ago:
It's merge to 'master', so you can download newest sources and it should not crash.Fix data race on addEvent by ranisalt · Pull Request #3325 · otland/forgottenserver
Pull Request Prelude I have followed proper The Forgotten Server code styling. I have read and understood the contribution guidelines before making this PR. I am aware that this PR may be clo...github.com
/**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2019 Mark Samman <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "otpch.h"
#include "scheduler.h"
#include <boost/asio/post.hpp>
#include <memory>
uint32_t Scheduler::addEvent(SchedulerTask* task)
{
// check if the event has a valid id
if (task->getEventId() == 0) {
task->setEventId(++lastEventId);
}
// insert the event id in the list of active events
auto it = eventIdTimerMap.emplace(task->getEventId(), boost::asio::steady_timer{io_context});
auto& timer = it.first->second;
timer.expires_from_now(std::chrono::milliseconds(task->getDelay()));
timer.async_wait([this, task](const boost::system::error_code& error) {
eventIdTimerMap.erase(task->getEventId());
if (error == boost::asio::error::operation_aborted || getState() == THREAD_STATE_TERMINATED) {
// the timer has been manually cancelled(timer->cancel()) or Scheduler::shutdown has been called
delete task;
return;
}
g_dispatcher.addTask(task, true);
});
return task->getEventId();
}
void Scheduler::stopEvent(uint32_t eventId)
{
if (eventId == 0) {
return;
}
boost::asio::post(io_context, [this, eventId]() {
// search the event id..
auto it = eventIdTimerMap.find(eventId);
if (it != eventIdTimerMap.end()) {
it->second.cancel();
}
});
}
void Scheduler::shutdown()
{
setState(THREAD_STATE_TERMINATED);
boost::asio::post(io_context, [this]() {
// cancel all active timers
for (auto& it : eventIdTimerMap) {
it.second.cancel();
}
io_context.stop();
});
}
SchedulerTask* createSchedulerTask(uint32_t delay, std::function<void (void)> f)
{
return new SchedulerTask(delay, std::move(f));
}
/**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2019 Mark Samman <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "otpch.h"
#include "scheduler.h"
#include <boost/asio/post.hpp>
#include <memory>
uint32_t Scheduler::addEvent(SchedulerTask* task)
{
// check if the event has a valid id
if (task->getEventId() == 0) {
task->setEventId(++lastEventId);
}
io_context.post([this, task]() {
// insert the event id in the list of active events
auto it = eventIdTimerMap.emplace(task->getEventId(), boost::asio::steady_timer{io_context});
auto& timer = it.first->second;
timer.expires_from_now(std::chrono::milliseconds(task->getDelay()));
timer.async_wait([this, task](const boost::system::error_code& error) {
eventIdTimerMap.erase(task->getEventId());
if (error == boost::asio::error::operation_aborted || getState() == THREAD_STATE_TERMINATED) {
// the timer has been manually cancelled(timer->cancel()) or Scheduler::shutdown has been called
delete task;
return;
}
g_dispatcher.addTask(task, true);
});
});
return task->getEventId();
}
void Scheduler::stopEvent(uint32_t eventId)
{
if (eventId == 0) {
return;
}
boost::asio::post(io_context, [this, eventId]() {
// search the event id..
auto it = eventIdTimerMap.find(eventId);
if (it != eventIdTimerMap.end()) {
it->second.cancel();
}
});
}
void Scheduler::shutdown()
{
setState(THREAD_STATE_TERMINATED);
boost::asio::post(io_context, [this]() {
// cancel all active timers
for (auto& it : eventIdTimerMap) {
it.second.cancel();
}
io_context.stop();
});
}
SchedulerTask* createSchedulerTask(uint32_t delay, std::function<void (void)> f)
{
return new SchedulerTask(delay, std::move(f));
}
allowChangeOutfit = true
freePremium = yes
kickIdlePlayerAfterMinutes = 30
maxMessageBuffer = 4
emoteSpells = false
classicEquipmentSlots = false
classicAttackSpeed = false
showScriptsLogInConsole = true
showOnlineStatusInCharlist = false
yellMinimumLevel = 2
yellAlwaysAllowPremium = false
forceMonsterTypesOnLoad = true
cleanProtectionZones = false
luaItemDesc = false