mojira.dev
MC-18269

recv failed Exception related to mobs and/or network traffic

Ever since v1.4, this "Software caused connection abort: recv failed" error started happening on a fairly regular basis.

It seemed to be happening in areas containing excessive mobs, which probably contributes to the issue, due to network activity. However, the error does not appear to be related to the operation of the game at all, but related to a threaded background process, that checks your servers for a flag that an updated version is available.

Simply trapping for this error will make a tremendous number of people happy. I can't count the number of people who have been complaining about this very error, with no clue why it's happening.

There is no exception created when this happens. The client simply throws up the error message on the screen and allows you to return to the main menu. However, I run my Minecraft with a batch file that kicks Java off with additional memory activated. So I see the exception text come across in that window and have copied-n-pasted it below.

java.net.SocketException: Software caused connection abort: recv failed
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(Unknown Source)
        at java.net.SocketInputStream.read(Unknown Source)
        at java.io.FilterInputStream.read(Unknown Source)
        at ei.a(SourceFile:185)
        at ci.i(SourceFile:250)
        at ci.c(SourceFile:16)
        at cj.run(SourceFile:94)

java.io.FileNotFoundException: http://assets.minecraft.net/1_6_has_been_released.flag
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        at kn.a(SourceFile:234)
        at bkg.run(SourceFile:113)
        at java.lang.Thread.run(Unknown Source)

This problem appears to be related to mobs. I notice it most when attempting to breed sheep.

I created a grid of 16 pens to hold sheep. I laid the pens out so that every other pen began on a new chunk line (block 0), and ran the full length of a chunk in the other direction. (7x15 to account for walls) Spanning 8 chunks. (to ensure that the sheep/chunk was consistent)

I put 2 sheep in each pen and bred them consecutively with the following numbers of resulting sheep (3, 4, 6, 9) and the resulting numbers of baby sheep occurring during the breeding process (1, 1, 2, 3)

Given the fact that this process was occurring on the factor of 16 (each color), the total numbers for the 8 chunks is as follows:

Breeding phase 1: 16 Sheep, 8 Babies
Breeding phase 2: 24 Sheep, 8 Babies
Breeding phase 3: 32 Sheep, 16 Babies
Breeding phase 4: 48 Sheep, 24 Babies

At phase 4, the error starts occurring, and upon reconnecting, some of the new baby sheep were lost.

Given the fact that the sheep mobs have nothing to do with the http get to the version update flag, I can only assume that it has to do with memory and/or thread issues relating to mobs, or the sheer amount of network traffic generated to the server to track the mobs. Either the "mature to adult" event, the "eating" event, the baby mob sound, collision detection, something...

It seems to me that something is leaving a socket, thread, or memory in a bad state, which adversely affects the http get version check process.

I assume this because if I only breed 2 sheep of each color on each phase (instead of all available), and never get above 16 Babies at a time, I can continue to breed sheep on up to about 11 sheep per pen. After all sheep mature, I am safe to breed another sheep of each color. I have not moved past 11 sheep of each color (176 Sheep in 8 chunks)

However, whenever I am within range of those chunks so that they are loaded, I do run a risk of getting the socket error. It happens from time to time. Babies or no babies...

I hope this information is useful in tracking down this very annoying issue. From what I have heard in the community, this problem affects a large base of users, and many people are getting rather frustrated with the situation. If you need anything specific from me, please don't hesitate to ask.

NOTE: I tried this in a single-player world, and the problem did not occur. I will attach a Zip of that world, so you can have an example of the sheep farm I am experiencing this issue with

I have attached a 1.5.2 World Save from Single Player, with a sheep farm, that, when built on a server in SMP, causes these exceptions to occur fairly regularly.

Attachments

Comments 8

Please force a crash by pressing F3 + C for 10 seconds while ingame and attach the crash report here.

Here ya go...

---- Minecraft Crash Report ----
// I feel sad now :(

Time: 6/18/13 2:31 AM
Description: Manually triggered debug crash

java.lang.Throwable
	at net.minecraft.client.Minecraft.l(SourceFile:1164)
	at net.minecraft.client.Minecraft.K(SourceFile:574)
	at net.minecraft.client.Minecraft.run(SourceFile:526)
	at java.lang.Thread.run(Unknown Source)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Affected level --
Details:
	Level name: MpServer
	All players: 1 total; [bdv['Wh1rledPeas'/173, l='MpServer', x=-19.65, y=10.12, z=-20.88]]
	Chunk stats: MultiplayerChunkCache: 441
	Level seed: 0
	Level generator: ID 01 - flat, ver 0. Features enabled: false
	Level generator options: 
	Level spawn location: World: (3,4,-29), Chunk: (at 3,0,3 in 0,-2; contains blocks 0,0,-32 to 15,255,-17), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
	Level time: 1656248 game time, 2697932 day time
	Level dimension: 0
	Level storage version: 0x00000 - Unknown?
	Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
	Forced entities: 77 total; [qj['Cow'/0, l='MpServer', x=-89.78, y=4.00, z=36.69], nf['entity.ItemFrame.name'/137, l='MpServer', x=-28.94, y=5.50, z=-40.50], qj['Cow'/1, l='MpServer', x=-66.88, y=4.00, z=6.06], nf['entity.ItemFrame.name'/136, l='MpServer', x=-28.94, y=5.50, z=-43.50], nf['entity.ItemFrame.name'/139, l='MpServer', x=-28.94, y=5.50, z=-34.50], nf['entity.ItemFrame.name'/138, l='MpServer', x=-28.94, y=5.50, z=-37.50], nf['entity.ItemFrame.name'/4, l='MpServer', x=-49.94, y=5.50, z=-34.50], nf['entity.ItemFrame.name'/141, l='MpServer', x=-17.06, y=5.50, z=-43.50], nf['entity.ItemFrame.name'/5, l='MpServer', x=-49.94, y=5.50, z=-37.50], nf['entity.ItemFrame.name'/140, l='MpServer', x=-17.06, y=5.50, z=-46.50], nf['entity.ItemFrame.name'/6, l='MpServer', x=-49.94, y=5.50, z=-40.50], nf['entity.ItemFrame.name'/143, l='MpServer', x=-17.06, y=5.50, z=-37.50], nf['entity.ItemFrame.name'/7, l='MpServer', x=-49.94, y=5.50, z=-43.50], nf['entity.ItemFrame.name'/142, l='MpServer', x=-17.06, y=5.50, z=-40.50], nf['entity.ItemFrame.name'/8, l='MpServer', x=-49.94, y=5.50, z=-46.50], nf['entity.ItemFrame.name'/129, l='MpServer', x=-20.94, y=5.50, z=-40.50], nf['entity.ItemFrame.name'/128, l='MpServer', x=-20.94, y=5.50, z=-37.50], nf['entity.ItemFrame.name'/9, l='MpServer', x=-49.94, y=5.50, z=-25.50], nf['entity.ItemFrame.name'/131, l='MpServer', x=-25.06, y=5.50, z=-34.50], nf['entity.ItemFrame.name'/10, l='MpServer', x=-49.94, y=5.50, z=-28.50], nf['entity.ItemFrame.name'/130, l='MpServer', x=-20.94, y=5.50, z=-43.50], nf['entity.ItemFrame.name'/11, l='MpServer', x=-49.94, y=5.50, z=-31.50], nf['entity.ItemFrame.name'/12, l='MpServer', x=-47.06, y=5.50, z=-46.50], nf['entity.ItemFrame.name'/133, l='MpServer', x=-25.06, y=5.50, z=-40.50], nf['entity.ItemFrame.name'/13, l='MpServer', x=-47.06, y=5.50, z=-43.50], nf['entity.ItemFrame.name'/132, l='MpServer', x=-25.06, y=5.50, z=-37.50], nf['entity.ItemFrame.name'/14, l='MpServer', x=-47.06, y=5.50, z=-40.50], nf['entity.ItemFrame.name'/135, l='MpServer', x=-28.94, y=5.50, z=-46.50], nf['entity.ItemFrame.name'/15, l='MpServer', x=-47.06, y=5.50, z=-37.50], nf['entity.ItemFrame.name'/134, l='MpServer', x=-25.06, y=5.50, z=-43.50], nf['entity.ItemFrame.name'/17, l='MpServer', x=-47.06, y=5.50, z=-31.50], qo['Sheep'/152, l='MpServer', x=-15.06, y=4.00, z=-43.88], nf['entity.ItemFrame.name'/16, l='MpServer', x=-47.06, y=5.50, z=-34.50], qo['Sheep'/153, l='MpServer', x=-14.88, y=4.00, z=-31.84], nf['entity.ItemFrame.name'/19, l='MpServer', x=-47.06, y=5.50, z=-25.50], nf['entity.ItemFrame.name'/18, l='MpServer', x=-47.06, y=5.50, z=-28.50], qj['Cow'/21, l='MpServer', x=-34.16, y=4.00, z=32.81], qj['Cow'/20, l='MpServer', x=-36.94, y=4.00, z=28.06], nf['entity.ItemFrame.name'/144, l='MpServer', x=-17.06, y=5.50, z=-34.50], qo['Sheep'/145, l='MpServer', x=-31.19, y=4.00, z=-31.91], nf['entity.ItemFrame.name'/146, l='MpServer', x=-28.94, y=5.50, z=-31.50], nf['entity.ItemFrame.name'/147, l='MpServer', x=-17.06, y=5.50, z=-31.50], qo['Sheep'/148, l='MpServer', x=-14.97, y=4.00, z=-47.16], qo['Sheep'/149, l='MpServer', x=-14.84, y=4.00, z=-40.84], qo['Sheep'/150, l='MpServer', x=-15.09, y=4.00, z=-37.84], qo['Sheep'/151, l='MpServer', x=-14.84, y=4.00, z=-35.03], qg['Bat'/161, l='MpServer', x=42.65, y=16.00, z=-40.31], qg['Bat'/4469, l='MpServer', x=40.75, y=6.10, z=-39.75], qg['Bat'/4470, l='MpServer', x=38.47, y=5.10, z=-43.75], qo['Sheep'/94, l='MpServer', x=-26.50, y=4.00, z=-100.59], qo['Sheep'/98, l='MpServer', x=-31.25, y=4.00, z=-97.16], qo['Sheep'/99, l='MpServer', x=-23.88, y=4.00, z=-100.81], qo['Sheep'/96, l='MpServer', x=-20.81, y=4.00, z=-96.84], qo['Sheep'/97, l='MpServer', x=-31.53, y=4.00, z=-100.88], qo['Sheep'/110, l='MpServer', x=-28.78, y=4.00, z=-83.19], qo['Sheep'/111, l='MpServer', x=-21.22, y=4.00, z=-86.38], qo['Sheep'/108, l='MpServer', x=-16.56, y=4.00, z=-85.72], qo['Sheep'/109, l='MpServer', x=-26.34, y=4.00, z=-83.88], qo['Sheep'/106, l='MpServer', x=-29.09, y=4.00, z=-86.03], qo['Sheep'/107, l='MpServer', x=-20.16, y=4.00, z=-81.09], qo['Sheep'/119, l='MpServer', x=-31.13, y=4.00, z=-40.84], qo['Sheep'/118, l='MpServer', x=-31.16, y=4.00, z=-34.94], qo['Sheep'/117, l='MpServer', x=-26.78, y=4.00, z=-92.56], qo['Sheep'/116, l='MpServer', x=-31.16, y=4.00, z=-88.94], qo['Sheep'/115, l='MpServer', x=-17.25, y=4.00, z=-90.38], qo['Sheep'/114, l='MpServer', x=-30.19, y=4.00, z=-92.16], qo['Sheep'/113, l='MpServer', x=-26.94, y=4.00, z=-91.06], qo['Sheep'/112, l='MpServer', x=-16.50, y=4.00, z=-93.72], nf['entity.ItemFrame.name'/127, l='MpServer', x=-20.94, y=5.50, z=-34.50], qo['Sheep'/126, l='MpServer', x=-23.03, y=4.00, z=-35.06], bdv['Wh1rledPeas'/173, l='MpServer', x=-19.65, y=10.12, z=-20.88], qo['Sheep'/125, l='MpServer', x=-23.16, y=4.00, z=-38.06], qo['Sheep'/124, l='MpServer', x=-22.97, y=4.00, z=-41.03], qo['Sheep'/123, l='MpServer', x=-23.09, y=4.00, z=-44.16], qo['Sheep'/122, l='MpServer', x=-30.81, y=4.00, z=-37.91], qo['Sheep'/121, l='MpServer', x=-31.13, y=4.00, z=-47.03], qo['Sheep'/120, l='MpServer', x=-31.09, y=4.00, z=-44.16]]
	Retry entities: 0 total; []
Stacktrace:
	at bds.a(SourceFile:282)
	at net.minecraft.client.Minecraft.b(SourceFile:1881)
	at net.minecraft.client.Minecraft.run(SourceFile:535)
	at java.lang.Thread.run(Unknown Source)

-- System Details --
Details:
	Minecraft Version: 1.5.2
	Operating System: Windows 7 (amd64) version 6.1
	Java Version: 1.7.0_21, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 1635956256 bytes (1560 MB) / 2034302976 bytes (1940 MB) up to 2034302976 bytes (1940 MB)
	JVM Flags: 2 total; -Xmx2048M -Xms2048M
	AABB Pool Size: 19331 (1082536 bytes; 1 MB) allocated, 2 (112 bytes; 0 MB) used
	Suspicious classes: No suspicious classes found.
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	LWJGL: 2.4.2
	OpenGL: Intel(R) HD Graphics Family GL version 3.1.0 - Build 8.15.10.2430, Intel
	Is Modded: Probably not. Jar signature remains and client brand is untouched.
	Type: Client (map_client.txt)
	Texture Pack: Default
	Profiler Position: N/A (disabled)
	Vec3 Pool Size: 732 (40992 bytes; 0 MB) allocated, 14 (784 bytes; 0 MB) used

Looks sane so far (you might check the graphics driver for an update, 8.15 seems a bit old to me)

The client doesn't crash. It simply quits. The only reason I have an exception to show is because I start java through a batch file, so I can specify a larger memory pool. Otherwise, it would just be the client exiting for no known reason.

...and I have all the latest updates for this laptop. There are no newer drivers available.

Additionally, I get this same error playing on other machines. The client machine does not seem to be the issue.

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

I just spent some time today testing this. I had reduced the number of sheep in my sheep farm significantly to avoid this issue. Today, I went ahead and started breeding more sheep to see if I ran into the same issue again.

I went from 232 sheep, spread out over 8 chunks (29 Sheep per chunk), to 320 Sheep (40 Sheep per chunk), and the client did not crash.

I'm happy to report that you guys seem to have trapped the exception! YAY! Great job at finally tracking this down!

However... The client appears to "hang" now, instead of crash... This is obviously leaps and bounds above the prior behavior, but there might be more to examine here, to track down some performance issues, that may or may not permeate throughout other parts of the application as well...

I recorded a video that illustrates this and have posted it online here...

https://vimeo.com/70162147

password: SheepLag

You will notice 2 specific times when the sheep seem to lock up completely. During this time, other server related things, such as doors do not work either. However, as you will notice during one of the lockups, I was able to feed the sheep wheat, and hearts appeared, even though everything else was locked up.

Please let me know if there is anything I can do to help track this down and squash it once and for all...

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

No response, and network code has changed. Assuming no longer an issue.

Todd.Powers

(Unassigned)

Unconfirmed

crash, mob, multiplayer

Minecraft 1.5.2

Retrieved