AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved Unregistering the hooks outside their functions might cause a crash (https://forums.alliedmods.net/showthread.php?t=336029)

Natsheh 01-23-2022 06:51

Unregistering the hooks outside their functions might cause a crash
 
Code:

L 01/23/2022 - 11:46:09: JAILBREAK The cells are opened!
L 01/23/2022 - 11:46:09: JAILBREAK Specialday 'Dodgeball Day' has started!
L 01/23/2022 - 11:46:14: [telemenu.amxx] Cmd: "Natsheh<12><****************><>" teleport "[P0D]Zap! (95)<5><BOT><>"
L 01/23/2022 - 11:46:14: [telemenu.amxx] Cmd: "Natsheh<12><****************><>" teleport "[P0D]Violently Happy (100)<6><BOT><>"
L 01/23/2022 - 11:46:17: "GAGAUGU<13><****************><>" connected, address "****************"
L 01/23/2022 - 11:46:19: "T_T<14><****************><>" connected, address "****************"
/entrypoint.sh: line 36:    18 Segmentation fault      (core dumped) ./hlds_run -console -game ${HLDS_GAME} -port ${SERVER_PORT} -sport ${VAC_PORT} +map ${SRCDS_MAP} +ip 0.0.0.0 -strictportbind -norestart +maxplayers ${MAX_PLAYERS}
container@pterodactyl~ Server marked as offline...

[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon]: Exit code: 139
[Pterodactyl Daemon]: Out of memory: false
[Pterodactyl Daemon]: Updating process configuration files...
[Pterodactyl Daemon]: Ensuring file permissions are set correctly, this could take a few seconds...
container@pterodactyl~ Server marked as starting...
[Pterodactyl Daemon]: Pulling Docker container image, this could take a few minutes to complete...
[Pterodactyl Daemon]: Finished pulling Docker container image

Code:

L 01/23/2022 - 11:15:35: JAILBREAK Prisoners win!
L 01/23/2022 - 11:15:35: JAILBREAK Round is ending...
/entrypoint.sh: line 36:    19 Segmentation fault      (core dumped) ./hlds_run -console -game ${HLDS_GAME} -port ${SERVER_PORT} -sport ${VAC_PORT} +map ${SRCDS_MAP} +ip 0.0.0.0 -strictportbind -norestart +maxplayers ${MAX_PLAYERS}
container@pterodactyl~ Server marked as offline...

[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon]: Exit code: 139
[Pterodactyl Daemon]: Out of memory: false
[Pterodactyl Daemon]: Updating process configuration files...
[Pterodactyl Daemon]: Ensuring file permissions are set correctly, this could take a few seconds...
container@pterodactyl~ Server marked as starting...
[Pterodactyl Daemon]: Pulling Docker container image, this could take a few minutes to complete...
[Pterodactyl Daemon]: Finished pulling Docker container image

The server crashes after snowball/dodgeball specialdays right after the round ends, causing weird issues just like index out of bounds errors and memory access issues, i suspected it might be because the round end handling thing.

Shadows Adi 01-23-2022 07:26

Re: Server Crash with exit code 139
 
Add some debugging messages in jailbreak_core to see which function is causing the problem.

Natsheh 01-23-2022 07:58

Re: Server Crash with exit code 139
 
Quote:

Originally Posted by Shadows Adi (Post 2769124)
Add some debugging messages in jailbreak_core to see which function is causing the problem.

Already tried this won't help because after the round end after a snowball specialday causing an index out of bounds error and will probably crashes the server because an entity remove is called and freeing a memory not allocated to the server.

Natsheh 01-23-2022 14:25

Re: Server Crash with exit code 139
 
I suspect giving an entity flag_killme in jb_days_custom in the fw_touch_post forward might be the cause of the case.

Shadows Adi 01-23-2022 15:25

Re: Server Crash with exit code 139
 
Quote:

Originally Posted by Natsheh (Post 2769151)
I suspect giving an entity flag_killme in jb_days_custom in the fw_touch_post forward might be the cause of the case.

Add some logs in that area and check if it confirm your theory

Natsheh 01-23-2022 18:15

Re: Server Crash with exit code 139
 
Quote:

Originally Posted by Shadows Adi (Post 2769159)
Add some logs in that area and check if it confirm your theory

What should i debug? Have you read the fw_touch_post forward?

Natsheh 01-24-2022 12:33

Re: Server Crash with exit code 139
 
Okay, after few tests i made seems like the out of bounds error occurs then the server will crash after i start a snowball day or dodgeball and kill everyone and round ends then crash happens

Code:

L 01/24/2022 - 18:51:58: "Natsheh<4><STEAM_0:0:26622031><TERRORIST>" say "set"
L 01/24/2022 - 18:52:01: "[P*D]Jean_Claude_Van_Damme (95)<9><BOT><CT>" committed suicide with "world"
L 01/24/2022 - 18:52:01: "Natsheh<4><STEAM_0:0:26622031><TERRORIST>" committed suicide with "world"
L 01/24/2022 - 18:52:01: JAILBREAK Specialday 'Snowball Day' has ended!
L 01/24/2022 - 18:52:01: "[POD]L33t B0t (98)<10><BOT><TERRORIST>" committed suicide with "world"
L 01/24/2022 - 18:52:06: JAILBREAK Guards win!
L 01/24/2022 - 18:52:06: JAILBREAK Round is ending...
/entrypoint.sh: line 36:    18 Segmentation fault      (core dumped) ./hlds_run -console -game ${HLDS_GAME} -port ${SERVER_PORT} -sport ${VAC_PORT} +map ${SRCDS_MAP} +ip 0.0.0.0 -strictportbind -norestart +maxplayers ${MAX_PLAYERS}
container@pterodactyl~ Server marked as offline...

[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon]: Exit code: 139
[Pterodactyl Daemon]: Out of memory: false
[Pterodactyl Daemon]: Updating process configuration files...
[Pterodactyl Daemon]: Ensuring file permissions are set correctly, this could take a few seconds...
container@pterodactyl~ Server marked as starting...
[Pterodactyl Daemon]: Pulling Docker container image, this could take a few minutes to complete...
[Pterodactyl Daemon]: Finished pulling Docker container image


The errors that are caused from this issue

Code:

L 01/24/2022 - 15:52:38: Start of error session.
L 01/24/2022 - 15:52:38: Info (map "jail_blue") (file "addons/amxmodx/logs/error_20220124.log")
L 01/24/2022 - 15:52:38: [MySQL] Invalid query handle: 2
L 01/24/2022 - 15:52:38: [AMXX] Run time error 10 (plugin "amxbans_main.amxx") (native "SQL_GetQueryString") - debug not enabled!
L 01/24/2022 - 15:52:38: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 01/24/2022 - 16:44:04: Start of error session.
L 01/24/2022 - 16:44:04: Info (map "jail_blue") (file "addons/amxmodx/logs/error_20220124.log")
L 01/24/2022 - 16:44:04: [AMXX] Run time error 5 (plugin "Jailbreak_main.amxx") - debug not enabled!
L 01/24/2022 - 16:44:04: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 01/24/2022 - 18:01:51: Start of error session.
L 01/24/2022 - 18:01:51: Info (map "jail_blue") (file "addons/amxmodx/logs/error_20220124.log")
L 01/24/2022 - 18:01:51: Invalid player id 100
L 01/24/2022 - 18:01:51: [AMXX] Run time error 10 (plugin "Jailbreak_main.amxx") (native "player_menu_info") - debug not enabled!
L 01/24/2022 - 18:01:51: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 01/24/2022 - 18:01:51: Invalid player id 100
L 01/24/2022 - 18:01:51: [AMXX] Run time error 10 (plugin "Jailbreak_main.amxx") (native "player_menu_info") - debug not enabled!
L 01/24/2022 - 18:01:51: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 01/24/2022 - 18:01:51: Invalid player id 100
L 01/24/2022 - 18:01:51: [AMXX] Run time error 10 (plugin "Jailbreak_main.amxx") (native "player_menu_info") - debug not enabled!
L 01/24/2022 - 18:01:51: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 01/24/2022 - 18:12:05: Start of error session.
L 01/24/2022 - 18:12:05: Info (map "jail_blue") (file "addons/amxmodx/logs/error_20220124.log")
L 01/24/2022 - 18:12:05: Invalid menu id 1(23)
L 01/24/2022 - 18:12:05: [AMXX] Run time error 10 (plugin "Jailbreak_main.amxx") (native "menu_destroy") - debug not enabled!
L 01/24/2022 - 18:12:05: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 01/24/2022 - 18:12:05: Invalid menu id 1(23)
L 01/24/2022 - 18:12:05: [AMXX] Run time error 10 (plugin "Jailbreak_main.amxx") (native "menu_destroy") - debug not enabled!
L 01/24/2022 - 18:12:05: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 01/24/2022 - 18:19:33: [AMXX] Run time error 5 (plugin "Jailbreak_main.amxx") - debug not enabled!
L 01/24/2022 - 18:19:33: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).


fysiks 01-24-2022 21:38

Re: Server Crash with exit code 139
 
You should probably start by fixing all those errors before asking why your server crashes.

Natsheh 01-24-2022 21:57

Re: Server Crash with exit code 139
 
Quote:

Originally Posted by fysiks (Post 2769277)
You should probably start by fixing all those errors before asking why your server crashes.

Those are some random errors caused by the issue that happens after a round ends after snowball/dodgeball specialday, they can't be fixed because they don't have any problem.

fysiks 01-24-2022 23:07

Re: Server Crash with exit code 139
 
Quote:

Originally Posted by Natsheh (Post 2769279)
Those are some random errors caused by the issue that happens after a round ends after snowball/dodgeball specialday, they can't be fixed because they don't have any problem.

How do you know it's not the other way around? Have you considered that? Also, investigating errors that are showing could even lead to the root cause.

Put the plugin(s) into debug mode and post the error output. If an error log contains any lines starting with "To enable debug mode . . ." don't bother posting it at all.


All times are GMT -4. The time now is 05:28.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.