[BUG] netspike.txt huge files generated in SRCDS

Hi,

Since update #134 I have been seeing a netspike.txt file being generated in the “garrysmod” folder on all my garrysmod servers. Here is a snippet of what that file contains:



49336.461976/3264778 Player [MafiaMarine][24][adr:x.x.x.x:27005] was sent a datagram 4386 bits ( 548.250 bytes)
                                      NetMessage svc_UserMessage :      114 bits (  14.250 bytes)
                                      NetMessage svc_UserMessage :       90 bits (  11.250 bytes)
                                      NetMessage svc_UserMessage :      114 bits (  14.250 bytes)
                                      NetMessage svc_UserMessage :      114 bits (  14.250 bytes)
                                      NetMessage svc_UserMessage :      114 bits (  14.250 bytes)
                                      NetMessage svc_UserMessage :      114 bits (  14.250 bytes)
                                      NetMessage svc_UserMessage :       90 bits (  11.250 bytes)
                                      NetMessage svc_UserMessage :      114 bits (  14.250 bytes)
                                      NetMessage svc_UserMessage :      114 bits (  14.250 bytes)
                                      NetMessage svc_UserMessage :       90 bits (  11.250 bytes)
                                                        NET_Tick :       70 bits (   8.750 bytes)
                                         Delta Entities Overhead :       83 bits (  10.375 bytes)
                                                  delta [player] :       71 bits (   8.875 bytes)
                                                  delta [player] :      142 bits (  17.750 bytes)
                                                  delta [player] :       24 bits (   3.000 bytes)
                                                  delta [player] :      114 bits (  14.250 bytes)
                                                  delta [player] :       24 bits (   3.000 bytes)
                                                  delta [player] :       82 bits (  10.250 bytes)
                                                  delta [player] :      110 bits (  13.750 bytes)
                                                  delta [player] :       24 bits (   3.000 bytes)
                                                  delta [player] :       56 bits (   7.000 bytes)
                                                  delta [player] :       24 bits (   3.000 bytes)
                                                  delta [player] :       24 bits (   3.000 bytes)
                                                  delta [player] :       82 bits (  10.250 bytes)
                                                  delta [player] :      101 bits (  12.625 bytes)
                                                  delta [player] :       24 bits (   3.000 bytes)
                                                  delta [player] :       24 bits (   3.000 bytes)
                                                  enter [player] :      462 bits (  57.750 bytes)
                                                  delta [player] :      287 bits (  35.875 bytes)
                                                  delta [player] :      142 bits (  17.750 bytes)
                                                  delta [player] :       24 bits (   3.000 bytes)
                                                  delta [player] :       41 bits (   5.125 bytes)
                                                  delta [player] :       24 bits (   3.000 bytes)
                                                  delta [player] :       41 bits (   5.125 bytes)
                                                  delta [player] :       24 bits (   3.000 bytes)
                                                  delta [player] :       99 bits (  12.375 bytes)
                                                  delta [player] :       82 bits (  10.250 bytes)
                                                  delta [player] :        9 bits (   1.125 bytes)
                                            delta [prop_physics] :      147 bits (  18.375 bytes)
                                                    delta [keys] :       28 bits (   3.500 bytes)
                                                      delta [fp_hat] :       28 bits (   3.500 bytes)
                                           leave [CBasePropDoor] :       12 bits (   1.500 bytes)
                                                    delta [keys] :       24 bits (   3.000 bytes)
                                               leave [CBaseDoor] :        8 bits (   1.000 bytes)
                                                    delta [keys] :       28 bits (   3.500 bytes)
                                                    delta [keys] :       71 bits (   8.875 bytes)
                                       delta [weapon_physcannon] :       28 bits (   3.500 bytes)
                                                  delta [pocket] :       28 bits (   3.500 bytes)
                                               delta [gmod_tool] :       28 bits (   3.500 bytes)
                                             leave [CWeaponSWEP] :       12 bits (   1.500 bytes)
                                                    delta [keys] :       24 bits (   3.000 bytes)
                                                  delta [fp_hat] :       28 bits (   3.500 bytes)
                                          delta [weapon_physgun] :       24 bits (   3.000 bytes)
                                       delta [weapon_physcannon] :       28 bits (   3.500 bytes)
                                       delta [weapon_physcannon] :       28 bits (   3.500 bytes)
                                         delta [weapon_mad_p228] :       28 bits (   3.500 bytes)
                                       delta [weapon_physcannon] :       24 bits (   3.000 bytes)
                                             delta [gmod_camera] :       28 bits (   3.500 bytes)
                                          delta [weapon_physgun] :       28 bits (   3.500 bytes)
                                                  delta [fp_hat] :       28 bits (   3.500 bytes)
                                          delta [weapon_physgun] :       28 bits (   3.500 bytes)
                                                 delta [med_kit] :       24 bits (   3.000 bytes)
                                              leave [CSENT_anim] :       12 bits (   1.500 bytes)
                                       leave [CWeaponPhysCannon] :       12 bits (   1.500 bytes)
                                            delta [prop_physics] :       97 bits (  12.125 bytes)
                                            delta [prop_physics] :      147 bits (  18.375 bytes)
                                          delta [weapon_physgun] :       28 bits (   3.500 bytes)
                                          delta [weapon_mad_aug] :       28 bits (   3.500 bytes)
                                                    delta [keys] :       24 bits (   3.000 bytes)
                                          delta [weapon_physgun] :       24 bits (   3.000 bytes)
                                                   delta [taser] :       28 bits (   3.500 bytes)
                                            Delta: [1] deletions :       13 bits (   1.625 bytes)
                                                    Delta Finish :        0 bits (   0.000 bytes)
                                                     Total Delta :     3036 bits ( 379.500 bytes)
                                                   Temp Entities :        0 bits (   0.000 bytes)
                                                Sounds [count=2] :      210 bits (  26.250 bytes)
                                            Finished [delta yes] :        0 bits (   0.000 bytes)
                                                delta [keys] :       67 bits (   8.375 bytes)
                                          delta [weapon_physgun] :       24 bits (   3.000 bytes)
                                                   delta [taser] :       28 bits (   3.500 bytes)
                                            Delta: [1] deletions :       13 bits (   1.625 bytes)
                                                    Delta Finish :        0 bits (   0.000 bytes)
                                                     Total Delta :     4106 bits ( 513.250 bytes)
                                                   Temp Entities :        0 bits (   0.000 bytes)
                                                Sounds [count=2] :      210 bits (  26.250 bytes)
                                            Finished [delta yes] :        0 bits (   0.000 bytes)


This file gets very big after a few hours and maxes out at 4GB. It seems to contain information about players and networked entities. If you delete the file it will just begin to generate again.

This is happening in other orangebox games, someone reported the same thing on allied moders http://forums.alliedmods.net/showthread.php?t=189783

It doesn’t always seem to generate and I haven’t seen any pattern that triggers its creation other than when there is a high amount of players on the server.

Any ideas if this can be fixed?
Thanks

Confirmed also:

If you’re struggling for hdd space try deleting the file contents and setting it to read only.

Thanks Pantho, good idea.

I did some further digging and found this response from Valve on the HLDS mailing list, looks like it should be fixed soon and is a network trace for debugging snapshot overflows.

Full discussion: http://comments.gmane.org/gmane.games.fps.halflife.hlds/37828



Fletcher Dunn | 11 Jul 18:58 
 
Re: netspike.txt
Fletcher Dunn <fletcherd <at> valvesoftware.com>
2012-07-11 16:58:18 GMT

The netspike file has long existed in the Source engine as a way to track which entities were causing large
spikes of network traffic.  There's a convar you can use to configure a threshold when it will get dumped.  (I
think by default it's off.)  Recently there was a change where, if a client was dropped to the infamous
"snapshot overflow" error, it would re-run the network packing code for that client, forcing the
netspike file to be dumped, to help figure out what entities are the cause of the problem.  That could
definitely cause CPU spikes.  I didn't realize we had shipped with that debugging mode on.  We'll make it
configurable by convar for the next release.

In the meantime, each time it dumps a network trace, it means you dropped a client.  It needed to send them a
full snapshot of the game state, but the snapshot was too big, so it had to drop the client.  You might want to
see which entities are responsible for so much traffic, because you are dropping players.

If there's something particular to your server, this trace will help you tune it.  If you find a problem you
think is global to the game, please report it here.

Your humble servant,
Fletch

-----Original Message-----
From: hlds_linux-bounces <at> list.valvesoftware.com
[mailto:hlds_linux-bounces <at> list.valvesoftware.com] On Behalf Of Thorsten Knoll
Sent: Wednesday, July 11, 2012 8:39 AM
To: ics; Half-Life dedicated Linux server mailing list
Subject: Re: [hlds_linux] netspike.txt

i only have it on my registered servers with quickplay.
on my not registered servers there´s no netspike.txt.

-moss