CubeCoders / AMP

Issue tracking and documentation for AMP
https://cubecoders.com/AMP
MIT License
206 stars 38 forks source link

[1.9.1.2] - Server Counter in Garrys Mod is incorrect #188

Open Bryantdl7 opened 4 years ago

Bryantdl7 commented 4 years ago

Bug Report

In Garry's Mod, the player count is incorrect after several people leave and join. This discrepancy continues after logging out and back in, CTRL+F5, and restarting the brower.

System Information

OS Linux
Platform Debian GNU/Linux 10 (buster)
System Type x86_64
Virtualization Xen
Module srcdsModule
Loaded Plugins FileManager, EmailSender, WebRequestPlugin, LocalFileBackupPlugin
Application Name AMP
Application Version 1.9.1.2
Release Stream Release
Build Date 17/12/2019 14:25
InstanceID 7b432c95-3856-443a-ad1b-a010f75d2019
Last Executable /bin/ps
Last Arguments --ppid 23939 -o pid,command

I confirm:

Symptoms

After a decent amount of time of people joining and leaving, the value differs from what it should show. As of writing, my server says it has 14 people logged in, but the SRCDS command status says only 8 are connected at this time.

Reproduction

  1. Start server
  2. Have various people join and leave
  3. Number will end up differing from what is expected to show

Image of Current view in UI

image

Image of status command confirming discrepancy

image

miguemely commented 4 years ago

Out of curiosity, do you have any scripts or any plugins loaded into Garry's Mod that might be affecting log output of the console, or modifying anything?

Also, can you give us the version number/build of SRCDS?

Bryantdl7 commented 4 years ago

I’ll grab the details for you soon. I don’t have anything installed modifying the console output though.

Should post details later tonight.

Bryantdl7 commented 4 years ago

SRCDS Version: version | 2019.11.12/24 7671 secure

Greelan commented 4 years ago

I have noticed a similar issue on a CS:GO server.

AMP v1.9.8.6 Ubuntu 18.04.4 Protocol version 13748 [1095/1095] Exe version 1.37.4.8 (csgo) Exe build: 21:12:50 Mar 19 2020 (7803) (730)

A player joins in-game, but AMP's player count does not increase.

In case it is of assistance with AMP's regex, the CS:GO logs show the following lines when the player joins:

L 04/20/2020 - 17:05:03: "Greelan<2><STEAM_x:x:xxxxxxxxx><>" connected, address ""
L 04/20/2020 - 17:05:03: World triggered "Round_Start"
L 04/20/2020 - 17:05:04: "Greelan<2><STEAM_x:x:xxxxxxxxx><>" STEAM USERID validated
L 04/20/2020 - 17:05:27: "Greelan<2><STEAM_x:x:xxxxxxxxx><>" entered the game
L 04/20/2020 - 17:05:37: "Greelan<2><STEAM_x:x:xxxxxxxxx>" switched from team <Unassigned> to <TERRORIST>

When the player leaves, the logs show:

L 04/20/2020 - 17:08:30: "Greelan<2><STEAM_x:x:xxxxxxxxx><TERRORIST>" disconnected (reason "Disconnect")
L 04/20/2020 - 17:08:30: "Greelan<2><STEAM_x:x:xxxxxxxxx><TERRORIST>" [-1936 -296 -104] committed suicide with "world"
L 04/20/2020 - 17:08:30: "Greelan<2><STEAM_x:x:xxxxxxxxx>" switched from team <TERRORIST> to <Unassigned>

(AMP's own logs are the same, except for the L prefix.)

On an unrelated issue, I also notice that when commands are issued in AMP's console, it appears that the log entry for that command is appended at the end of the response received. For example:

21:57:14
rcon from "10.10.10.10:37212": command "version"
Protocol version 13748 [1095/1095] Exe version 1.37.4.8 (csgo) Exe build: 21:12:50 Mar 19 2020 (7803) (730) L 04/21/2020 - 21:57:14: rcon from "10.10.10.10:37212": command "version"
PhonicUK commented 4 years ago

Is the address actually empty in that example or did you over-sanitize? AMP is looking for an IP address/port there.

Greelan commented 4 years ago

Actually empty. I only redacted the steam ID.

Greelan commented 4 years ago

Not sure whether it makes a difference, but atm this is running only as a LAN server, and I'm connecting from the LAN for testing purposes. I don't have a GSLT token for the server yet.

PhonicUK commented 4 years ago

So that'll prevent AMP from matching, since its looking for an address there. I'll drop a change in to make that section optional.

Greelan commented 4 years ago

Nice, thanks

Greelan commented 4 years ago

CS:GO instance updated to AMP 1.9.9.0 but same behaviour observed - player join is not registering in AMP

PhonicUK commented 4 years ago

I think these are actually different issues. But I'm having a hard time reproducing the issue where players remain on the list once they're gone.

Bryantdl7 commented 3 years ago

I am still able to reproduce this @PhonicUK if you would like I can give you access to the server in question. It seems like if a server is up for a significant amount of time, and nobody is connected to the amp web instance during that period it seems to happen.

This morning I got up, and was told I had 13 people on my server, but when I looked there was only one person online. Interestingly, when I connected to the server, the number went from 13, to 14.

Bryantdl7 commented 1 year ago

This is still reproducible on v2.4.3 on both windows and linux on a stock gmod server when people join and leave enough times.

As seen on the main page: image

Now if I run the command status to see who is connected:

image

xLeviNx commented 1 year ago

825 is the same issue

Bryantdl7 commented 1 year ago

Yep that's almost identical to our problems...

Apr 4, 2023 10:49:50 PM Levin V. @.***>:

825[https://github.com/CubeCoders/AMP/issues/825] is the same issue

— Reply to this email directly, view it on GitHub[https://github.com/CubeCoders/AMP/issues/188#issuecomment-1496848257], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ABKOR5OOV2UIDSJBOCGWRLDW7TMUXANCNFSM4J4QKK7Q]. You are receiving this because you authored the thread.[Tracking image][https://github.com/notifications/beacon/ABKOR5MYE272XLEVLF2WY5LW7TMUXA5CNFSM4J4QKK72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOLE4BPAI.gif]