FSQ - crash problem

Сообщения
283
Реакции
28
Помог
2 раз(а)
Ошибка
Server crashes while using this plugin
ОС
Linux
Amx Mod X
1.9.0.5241
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.668-dev
Build date: 09:47:42 Sep 29 2018 (1631)
Build from: https://github.com/dreamstalker/rehlds/commit/89be216
ReGamedll
ReGameDLL version: 5.7.0.322-dev
Build date: 11:41:14 Jan 13 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/7398bb7
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.0.92 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5241 ini Start ANY
[ 5] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 6] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 8] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 9] ReAPI RUN - reapi_amxx_i386.so v5.8.0.163-dev pl4 ANY Never
[10] hackdetector RUN - hackdetector_amxx_i386.so v0.15.328.lite pl4 ANY ANY
[11] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl4 ANY Never
[12] Engine RUN - engine_amxx_i386.so v1.9.0.5241 pl4 ANY ANY
[13] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5241 pl4 ANY ANY
[14] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5241 pl4 ANY ANY
[15] MySQL RUN - mysql_amxx_i386.so v1.9.0.5241 pl4 ANY ANY
[16] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5241 pl4 ANY ANY
[17] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5241 pl4 ANY ANY
[18] Fun RUN - fun_amxx_i386.so v1.9.0.5241 pl4 ANY ANY
18 plugins, 18 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] Damager Advanced 1.1.2 Radius (based on damager_advance running
[ 2] Advanced Slot Free 2.0 cyby & S.Cosmin advanced_slot.a running
[ 3] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 4] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 5] AES: Informer 0.5 Vega serfreeman1337 aes_informer.am running
[ 6] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 7] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 8] AES: Bonus CSTRIKE 0.5.9 [REA serfreeman1337/s aes_bonus_cstri running
[ 9] AES Bonus: Flags 0.2 Sonyx aes_bonus_flags running
[ 10] fb_forwards 0.1.4 Kanagava & Realu fb_forwards.amx running
[ 11] FreshBans 1.4.0b kanagava fresh_bans_140_ running
[ 12] Admin Load 3.9.3 Dev F@nt0M adminload.amxx running
[ 13] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 14] Lista admini (amx_who) www.play-a Un Biban whobun.amxx running
[ 15] Say me and Say hp 1.4 neygomon sayme.amxx running
[ 16] unknown unknown unknown flash.amxx running
[ 17] Team Transfer 2.1 UnFoRgIvEn transfer_chat.a running
[ 18] MOTD Commands 1.3 OciXCrom crx_motdcommand running
[ 19] Admin Commands 1.9.0.5241 AMXX Dev Team admincmd.amxx running
[ 20] Commands Menu 1.9.0.5241 AMXX Dev Team cmdmenu.amxx running
[ 21] Menus Front-End 1.9.0.5241 AMXX Dev Team menufront.amxx running
[ 22] SHOW IP + LAST IP 2.0 Alka + x amx_showip_last running
[ 23] Players Menu 1.9.0.5241 AMXX Dev Team plmenu.amxx running
[ 24] Pause Plugins 1.9.0.5241 AMXX Dev Team pausecfg.amxx running
[ 25] Admin Help 1.9.0.5241 AMXX Dev Team adminhelp.amxx running
[ 26] Language Menu 1.0 F@nt0M langmenu.amxx running
[ 27] Plugin Menu 1.9.0.5241 AMXX Dev Team pluginmenu.amxx running
[ 28] Admin Votes 1.9.0.5241 AMXX Dev Team adminvote.amxx running
[ 29] Admin Chat 1.8.1.3746 AMXX Dev Team adminchat.amxx running
[ 30] Private Message 1.0 Denzer pm.amxx running
[ 31] CSStatsX SQL 0.7.4+1 serfreeman1337 csstatsx_sql.am debug
[ 32] Items Restrict Ultimat 0.0.4 Vaqtincha items_restrict_ running
[ 33] AES: StatsX 0.5 Vega serfreeman1337 aes_statsx_cstr running
[ 34] Best Player MOTD 1.2.1 OciXCrom crx_bestplayer. running
[ 35] Simple Menu 2.1.1 OciXCrom crx_simplemenu. running
[ 36] Restricted Names 1.1 Hattrick JM3Ch3R nick.amxx running
[ 37] Whatsapp_Group_Request 3.2 CrAzY MaN whatsapp_group_ running
[ 38] Quick and No Scope Det 1.2 EFFx QuickNoScopeD.a running
[ 39] SERVER TASKS 2.0 HATTRICK (HTTRCK server_tasks.am running
[ 40] Advanced Lottery 0.5 Nordic Warrior advanced_lotter running
[ 41] StatsX 1.9.0.5241 AMXX Dev Team statsx.amxx running
[ 42] Stats Configuration 1.9.0.5241 AMXX Dev Team statscfg.amxx running
[ 43] Advertising Manager 2.0 Javekson advertising_man running
[ 44] AFK Control ReNew 1.2(a) neygomon afk_control.amx running
[ 45] Bomb Count Down HUD/Vo 0.2 RuS Mawe4ka117 bcd_hudvoice_ti running
[ 46] Ping Faker 1.5a MeRcyLeZZ pingfaker_count running
[ 47] unknown unknown unknown fake.amxx running
[ 48] Last Maps Time 0.0.1 Exolent last_maps_time. running
[ 49] CFG Slash 1.0 aNNakin cfg_slash.amxx running
[ 50] [ReAPI] TopRoundDamage 1.0.5 Dager* *.* -G- damage_round.am running
[ 51] Fall Damage HP Restore 0.0.1 Vaqtincha FallDamageHpRes running
[ 52] WeaponState Remember 0.0.4 Vaqtincha weaponstate_rem running
[ 53] Objective as GameName 1.0 CHEL74 obj_as_gamename running
[ 54] Kills Counter 0.3 serfreeman1337 kills_counter.a running
[ 55] Activitate Admini 2.0c Askhanar activitate.amxx running
[ 56] Reset Score 1.2.0 Radius reset_score.amx running
[ 57] Chat Manager 1.1.1-11 Mistrick chatmanager.amx running
[ 58] Auto Round Restart 1.0 LondoN eXtream restartr.amxx running
[ 59] Simple Online Logger 10.04.18 mx?! simple_online_l running
[ 60] Trial Access 10.04.18 mx?! trial_access.am running
[ 61] Slap/Slay Team 1.0 Kobra slaylslapteam.a running
[ 62] VIP Menu [CS.PLAYARENA 0.15 Leo_[BH](tradus vip_reapi.amxx debug
[ 63] Color Flash Screen 1.6.4 Radius (Stimul i color_flash_scr running
[ 64] Invisible Spectator 1.0 ReHLDS Team invisible_spect running
[ 65] Ultimate Fire in the H 2.0 OciXCrom crx_fireintheho running
[ 66] Check Admin & Vip 2.2 Leo_[BH] check_admin_vip running
[ 67] Slay Losers 1.1.6 [email protected] slay_losers.amx running
[ 68] Map Manager: Core 3.0.0 Mistrick map_manager_cor running
[ 69] Map Manager: Scheduler 0.1.0 Mistrick map_manager_sch running
[ 70] Map Manager: Rtv 0.0.4 Mistrick map_manager_rtv running
[ 71] Map Manager: Nominatio 0.0.8 Mistrick map_manager_nom running
[ 72] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 73] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
[ 74] Map Manager: Effects 0.0.8 Mistrick map_manager_eff running
[ 75] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 76] Map Manager: Advanced 0.0.4 Mistrick map_manager_adv running
[ 77] Hide HUD/Menu on Vote 1.2.2 d3m37r4 hide_hud_and_me running
[ 78] Auto Team Balance Adva 1.5.1 Radius auto_team_balan running
[ 79] Team Select 1.5.0 F@nt0M teamselect.amxx running
[ 80] Force Gag 1.2 zorken zilla_gag.amxx running
[ 81] Parachute 1.1 maeStro | neygom parachute.amxx running
[ 82] [ReAPI:AMXX] Buy Nades 0.1 F@nt0M Buy_Nades_Timeo running
[ 83] Voiceserver Connect 1.1.015 Nextra voiceserver_con debug
[ 84] Mode 2x2 2.5re s1lent mode.amxx running
84 plugins, 84 running
Автор плагина
Inline
Версия плагина
1.0
Исходный код
/*
*
* Copyright (c) 2018 Alik Aslanyan <[email protected]>
*
*
* This file is part of Fake Server Queries
*
* Fake Server Queries 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.
*
* Fake Server Queries 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 Fake Server Queries; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of Fake Server Queries with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*
*/

#include <amxmodx>
#include <amxmisc>
#include <FakeServerQueries>
#include <cellarray>

#define PLUGIN "FakeServerQueries Manager"
#define VERSION "1.0"
#define AUTHOR "Inline"

#define RATIO 0.25
#define THINK_DELAY 5.0
#define RESERVE_SLOTS 1

#define SCORE_INCREMENT_CHANCE 0.5
#define SCORE_INCREMENT_DELAY 0.1

#define THINK_TASK 1
#define SCORE_INCREMENTER_TASK 2

new Array:g_FakesArray;
new Array:g_FakesNames;
new Array:g_FakesNamesIndices;

new g_MaxPlayers;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);

g_FakesArray = ArrayCreate(1, 1);
g_FakesNames = LoadNames();
g_FakesNamesIndices = CreateShuffledNamesIndices(g_FakesNames);

g_MaxPlayers = get_maxplayers();

DeferThink();
ScoreIncrementerTask();
}

public plugin_end() {
ArrayDestroy(g_FakesArray);
ArrayDestroy(g_FakesNames);
ArrayDestroy(g_FakesNamesIndices);
}

Array:LoadNames() {
new path[256];
new configsDirLen = get_configsdir(path, charsmax(path));
formatex(path[configsDirLen], charsmax(path) - configsDirLen, "/fsq_names.ini");
if(!file_exists(path)) {
log_to_error("File for bot names doesn't exist at path %s", path);
return Invalid_Array;
}

new file = fopen(path, "r");
if(!file) {
log_to_error("Can't open name file at path %s", path);
return Invalid_Array;
}

new Array:fakesNames = ArrayCreate(32, 1);

new buffer[1024];
new len = 0;
while((len = fgets(file, buffer, charsmax(buffer))) != 0) {
new commentPos = contain(buffer, "//");
new alternativeCommentPos = contain(buffer, ";");
if(alternativeCommentPos != -1) {
if(commentPos == -1) { // No // comment found, set ; comment pos
commentPos = alternativeCommentPos;
} else { // Select the first one by position.
commentPos = min(commentPos, alternativeCommentPos);
}
}

if(commentPos != -1) {
len -= commentPos;
format(buffer, len, "%s", buffer[commentPos]); // Remove comment
}
trim(buffer);
if(buffer[0] == '^0') {
continue;
}

ArrayPushString(fakesNames, buffer);
}

if(ArraySize(fakesNames) == 0) {
ArrayDestroy(fakesNames);
return Invalid_Array;
}

return fakesNames;
}

Array:CreateShuffledNamesIndices(Array:names) {
new size = ArraySize(names);
new Array:indices = ArrayCreate(1, size);
for(new i = 0; i < size;++i) {
ArrayPushCell(indices, i);
}
for(new i = 0; i < size;++i) {
ArraySwap(indices, i, random_num(0, size - 1));
}

return indices;
}

public GetNextName(outputName[32]) {
static index = 0;
if(index >= ArraySize(g_FakesNamesIndices)) {
index = 0;
}

new realIndex = ArrayGetCell(g_FakesNamesIndices, index++);

return ArrayGetString(g_FakesNames, realIndex, outputName, charsmax(outputName));
}

public client_connect(id) {
TryToThinkNow();
}

public client_disconnected(id) {
DeferThink();
}

TryToThinkNow() {
new playersAndFakesNum = get_playersnum(true) + ArraySize(g_FakesArray) ;
if(playersAndFakesNum >= g_MaxPlayers - RESERVE_SLOTS) {
Think();
} else {
DeferThink();
}
}

DeferThink() {
if(task_exists(THINK_TASK)) remove_task(THINK_TASK);
set_task(THINK_DELAY, "Think", THINK_TASK);
}

AddFakes(num) {
new name[32];
for(new i = 0; i < num; ++i) {
GetNextName(name);
new fakeId = fsq_create_fake(name);
if(fakeId == FSQ_ERROR) {
continue;
}
ArrayPushCell(g_FakesArray, fakeId);

}
}

RemoveFakes(num) {
for(new i = 0; i < num; ++i) {
new fakesArraySize = ArraySize(g_FakesArray);
if(fakesArraySize == 0) {
break;
}

new item = random_num(0, fakesArraySize - 1);
new id = ArrayGetCell(g_FakesArray, item);
fsq_destroy_fake(id);
ArrayDeleteItem(g_FakesArray, item);
}
}

stock log_to_error(const message[], any:...)
{
new log[256], date[32];
vformat(log, 255, message, 2);
get_time("error_%Y%m%d.log", date, 31);
log_to_file(date, "[%s] %s", PLUGIN, log);
}

public ScoreIncrementerTask() {
new currentNumOfFakes = ArraySize(g_FakesArray);
if(currentNumOfFakes > 0 && random_num(0, 100) <= SCORE_INCREMENT_CHANCE) { // Increment score
new item = random_num(0, currentNumOfFakes - 1);
new fakeId = ArrayGetCell(g_FakesArray, item);
if(fakeId != FSQ_ERROR) {
fsq_set_fake_score(fakeId, fsq_get_fake_score(fakeId) + 1);
}
}
set_task_ex(SCORE_INCREMENT_DELAY + random_float(0.0, 0.5), "ScoreIncrementerTask", SCORE_INCREMENTER_TASK);
}

public Think() {

new playersNum = get_playersnum(true);
new fakesNum = floatround(float(playersNum) * RATIO);

// Clamp to max players
{
new diff = (fakesNum + playersNum) - (g_MaxPlayers - RESERVE_SLOTS) ;
if(diff >= 0) {
fakesNum = max(fakesNum - diff, 0);
}
}

new currentNumOfFakes = ArraySize(g_FakesArray);
if(currentNumOfFakes > fakesNum) { // Add fakes
RemoveFakes(currentNumOfFakes - fakesNum);
} else if(fakesNum > currentNumOfFakes) { // Remove fakes
AddFakes(fakesNum - currentNumOfFakes);
}
}

Вложения

Сообщения
1,175
Реакции
2,144
Помог
57 раз(а)
"Plugin" or "Module"? I used his module with my own plugin, based on module API, and periodically (1-2 times per day) server got crash. Maybe problem was in plugin, maybe not (I could not get info about the crashes due to some circumstances), so i decide to remove module, and problem was solved. If you want help from Inline , you must provide crash logs with enabled -debug, and dump of memory, that can be analyzed. If you won't do that, no one can help you at all.
 
Сообщения
283
Реакции
28
Помог
2 раз(а)
"Plugin" or "Module"? I used his module with my own plugin, based on module API, and periodically (1-2 times per day) server got crash. Maybe problem was in plugin, maybe not (I could not get info about the crashes due to some circumstances), so i decide to remove module, and problem was solved. If you want help from Inline , you must provide crash logs with enabled -debug, and dump of memory, that can be analyzed. If you won't do that, no one can help you at all.
I don't know if module or plugin crashes the server since I did not load module only separately; For a period I disabled it too and crash was gone then,few days ago remembered about it and wanted to use it but crashes came back with it.
About debug : sadly I cannot provide the dump file logs as the hosting provider doesn't give me access to the files outside cstrike folder for security reasons they say. Is there any cvar or command to change debug.log file creation location ?
 
Сообщения
1,175
Реакции
2,144
Помог
57 раз(а)
Kobra, you need to start server with -debug. Russian hosters provide that feature in server control panel. All info on russian language exists here: https://dev-cs.ru/threads/1532/ , try to use google translate or find info on your native/english language.
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу