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
is duplicated by
relates to
Attachments
Comments


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.

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

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.

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.

Confirmed on Multiplayer server 1.7.2 with 3 players.

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.

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.

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?

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.

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.

Reopened
MC-68829

Unfixable. Grum's comment from MC-66611:
That is how timeouts work, the server thinks you are still there until it doesn't anymore.

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.

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.

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.

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.

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.

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?

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)

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

Still happens with 1.8-pre3

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

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:
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.

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

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

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)

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

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.

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.

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.

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

@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.

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.

Possibly fixed for next pre: https://twitter.com/Dinnerbone/status/529041733028679681

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

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.

Imo this bug is fixed in pre4

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

Still an issue in 1.8.1-pre5.

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?

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.

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

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

Still an issue in 1.8.1.

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.

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.

Confirmed for 15w40b

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.

Was this fixed by the fix of MC-92476?
Or is for example the method described by @unknown still working?

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