mojira.dev
MC-37586

Ghost Players in Multiplayer / Item Duplication

Player lagged out (timeout due to bad connection), as a result the server didn't kick the player out of the game. Player rejoined and ended up spawning inside the old player position which then turned into a ghost. The real player can move around normally, but the ghost simply stands in place, but is able to take damage as if it were a normal player. The damage doesn't affect the player the ghost came from. After about a minute the ghost will vanish and the server will say the player left the game, but /list shows the real player and other players like normal.

DUPLICATION:
In our occurrence, we were getting the "Diamonds to You!" achievement, one player threw the diamonds to me (8 of them), on my screen I threw them back. Then I lagged out, rejoined, and I still had the 8 diamonds, however the player I returned them to retrieved them as well, and had tried to send 1 back to me again (since I threw all out at once rather than simply using the Drop Item key), which may have been collected by the ghost player. So we ended up with 15 diamonds through the lag, and these diamonds were able to be moved around and crafted with without any disappearing (as if it were a client error).

Related issues

MC-37543 Invisibility and invincibility glitch in multiplayer MC-38339 Item Duplication MC-39100 Inventory duplication death exploit MC-39149 Disconnect via Internet outage bug MC-39846 Duplication of all inventory items **WORKS ON MULTI-PLAYER VANILLA** MC-40375 Duplication Bug Multiplayer MC-40894 Double Client Login Duplication of items MC-41403 Strange Bug MC-42910 Item Dupe with lag on multiplayer servers 1.7.4 MC-43446 Duplication RAM Crash MC-43884 [SMP]Dublication after log in from another location MC-44201 2 accounts on at the same time MC-49864 Two players of me on Multiplayer server. MC-55401 I see myself loging out MC-55444 Player clones when logging in and out of MC (servers) fast. MC-55706 Player remains on servers after disconnect/timeout. MC-55965 Item duplication after network failure MC-56008 Player joining game twice: Item + Horse (any ridable entity) Duplication + Confusing Statistics & Achievments MC-56263 After disconnecting from realms a duplicate of the player remains. MC-60417 Players duplicate when they lost conection MC-61439 Same player 2 times in game MC-61738 Duplication with server lagg MC-63593 14w30c LAN world issue MC-64131 Clone of player is created if ReadTimeOut MC-64152 2 of the same player MC-66611 Players are cloned on crash. MC-67297 Player Duplication MC-68829 14w34c Duplication Bug MC-68907 Player avatar entity gets duplicated on crash, can potentially dupe items. MC-68951 Multiple player entities, when trying to reconnect get a ReadTimeoutException caused by the duplicated player entities MC-69279 Losing Internet Connection dupes players. MC-69378 Serious client/server desync MC-70067 server message that a player has left but they are still in game MC-70406 Item Duplication Glitch MC-70963 Player leaving Glitch MC-70996 Player Duplication MC-71063 Crash and Duplicate MC-71227 duplicate people in the same server MC-71261 Disconnected and there are multiple "me's" around where I dced. MC-71295 Clones in multplayer after Timeout MC-71404 Minecraft server spawns "Duplicate" players MC-71420 Disconnected and multiple user instances afterward. MC-71526 Users are kicked from multiplayer server and are seen as a duplicate player when relogging MC-72162 Disconnected players appear to log in multiple times concurrently MC-72240 Persistant death state upon login. MC-72382 Died while going through nether portal and spawned copies of my character MC-72512 Ghost player then server lag MC-72848 2 players in multiplayer MC-72951 Duplication MC-73164 Server "Forgets" Player is logged in MC-73486 Multiplayer-double click- Cause invisible players and unexpected log off message MC-75199 Duplication Issue MC-77692 Gold Duplication MC-78469 2 of the same person MC-87151 Duplicate player on LAN World MC-89800 My friend and I were playing MC on 15w40b, and in the log it said gumgum87 joined the game twice. (gumgum87 is my friend). And it actually created another "NPC" of him, showing an alex skin floating up in creative mode. Please help! MC-93308 Realms player clone glitch

Attachments

Comments

migrated
[media][media][media][media][media]
migrated

I can confirm this.
It happens very often when I reconnect, I'm even able to kill my clone and pick up his items.

This can be easily exploited to duplicate anything present in the affected player's inventory, especially once you figure out how a very reliable way to reproduce it.

kumasasa

Can confirm the ghosting (forced 24 hourly disconnect by ISP), but not the duplication.

migrated

To duplicate:

1) Player disconnects their internet, and leaves the game their side.
2) Player connects their internet again and logs on asap.
3) Ghost will be made if the player is fast enough to log on before the server times the ghost out.
4) Kill the ghost, it will drop the items you had when you left.

migrated

I made a video showing how easy it is to exploit this bug, I was a bit afraid of sharing it because of the nature of the issue, but since Odd Man basically described how to reproduce it, here it is: http://youtu.be/glwceU6CY2Q
As you can see, in my case I don't even have to lose connection to make it happen. A couple of minutes online seem to be enough to trigger it and a normal reconnection does the trick, so to speak.

I never noticed this problem during the first days after the update. It became noticeable only about a week later, and now it happens 99.9% of the times I click on disconnect.
Also, I seem to be the only player affected by it on server I play on, which makes me think the problem is related to some network configurations.

Edit: Other than item duplication, this bug can cause the opposite effect because anything contained in the ghost player's inventory gets lost when the server kicks him out.

migrated

Confirmed on Multiplayer server 1.7.2 with 3 players.

migrated

Easier way to do it with only 1 person in multi which ive seen done unf many times 😞

1. Load up 2 clients and get them onto the Multiplayer Screen using the same account
2. Join Client A to a server and drop what ya want to be copied/Duplicated and exit
3. join Client B quickly to the same server and pickup dropped items and you now supposedly have dble what you started with.

migrated

I can confirm this in Windows 8.1 x64 in Vanilla 1.7.2 SMP. This can be replicated with the following steps:
1.) Unplug network adapter by any means. Keep it unplugged until the server kicks you with an io.netty error.
2.) Immediately replug adapter and reconnect to server.
3.) Once logged in, kill the ghost copy of you any way you want.
4.) Pick up his drops.
There is a video here demonstrating the bug in action.

migrated

Hmmm. I have seemed to notice that on a Bukkit Server I was a ghost, I had the Invicibility 1 effect. Then Invicibility 2 hides me completely....strange?

migrated

Is this still a concern in the current Minecraft version 1.7.9 / Launcher version 1.3.11 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

migrated

In reply to Synchunk: Yes it is still a major issue for me on a 1.7.9 realms server, and almost everytime I log out and in there is a clone there that I could theoretically kill and get a duplicate of my items. It looks as if this bug is not getting the attention it should, as it is a very easy way to duplicate all of your items.

galaxy_2alex

Reopened
MC-68829

migrated

Unfixable. Grum's comment from MC-66611:

That is how timeouts work, the server thinks you are still there until it doesn't anymore.

migrated

The duplication part of this bug (which is still possible in recent snapshots according to MC-68829) should be fixable, even if 'ghost players' aren't.

migrated

Why the hell is this "Won't Fix"?
On my 1.7.10 server i'm never getting this, and on the snapshots i'm getting this all the time.
There is no way that this is client side only, because everybody is getting this error on my server.

migrated

This must be re-opened, it is a game destroying bug. I understand how timeouts work, but you should not be able to log in to a server to which you are currently logged in. Note also that if you do login while a ghost of you exists, the server becomes unusable (100% CPU usage), and cannot be cleanly restarted (it hangs on shutdown). Finally, I'm not convinced this is solely a timeout issue as sometime the server can fail to notice a disconnect for minutes at a time.

migrated

This can be fixed, in bukkit it doesn't happen so obviously it is possible to do. It's like ok, the player Smokey95dog is still on the server, don't allow another Smokey95dog to be online. This bug needs attention, you can duplicate anything very easily, as long as your internet is kinda bad.

migrated

This bug also allows griefers to destroy the world. They don't appear in the server log, so they're not suspected. It caused our admin to change the map twice, ban at least 30 people and finally shut the server down. Please fix this Mojang. It also never happened to me in 1.7, only in the snapshots.

migrated

I can't reproduce this in 1.8-pre2.

Here's what I've tried.

  • I'm using two machines (A and B).

  • Open Minecraft on A and join the server.

  • Then, open Minecraft on B and log in as the same user.

  • Disconnect A's internet (hardware wifi switch) and immediately try to join the server on B.

This should work, as my player does seem to stay logged in for a while when I disconnect A's internet. However, as soon as I join from B, I see my ghost self leave instantly. There's never any opportunity to abuse the bug.

Can anyone who currently has this bug detail exactly how it can be reproduced?

migrated

It's sometimes hard to reproduce, you probably have a better chance if the server is located somewhere far away from where you live. Try this: have both players online on the server, and disconnect the internet of one of them. Immeadiatly start killing the one who you just disconnected the internet from. When the other player logs in again, they should still be in the same position without losing any of their gear, while you just got a dupe of theirs.
For me it happens on my realms server a lot, so it could be easier in one of those, but obviously you can't use a 1.8 snapshot if you try that.
If the other method does not work, try this:
(If possible lower internet speeds) Using one player, log in and out of a server as fast as you can, until when you log in there is a clone of you. Kill the clone as fast as you can.
Hope this can help you reproduce the bug, sometimes it is easier for some people than others. (Pretty sure it's based on how good/fast your internet is and the latency between the server and you)

migrated

My internet isn't great, if you have a good connection it's harder to reproduce. Basically, use a laggy Wifi connection.

migrated

Still happens with 1.8-pre3

migrated

Can confirm, 1.8 pre3, with multiple players. http://i.imgur.com/pdWZtMQ.jpg

migrated

Unfortunately I have to say this still present in 1.8 and now it's 10 times worse. I'm trying to record some footage to show how messed up it is.
Dinnerbone, please, until an actual fix is found, revert any change related to this bug. Online experience is completly broken for me now.


Edit:

Video is up.

This is my breakdown of what happens, I hope it makes at least a bit of sense and can help pinpoint the real cause of this bug. What I'm about to describe is solely based on observations so I might be wrong on different parts of it, also I'm aware my terminology is a bit off and my English is bad. Apologizes in advance for that.

1. The client fails to communicate its disconnection to the server, or the server fails to elaborate it properly.
This causes the player character to be left in the game controlled by nobody because no connection is happening.

It seems to happen only after a few minutes of online time on the server; no particular action triggers it.
Maybe it's caused by something wrong with my network, not sure, all I know is that it seems to affect only specific players and in my case it went from an occasional issue to an every day problem by itself.

2. For reasons beyond me, the server allows multiple instances of the same player (with the same UUID) to exist inside the game at the same time.
When this happens, it gives to the freshly joined player his personal data (inventory items and such) loaded from the latest save as expected but it doesn't kick out the old instance and save his profile before doing that. Easy to see this is where item duplication and all the other related mishaps happen.

This so far is what used to happen in 1.7. Now in 1.8 new odd behaviours got added to the list.

3. Previously the "ghost" player was timed out after 20 seconds. Not always the case anymore.
4. Sometimes after killing your own copy and reconnecting, you are spawned in as the player who just got killed instead of the killer (who supposedly is the latest instance of you playing on the server).
5. If you kill your copy and relog, it's possible to see it play the death animation over again. I don't think other players on the server can see this happen.
6. With enough abusing of this bug you can get three or even more instances of the same player on the server.
7. When this bug happens, the following messages show up in the console every 2 seconds:

23:46:24 CONSOLE: 2014 11:46:23 EM io.netty.channel.AbstractChannelHandlerContext invokeExceptionCaught
23:46:24 CONSOLE: exception was thrown by a user handler's exceptionCaught() method while handling the following exception:
23:46:24 CONSOLE: existing connection was forcibly closed by the remote host

This also causes the server to freeze if you try to /stop it while this is happening.

On the bright side, the exploit described by Warren Liddell appears to be fixed.

galaxy_2alex

This is a serious duplication glitch, can be abused by Hackers etc.
Reopened until official confirmation on this ticket that it cannot be fixed.

migrated

can confirm with other report. i created a report then found this one.
Youtube video featuring the bug: https://www.youtube.com/watch?v=TB2qe5fEIII&feature=youtu.be

link to report i made: https://bugs.mojang.com/browse/MC-70963

lapppy

This bug has become more prominent in 1.8. Console gets spammed with this:

io.netty.channel.AbstractChannelHandlerContext invokeExceptionCaught
 WARNING: An exception was thrown by a user handler's exceptionCaught() method while handling the following exception:
 java.io.IOException: An existing connection was forcibly closed by the remote host
 	at sun.nio.ch.SocketDispatcher.writev0(Native Method)
 	at sun.nio.ch.SocketDispatcher.writev(Unknown Source)
 	at sun.nio.ch.IOUtil.write(Unknown Source)
	at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
 	at io.netty.channel.socket.nio.NioSocketChannel.doWrite(NioSocketChannel.java:267)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:694)
 	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.forceFlush(AbstractNioChannel.java:321)
 	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:515)
 	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464)
 	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378)
 	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350)
 	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
 	at java.lang.Thread.run(Unknown Source)

And occasionally this error will show up:

io.netty.util.concurrent.DefaultPromise notifyListener0
 WARNING: An exception was thrown by rk.operationComplete()
 io.netty.util.concurrent.BlockingOperationException: DefaultChannelPromise@1421d396(uncancellable)
 	at io.netty.util.concurrent.DefaultPromise.checkDeadLock(DefaultPromise.java:397)
 [14:13:36] [Server thread/INFO]: "Player" lost connection: TextComponent{text='Disconnected', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}
 	at io.netty.channel.DefaultChannelPromise.checkDeadLock(DefaultChannelPromise.java:157)
 [14:13:36] [Server thread/INFO]: "Player" left the game
 	at io.netty.util.concurrent.DefaultPromise.awaitUninterruptibly(DefaultPromise.java:290)
 	at io.netty.channel.DefaultChannelPromise.awaitUninterruptibly(DefaultChannelPromise.java:135)
 	at io.netty.channel.DefaultChannelPromise.awaitUninterruptibly(DefaultChannelPromise.java:28)
 	at gr.a(SourceFile:199)
 	at rk.operationComplete(SourceFile:125)
 	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:682)
 	at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:607)
 	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:565)
 	at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:413)
 	at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:82)
 	at io.netty.channel.ChannelOutboundBuffer.safeSuccess(ChannelOutboundBuffer.java:608)
 	at io.netty.channel.ChannelOutboundBuffer.remove(ChannelOutboundBuffer.java:344)
 	at io.netty.channel.socket.nio.NioSocketChannel.doWrite(NioSocketChannel.java:302)
 	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:694)
 	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.forceFlush(AbstractNioChannel.java:321)
 	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:515)
 	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464)
 	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378)
 	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350)
 	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
 	at java.lang.Thread.run(Unknown Source)
migrated

i am seeing ghosting as well, I wonder if this glitch is what is allowing players not on the white list to join occasionally?

migrated

I got this error, no Exception shown in console.

Was a white-listed vanilla server.

There was considerable tick lag at the time, the player was surrounded by farm animals so may relate to a high entity count.

The player killed their ghost, but it was able to float in midair without being kicked.

Presumably it was due to the alive player satisfying all the checks for being online. I assume if they logged out the ghost player may have timed out.

Killing the ghosted player results in the items dropping with the live player able to pick them up put them in chests etc.

When the live player logs out, and back in after ghost being killed, live player then takes the position of the respawned player.

migrated

I've experienced this bug and I can kill myself(PVP is enabled). Mobs do not attack. The only way I've been able to recreate the bug is to switch to wifi and unplug my lan cable while in game. That only worked to recreate the bug once.

migrated

I can confirm this too. My friend hosting a server got his internet bugged at that moment, and when i rejoined I was able to see my avatar, kill it and it "left the game" after some time. Funny.

migrated

It's a popular meme btw. "The Two Bajs Bug".

BdoubleO's Minecrack episode where he made up the song about a ghosting player: http://youtu.be/ilKBVAPfN1c

Remix of the Two Bajs song: http://youtu.be/s-WZioyra50

Minecon 2013 where they were asked to sing it: http://youtu.be/epCqViZOqc0

migrated

@Tokes: that's a different and (very likely) unrelated, client-side, visual bug. What we're discussing here is actual player duplication happening server-side.

migrated

This bug seems to be a number of bugs as I have been able to fix some but I still keep getting issues. It should be mentioned that I am running a completely vanilla server with the GUI turned off for about two years now on Win 7.

1) Things I have done to fix some of these issues, First off I deleted all player .dat files (There are issues with the UUID from older accounts). This means I had to have everyone on the server remove all their armor, all their inventory and their Ender chest. Once they did that I had them message me. I deleted their UUID.dat file(world/playerdata). UUID look up tool http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-tools/1265839-minecraft-php-uuid-finder Then once they rejoined Minecarft would create them a new data file.

2)I then turned off player-idle-timeout=0 in server.properties, you can also just double this. This helps if there is lag not to have someone kicked/ helps stop the Ghosting.

3) I decreased the server view distance down to 9(you should go no lower then this or it effects mob spawning https://bugs.mojang.com/browse/MC-2536)

4)The last and final thing I have done is to delete the Mineshaft.dat file (http://www.reddit.com/r/admincraft/comments/2h8nkb/can_someone_give_me_a_hand_with_problems_since/) it is located in world/data file. Deleting this file should not cause any issues as it is basically not in use right now. However it is so big it appears to be causing read/write issues (my old file was 2138 KB and the new file went down to 7 KB) you may have to delete this periodically.

migrated
galaxy_2alex

...well, okay. Marking it as such.

migrated

Still an issue in 1.8.1-pre4. [screams internally]

When I log off I still have to wait 20 seconds for my player to actually disconnect from the server.

What has changed now is that if I try to reconnect while my ghost copy (for lack of a better term) is online, I doom the server into an endless loop of error spam. The following messages are displayed multiple times in a second:
(From McMyAdmin's web interface console. I can't seem to find this error in the log files)

11:48:51 CONSOLE: exception was thrown by a user handler's exceptionCaught() method while handling the following exception:
11:48:51 CONSOLE: existing connection was forcibly closed by the remote host
11:48:51 CONSOLE: 2014 11:48:50 FM io.netty.channel.AbstractChannelHandlerContext invokeExceptionCaught

and my ghost copy is never timed out and nobody is able to login until the server restarts.
Meanwhile, on the client end, I get this error:

Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Packet 0/0 (jq) was larger than I expected, found 25 bytes extra whilst reading packet 0

I'm currently waiting for some friends to help me find out what happens ingame during all of this and also test if it's still possible to duplicate items.

Edit for clarification: the server error itself is nothing new. The difference is that now I'm not able to log back in and my player is never timed out.

Edit 2: I got around testing again with another player online. We did not manage to duplicate any item.

migrated

Imo this bug is fixed in pre4

migrated

The item duplication bug has been fixed as far as I can tell. It seems to have been replaced by "a render the server unusable" bug. As Qlimax Mito documents, the sequence of events that used to lead to a killable ghost player now prevents anyone from logging in and the server from shutting down cleanly. This is NOT GOOD.

So [Mod]s should we open a new bug for the new (equally bad) behavior, or will you re-open this one?

Thanks in advance.

Pongo

migrated

Still an issue in 1.8.1-pre5.

migrated

Do you mean it still takes a long time to log in or do you mean you were actually able to get two players in a game at the same time?

migrated

No we mean that if you try and log in before the old you has timed out, then the server is rendered unusable, neither the player nor anyone else can log in to the server. Also, the server can not then be shut down cleanly.

migrated

Exactly what Pongo Sapiens said. Thank you for putting my thoughts into words.

migrated

ah yes, in that case. Confirmed for 1.8.1-pre5

migrated

Still an issue in 1.8.1.

migrated

Confirmed in 1.8.1pre5 and just caught a user doing it. He was forcing his client down and reopening, Logging back in and picking up emeralds he was throwing down in spawn.
Error Log: http://pastebin.com/VW9QGcSg
server ip: play.MinecraftGods.com
After several errors as seen in the pastebin, i checked the users inventory and seen he has managed to gain 59 emeralds.

I was able to duplicate this myself by logging my client into 2 separate machines and forcing one down, then joining with the other machine. I did this on LAN connection with the server, seems easier to do if outside the Network where the server is hosted.

migrated

Still an issue in 1.8.7.

Whenever I disconnect from a server my character stays logged in for the next 20 seconds, until he's timed out by the server.

migrated

Confirmed for 15w40b

migrated

I haven't really tested this in the latest 1.9 snapshots but I can confirm this is happening in 1.8.8. Me personally cannot reproduce this bug but my friend is able to do so on command. He just disconnects and log in again and everytime it works.

When this is happening he's able to kill his own ghost entity/player and thereby duplicate the items, truly game-breaking in my opinion.

marcono1234

Was this fixed by the fix of MC-92476?

Or is for example the method described by @unknown still working?

migrated

Ticket resolved as incomplete, because no answer in a reasonable amount of time (1+ year), if it still happens, please update the ticket.

migrated

(Unassigned)

Community Consensus

duplication, ghost, lag, multiplayer, player, server, timeout

Minecraft 1.7.2, Minecraft 1.7.9, Minecraft 14w34d, Minecraft 1.8-pre3, Minecraft 1.8, ..., Minecraft 1.8.3, Minecraft 1.8.7, Minecraft 1.8.8, Minecraft 15w34d, Minecraft 15w40b

Minecraft 14w30c, Minecraft 1.8.1-pre4

Retrieved