View Issue Details

IDProjectCategoryView StatusLast Update
0006930Multi Theft Auto : San AndreasServerpublic2015-01-19 20:28
ReporterarranTunaAssigned Toccw 
PrioritynormalSeveritymajorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version 
Target Version1.3.4Fixed in Version1.3.4 
Summary0006930: Client disconnects but player element remains indefinitely
Description

I recently added a script to prevent people joining the server if somebody is already online with the same serial. Since then we've had about 3 complaints of people not being able to join because somebody is already online with that serial.

There are players that have been online for almost 24 hours with nobody being in control of them. They're just stood there.

Ping looks normal, doesn't change.
getNetworkStats returns 0 for everything but sometimes doesn't even return a table.
Killing the player worked but server side health was still reported high and after a reconnect they appeared alive again.
Giving them a vehicle worked.
Was able to rename them.
Couldn't get a screenshot from them.
redirectPlayer doesn't work.
kickPlayer worked.

There were 3 client-less players online.

TagsNo tags attached.

Users sponsoring this issue
Sponsors List Total Sponsorship = EUR 10

2012-05-25 22:33: arranTuna (EUR 10)
Users sponsoring this issue (Total Sponsorship = EUR 10)

Relationships

related to 0008729 closedmyonlake New issues Players sometimes are unable to log into their account 

Activities

qaisjp

2012-03-18 14:00

administrator   ~~0016308

Is it even possible for a person with an identical serial to be opening multiple instances Grand Theft Auto's simultaneously? IIRC GTA3 and San Andreas both refuse to work together simultaneously? I don't see the point in having that 'protection' feature, but nice find...

arranTuna

2012-03-22 11:23

manager   ~~0016350

I don't know if it is possible or how but in the logs 3 people connected with the same serial without anyone disconnecting and they all had same IP but different names. Unless of course it was this bug and they had to use different names because "nick already in use"

W

2012-03-23 15:42

viewer   ~~0016357

Is it even possible for a person with an identical serial to be opening multiple instances Grand Theft Auto's simultaneously?

It is: http://i.imgur.com/EI6lA.png

Remi-X

2012-03-31 12:29

reporter   ~~0016405

I've experienced this problem too, and its absolutely not related to high playercounts. It happened here with 1 guy when there were only 5 players online. Same issues. Can't remember if he left a quitmessage, but iirc he did not.

Jockie

2012-04-24 22:00

viewer   ~~0016534

Those players who disconnect are still saved in the memory of the server for fetching element data, else it would be hardly possible to retrieve those.

'Fixing' this issue can be propably done with destroyElement(player) after they've left, else you could try to clean the (copied) player variable where they're stored at onPlayerQuit.

x86

2012-05-25 23:35

administrator   ~~0016697

@Jockie: You can't destroy player elements.

Ca11um

2012-05-27 11:40

reporter   ~~0016708

If a player starts to connect (thus triggering onPlayerConnect), but then times out before joining, the server acknowledges them timing out, but the lua scripts don't trigger onPlayerQuit (Server\mods\deathmatch\logic\CGame.cpp, line 1322).

This patch triggers onPlayerQuit, even if the player hasn't fully connected yet: http://dl.dropbox.com/u/47984043/MTA/Patches/QuitFix.patch

arranTuna

2012-05-27 14:40

manager   ~~0016709

These people already logged in, spawned and played though.

Cazomino05

2012-05-29 11:40

reporter   ~~0016712

fix is unrelated. player is deleted right below after the if statement in question anyway.

Cazomino05

2012-05-29 12:46

reporter   ~~0016713

Debug code in latest server. look out for "Supplanted" or
"URGENT: Report this error on bugs.mtasa.com error code: 6930-1"
"URGENT: Report this error on bugs.mtasa.com error code: 6930-2"
"URGENT: Report this error on bugs.mtasa.com error code: 6930-3"

3 contains a lot more info.

Cazomino05

2012-05-29 13:46

reporter   ~~0016714

Another working theory is the server is running out of elements... looks like max server elements is 131,072 which seems a bit low.

arranTuna

2012-06-03 16:38

manager   ~~0016746

0 "URGENT"'s in log
988 "Surpassed"'s in log

Looking at somebody who has the bug now, they connected, joined, logged in but have not quit or been surpassed.

I used this to find them:

srun for i, p in pairs(getElementsByType("player")) do if (not getNetworkStats(p)) then setElementPosition(getPlayerFromName("[cit]arran"), getElementPosition(p)) return end end

Hack fix for this may be to have that running on a timer and kicking anybody that returns false for network stats.

ccw

2012-06-03 16:50

administrator   ~~0016747

Would be interesting to know how long they had been connected before zombification

arranTuna

2012-06-03 20:02

manager   ~~0016748

Last edited: 2012-06-04 14:08

[2012-06-03 16:46:47] JOIN: Jake60 joined the game
17:08:40 Jake60 has no network stats
to
17:18:41 Jake60 has no network stats
[2012-06-03 17:19:21] DISCONNECT: Jake60 Supplanted by (Jake60)

Another:

[2012-06-03 18:11:50] JOIN: BB~|GFD|JuMpEr<T joined the game
18:12:44 BB~|GFD|JuMpEr<T has no network stats
to
19:53:48 BB~|GFD|JuMpEr<T has no network stats
Also tried to connect 5 times but "nick already in use"
Has not quit yet.

New one:

[2012-06-03 22:33:18] JOIN: JJNA33 joined the game
22:47:59 JJNA33 has no network stats
To the next day:
11:20:07 JJNA33 has no network stats
[2012-06-04 11:20:27] DISCONNECT: JJNA33 Supplanted by (JJNA33)

New one:

[2012-06-04 09:43:58] JOIN: Ray joined the game
11:13:06 Ray has no network stats
To
13:56:14 Ray has no network stats
Which is the current time.

ccw

2012-06-05 06:30

administrator   ~~0016751

Please try r4211 and put an empty file called "disconnect.log" in the server launch directory.

Cazomino05

2012-06-05 07:01

reporter   ~~0016752

The Supplanted thing just means it disconnected the old for the new.... it's a long standing feature of MTA and clearly not part of the "bug" but it did need a log message anyway.

arranTuna

2012-06-05 17:00

manager   ~~0016753

Last edited: 2012-06-05 17:27

[2012-06-05 12:51:43] CONNECT: [NLN]TheBoss connected IP: 84.235.74.1
[2012-06-05 12:51:45] JOIN: [NLN]TheBoss joined the game (IP: 84.235.74.1)
[2012-06-05 12:51:59] LOGIN: (ALL) [NLN]TheBoss successfully logged in
[2012-06-05 12:54:32] KICK: [NLN]TheBoss was kicked from the game by Console (Your lag is over 1000ms)

2012-06-05 12:54:34 - Remote disconnected - 84.235.74.1:21514 - [Update remoteSystems with notify] [DeadConnection:0 ConnectMode:3 IsOutgoingDataWaiting:1 AreAcksWaiting:0 AckTimeout:0 TimeNowMS:2332766280 ConnectionTimeMS:2332593458 ConnectionDurationMS:172822 TwoLittleDucks:22]

[2012-06-05 12:54:46] CONNECT: [NLN]TheBoss connected IP: 84.235.74.1
[2012-06-05 12:55:01] JOIN: [NLN]TheBoss joined the game (IP: 84.235.74.1)

2012-06-05 12:55:29 - Remote disconnected - 84.235.74.1:43076 - [Update remoteSystems WITHOUT NOTIFY] [DeadConnection:0 ConnectMode:6 IsOutgoingDataWaiting:0 AreAcksWaiting:0 AckTimeout:0 TimeNowMS:2332821644 ConnectionTimeMS:2332811643 ConnectionDurationMS:10001 TwoLittleDucks:22]

2012-06-05 12:55:52 - Remote disconnected - 84.235.74.1:21071 - [Update remoteSystems WITHOUT NOTIFY] [DeadConnection:0 ConnectMode:6 IsOutgoingDataWaiting:0 AreAcksWaiting:0 AckTimeout:0 TimeNowMS:2332844126 ConnectionTimeMS:2332834125 ConnectionDurationMS:10001 TwoLittleDucks:22]

12:55:30 [NLN]TheBoss has no network stats

Every minute to current time:

16:51:41 [NLN]TheBoss has no network stats

[NLN]TheBoss is spawned at 0, 0, 0 and ping frozen at 17274

ccw

2012-06-06 00:10

administrator   ~~0016757

Thanks Arran.
Now please try r4215 and make a directory called "connections" in the server launch directory. It should give more better info.

arranTuna

2012-06-06 14:12

manager   ~~0016759

[2012-06-06 06:52:07] CONNECT: PA~|C|Assassin>A connected IP: 41.35.107.171
[2012-06-06 06:52:11] JOIN: PA~|C|Assassin>A joined the game (IP: 41.35.107.171)
07:01:58 PA~|C|Assassin>A has no network stats
Down to:
07:30:59 PA~|C|Assassin>A has no network stats
[2012-06-06 07:31:23] DISCONNECT: PA~|C|Assassin>A Supplanted by (PA~|C|Assassin>A)

Connection log file:
2012-06-06 02:05:24 - Remote connected - 41.35.107.171:24322 - [Index: 61] [AssignSystemAddressToRemoteSystemList]
2012-06-06 03:14:58 - Remote disconnected - 41.35.107.171:24322 - [Index: 61] [Update remoteSystems with notify] [DeadConnection:1 ConnectMode:8 IsOutgoingDataWaiting:1 AreAcksWaiting:0 AckTimeout:1 TimeNowMS:2384389609 ConnectionTimeMS:2380215716 ConnectionDurationMS:4173893 TwoLittleDucks:22]
2012-06-06 03:15:57 - Remote connected - 41.35.107.171:24366 - [Index: 299] [AssignSystemAddressToRemoteSystemList]
2012-06-06 03:53:17 - Remote disconnected - 41.35.107.171:24366 - [Index: 299] [Update remoteSystems with notify] [DeadConnection:0 ConnectMode:3 IsOutgoingDataWaiting:1 AreAcksWaiting:0 AckTimeout:0 TimeNowMS:2386688220 ConnectionTimeMS:2384447989 ConnectionDurationMS:2240231 TwoLittleDucks:22]
2012-06-06 04:10:39 - Remote connected - 41.35.107.171:24562 - [Index: 165] [AssignSystemAddressToRemoteSystemList]
2012-06-06 04:20:50 - Remote disconnected - 41.35.107.171:24562 - [Index: 165] [Update remoteSystems with notify] [DeadConnection:0 ConnectMode:3 IsOutgoingDataWaiting:1 AreAcksWaiting:0 AckTimeout:0 TimeNowMS:2388340720 ConnectionTimeMS:2387730339 ConnectionDurationMS:610381 TwoLittleDucks:22]
2012-06-06 04:20:52 - Remote connected - 41.35.107.171:24566 - [Index: 131] [AssignSystemAddressToRemoteSystemList]
2012-06-06 05:37:39 - Remote disconnected - 41.35.107.171:24566 - [Index: 131] [Update remoteSystems with notify] [DeadConnection:0 ConnectMode:3 IsOutgoingDataWaiting:1 AreAcksWaiting:0 AckTimeout:0 TimeNowMS:2392950363 ConnectionTimeMS:2388343298 ConnectionDurationMS:4607065 TwoLittleDucks:22]
2012-06-06 05:37:43 - Remote connected - 41.35.107.171:24613 - [Index: 192] [AssignSystemAddressToRemoteSystemList]
2012-06-06 05:54:27 - Remote disconnected - 41.35.107.171:24613 - [Index: 192] [Update remoteSystems with notify] [DeadConnection:0 ConnectMode:3 IsOutgoingDataWaiting:0 AreAcksWaiting:0 AckTimeout:0 TimeNowMS:2393957969 ConnectionTimeMS:2392953676 ConnectionDurationMS:1004293 TwoLittleDucks:22]
2012-06-06 06:52:04 - Remote connected - 41.35.107.171:24752 - [Index: 213] [AssignSystemAddressToRemoteSystemList]
2012-06-06 07:01:22 - Remote connected - 41.35.107.171:24803 - [Index: 1] [AssignSystemAddressToRemoteSystemList]
2012-06-06 07:01:29 - Remote disconnected - 41.35.107.171:24803 - [Index: 1] [Update remoteSystems with notify] [DeadConnection:0 ConnectMode:3 IsOutgoingDataWaiting:1 AreAcksWaiting:0 AckTimeout:0 TimeNowMS:2397980207 ConnectionTimeMS:2397972653 ConnectionDurationMS:7554 TwoLittleDucks:22]
2012-06-06 07:01:34 - Remote connected - 41.35.107.171:24836 - [Index: 213] [AssignSystemAddressToRemoteSystemList]
2012-06-06 07:01:44 - Remote disconnected - 41.35.107.171:24836 - [Index: 213] [Update remoteSystems WITHOUT NOTIFY] [DeadConnection:0 ConnectMode:6 IsOutgoingDataWaiting:0 AreAcksWaiting:0 AckTimeout:0 TimeNowMS:2397995043 ConnectionTimeMS:2397985042 ConnectionDurationMS:10001 TwoLittleDucks:22]
2012-06-06 07:01:44 - Remote connected - 41.35.107.171:24840 - [Index: 36] [AssignSystemAddressToRemoteSystemList]
2012-06-06 07:01:54 - Remote disconnected - 41.35.107.171:24840 - [Index: 36] [Update remoteSystems WITHOUT NOTIFY] [DeadConnection:0 ConnectMode:6 IsOutgoingDataWaiting:0 AreAcksWaiting:0 AckTimeout:0 TimeNowMS:2398005280 ConnectionTimeMS:2397995279 ConnectionDurationMS:10001 TwoLittleDucks:22]
2012-06-06 07:31:20 - Remote connected - 41.35.107.171:25591 - [Index: 197] [AssignSystemAddressToRemoteSystemList]
2012-06-06 07:53:43 - Remote disconnected - 41.35.107.171:25591 - [Index: 197] [Update remoteSystems with notify] [DeadConnection:0 ConnectMode:3 IsOutgoingDataWaiting:1 AreAcksWaiting:0 AckTimeout:0 TimeNowMS:2401113948 ConnectionTimeMS:2399770599 ConnectionDurationMS:1343349 TwoLittleDucks:22]

ccw

2012-06-06 18:46

administrator   ~~0016762

Do you have another example?

arranTuna

2012-06-06 19:59

manager   ~~0016763

http://pastebin.com/raw.php?i=fB5tqd5w

http://pastebin.com/raw.php?i=pqk48Y7d

tuntun

2013-08-10 03:36

viewer   ~~0019111

I know how to reproduce this problem.

  1. Successfully connected an MTA server.
  2. Make a brief interruption to the network. (You can pull off the network cable or use some software blocking network.)
    3 Once the network is interrupted, quickly disconnect the MTA server, and then restore the network, and re-connect to the server.
    Now you would find you have been copied!! Remember, you must be fast.
    Hope you could fix this!!!

kakaksk

2013-08-12 13:33

viewer   ~~0019125

Time outs arent working as intended. Thats clear. Make some data sharing detections. If they are false, then time out the player.

arranTuna

2013-08-12 14:51

manager   ~~0019126

Possibly fixed in http://code.google.com/p/mtasa-blue/source/detail?r=5708

Needs testing.

arranTuna

2013-08-18 14:30

manager   ~~0019166

Tested and confirmed as fixed.

Grafu

2015-01-19 14:56

viewer   ~~0022892

The bug refreshed in version 1.4.1.

ccw

2015-01-19 17:55

administrator   ~~0022893

The bug was re-introduced in the server between 7016 and 7024.
It is re-fixed in 7028

Grafu

2015-01-19 20:28

viewer   ~~0022895

Okay, thank you, will update right now.

Issue History

Date Modified Username Field Change