ValveSoftware / csgo-osx-linux

Counter-Strike: Global Offensive
http://counter-strike.net
774 stars 69 forks source link

DispatchAsyncEvent backlog #2826

Open Classes123 opened 2 years ago

Classes123 commented 2 years ago

Your system information

Please describe your issue in as much detail as possible:

So, after the "Operation Riptide" update, the client console started to flood: "DispatchAsyncEvent backlog, failed to dispatch all this frame." On weak or medium computers, this affects the FPS (20-30 FPS at that moment). These logs can be caught even in the main menu (one more), as well as on official servers (the reason for which is unknown to me). On a private server, the problem was easier to find, for example, changing cvar with the replicated flag (example change using the SourceMod). Servers with large modifications were particularly affected. I hope for an early solution to the problem.

Steps for reproducing this issue:

  1. Navigate the main menu or
  2. Change replicated cvar on a dedicated server
Classes123 commented 2 years ago

UPD: @theelsaud found out that the lags (convars with replicated flag) were caused by the work of the convars themselves, not by the flood.

GreatBigWhiteWorld commented 2 years ago

This error spams when enemy appears, which can be felt that the performance drops

GreatBigWhiteWorld commented 2 years ago

New discovery: bullets don't register when console spams this:

DispatchAsyncEvent backlog, failed to dispatch all this frame. 98 of 100 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 96 of 98 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 94 of 96 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 93 of 95 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 91 of 93 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 89 of 91 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 87 of 89 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 85 of 87 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 83 of 85 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 82 of 84 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 80 of 82 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 78 of 80 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 76 of 78 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 74 of 76 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 72 of 74 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 70 of 72 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 68 of 70 remaining
DispatchAsyncEvent backlog, failed to dispatch all this frame. 72 of 107 remaining
Classes123 commented 2 years ago

UPD: this error can cause more than 10% packet loss

janez33 commented 2 years ago

How can i fix this? I turned off steam overlay but the problem still exist, it keeps lagging for me I can't play normal anymore and I have brand new PC. AMD Ryzen 7 5800X, MSI MAG X570s, GeForce RTX 3080

Truyn commented 2 years ago

Need fix

mfaiqs5 commented 2 years ago

I have been playing this game for years and trust me its not the game - its the way internet is designed. Don't stop reading yet.

There is something called Delay variation in internet. Your latency, jitter, speed, bandwidth and other lame performance metrics that your ISP flaunts might be great. But there is one thing no ISP mentions - The Delay variation or the Frame delay variation.

This is defined as the time difference between the time that your frame was supposed to reach the valve server (or any server for that matter) and the time it actually reached there. Due to the fact that most internet ISPs are "Best effort" (and you can verify that), your gaming frames are mixed with large youtube, netflix etc frames and that's why they reach the valve servers late. Now you might think that your latency should then project the same delay, but it doesn't. The reason is that routers and devices wouldn't show such delays with a single ping packet. However if you send thousands of packets in a second, you will notice that. I am not asking you to send a thousand packets but there is a way to test it.

If you are good with Operating systems, try to get a Linux system and play around with MTR command. There is a variable called Jint or Inter arrival jitter. I am confident that this will be very high for all people who are struggling with this.

What happens is that frames reach the destination with a delay and the game tries to merge them quickly and fails. This is why we receive such errors. These errors cause lags, adjustment in the animation, rubber banding etc. Try it yourself. It's not the game. Its the internet and the way its designed. ISPs are squeezing their own customers in the name of best bandwidth. No one needs the GBs of bandwidth. All we need is Quality of service, Quality of experience.

Believe it or not, this happens with people, and I am sure most people can attest to it, the people who live in highly populated areas, downtowns, metros etc (and we consider such areas to be advanced, ALAS!) because the traffic requirement is simply so high. If however you have a friend who you consider mentally challenged to say the least lives in an outback or a place away from metro or suburb etc has an amazing hitreg, you know the answer. Best effort internet for him is good because he doesn't have more netflix and youtube addicts in his vicinity blocking all time-sensitive frames. Sad but true !

Just a long way to say - This cannot be fixed !

Watch documentaries on buffer bloat and QoS. There are plenty on the internet.

statebyte commented 2 years ago

its not the game - its the way internet is designed.

We started the server on the localhost, so it's definitely not the Internet :)

GenocideStomper commented 2 years ago

If you are good with Operating systems, try to get a Linux system and play around with MTR command. There is a variable called Jint or Inter arrival jitter. I am confident that this will be very high for all people who are struggling with this.

Can you elaborate how this could be tested and adjusted on Linux?

mfaiqs5 commented 2 years ago

Can you elaborate how this could be tested and adjusted on Linux?

~$ sudo mtr -i .1 -c 3000 -o "L N B W A MV MI" 1.1.1.1

Open terminal and put in this command. You will need your admin password to run it. This is only a way to see the tracert at 10 packets per second for 3000 packets.

For the complete guide, visit https://www.pcwdld.com/what-is-mtr-and-howto-troubleshoot-connections

mfaiqs5 commented 2 years ago

We started the server on the localhost, so it's definitely not the Internet :)

Honey, get yourself a good router or a switch that can handle all local sessions :)

KeironO commented 2 years ago

@mfaiqs5

I have a pretty good network switch under my desk, and I suffer with the DispatchAsyncEvent error. I don't believe it's anything to do with the network.

This makes CSGO unplayable on the SteamDeck. I hope it gets resolved soon.

Truyn commented 2 years ago

We started the server on the localhost, so it's definitely not the Internet :)

Honey, get yourself a good router or a switch that can handle all local sessions :)

Sorry, I feel like calling you a cretin The error has nothing to do with the network connection.Initiated after one of the updates

mfaiqs5 commented 2 years ago

Sorry, I feel like calling you a cretin

Keep your feelings and beliefs to yourself mate. Not the place to declare your emotional state of affairs about anything. You have no clue about what is causing this error, I am not sure what makes you certain its not the network. Quite possible that the update starts logging frame errors? I stated a possibility. May be try to be a useful critter and rule it out logically than going down the emotional unicorn road.

Classes123 commented 2 years ago

Just a long way to say - This cannot be fixed !

I was talking about the freezes during the flood. Perhaps the source of the problem cannot be fixed, but it is possible to remove a big fps drop. I don't believe Valve doesn't keep a history of changes.

FoulPlay commented 2 years ago

I believe I have found the a cause but not the cause. I'm testing a workaround at the moment. I found something with Windows's security that might be a cause of the issue.

FoulPlay commented 2 years ago

I think I found the cause, the windows thing wasn't the issue as I thought.

fps_max 750 fps_max_menu 750 panorama_dumpevents* -1

There's 3 vars with "panorama_dumpevents" so set them to -1.

so far no stutter or packet-loss and no error spamming console and no stutter on main menu or scoreboard.

domikuss commented 2 years ago

@FoulPlay it looks like they changed something in the update that came out today, because even without these commands, everything became better than it was.

Yuriy222 commented 2 years ago

Replying to https://github.com/ValveSoftware/csgo-osx-linux/issues/2826#issuecomment-1164141704

Can you please explain in more detail what needs to be done?

FoulPlay commented 2 years ago

Hi everyone, I fixed it fully.

The issue is the UI when it loads fonts.

Go through steam and csgo's files and install all fonts because the stuttering is when the UI loads a font to use.

By installing them, Windows can cache the fonts and this will stop the stuttering with the UI or any UI base stuff.

This fixed it for me, but I don't know if it will for you.

GLHF.

spytzo commented 2 years ago

Just did this (found the font files and installed them) and it worked for me too, on Windows 10! Amazing find!

panwuyou97 commented 2 years ago

Can you tell me how to do it?

panwuyou97 commented 2 years ago

刚刚这样做了(找到字体文件并安装了它们),它也适用于我,在Windows 10上!惊人的发现!

Can you tell me how to do it?

spytzo commented 2 years ago

I repeat that this is what happened to Windows so it may not be exactly the same. On Windows you look on the CS:GO game files, for the UI folder and there the font files. Double-click the font files and it will install them permanently. (The issues probably is on the rarest fonts, not Arial).

It seems to me that the error now appears only once one the round start.

On Thu, 21 Jul 2022 at 12:18 panwuyou97 @.***> wrote:

刚刚这样做了(找到字体文件并安装了它们),它也适用于我,在Windows 10上!惊人的发现!

Can you tell me how to do it?

— Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/csgo-osx-linux/issues/2826#issuecomment-1191248453, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARQJRVNODMCGKJSJ5J3GRTVVEIVNANCNFSM5GWLFAPA . You are receiving this because you commented.Message ID: @.***>

NDThacker commented 2 years ago

What font files are you talking about? I can only find some font files with ".vfont" extension which does not seem to install itself when double clicked. Its proprietary extension "valve font"..

where are those font files installable in windows?

spytzo commented 2 years ago

OK, this is where the font files I'm talking about are located in my PC:

C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\platform\vgui\fonts

Select all of them and go right-click "install for all users". Some of the files won't do anything, press "Yes" whenever you are asked.

SanjaySRocks commented 2 years ago

Hi everyone, I fixed it fully.

The issue is the UI when it loads fonts.

Go through steam and csgo's files and install all fonts because the stuttering is when the UI loads a font to use.

By installing them, Windows can cache the fonts and this will stop the stuttering with the UI or any UI base stuff.

This fixed it for me, but I don't know if it will for you.

GLHF.

Is it for csgo client or the csgo server??

panwuyou97 commented 2 years ago

OK, this is where the font files I'm talking about are located in my PC:

C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\platform\vgui\fonts

Select all of them and go right-click "install for all users". Some of the files won't do anything, press "Yes" whenever you are asked.

thx

mfaiqs5 commented 2 years ago

This is not fixable. It has to do with your internet. As it is clear from its name "DispatchAsyncEvent backlog", this is a noted instance of inability to despatch a frame. This happens because your upload has frame delay variation which is higher than your download. This simply is a result of congested internet. This is how internet is designed - upload is deprioritized. Regardless of how good your download bandwidth is, your area is congested in upload. This is why internet is asymmetric. Because of the way it is designed, it does not care about the upload rates and hence your upload is absolutely poor in terms of quality of experience. Try using symmetric internet if it is available in your area and thank me later.

statebyte commented 2 years ago

This is not fixable. It has to do with your internet. As it is clear from its name "DispatchAsyncEvent backlog", this is a noted instance of inability to despatch a frame. This happens because your upload has frame delay variation which is higher than your download. This simply is a result of congested internet. This is how internet is designed - upload is deprioritized. Regardless of how good your download bandwidth is, your area is congested in upload. This is why internet is asymmetric. Because of the way it is designed, it does not care about the upload rates and hence your upload is absolutely poor in terms of quality of experience. Try using symmetric internet if it is available in your area and thank me later.

You are directly sure that this is precisely because of the Internet ... That is, you are not embarrassed that the FPS drawdown began after the update where the Riptide operation was added, besides, the Internet has not changed for years, and the game code has changed, so what does the Internet have to do with it when the drawdown begins after a long launch of the game, and for some it manifests itself more clearly, since the player may not have very powerful hardware.

mfaiqs5 commented 2 years ago

I am confident that it is the internet that has changed not the code. if you play other online games, you will feel the same. The internet downloads have increased to the order of 100s of times. With Netflix, YouTube and likes of that, people download terabytes of data these days. Unfortunately this is why download bandwidth is twice, sometimes 4 times sometimes as much 20 times more than the upload. The upload speeds are constantly deteriorating. The actual physical internet has not kept the pace up with the pace that the download requirement has increased. It's not the game mate, it's the internet.

GreatBigWhiteWorld commented 2 years ago

I am confident that it is the internet that has changed not the code. if you play other online games, you will feel the same. The internet downloads have increased to the order of 100s of times. With Netflix, YouTube and likes of that, people download terabytes of data these days. Unfortunately this is why download bandwidth is twice, sometimes 4 times sometimes as much 20 times more than the upload. The upload speeds are constantly deteriorating. The actual physical internet has not kept the pace up with the pace that the download requirement has increased. It's not the game mate, it's the internet.

Nah I think it has something to do with global warming.

mfaiqs5 commented 2 years ago

Ignorance is bliss 🥲

mfaiqs5 commented 2 years ago

If you still believe internet is not the cause of this problem, go and check business internet offerings. It comes with guarantees on frame delay. Your typical best effort residential internet doesn't. However it might not interest you, as this must be too much information for your bit sized brain. Nvm.

statebyte commented 2 years ago

If you still believe internet is not the cause of this problem, go and check business internet offerings. It comes with guarantees on frame delay. Your typical best effort residential internet doesn't. However it might not interest you, as this must be too much information for your bit sized brain. Nvm.

We started the server on the localhost, so it's definitely not the Internet :)

@mfaiqs5 What is not clear from this is that I launched the server on the same computer (the Internet is not involved in packet processing) and what did I see, the fps drop in my game...

mfaiqs5 commented 2 years ago

Try checking your upstream bufferbloat.

triplese commented 2 years ago

Try checking your upstream bufferbloat.

There is nothing to do with bufferbloat. CSGO sent small packets, and if only you using your router, there is no bufferbloat. Try checking it at 4-5am, csgo bug is not related to bufferbloat. P.S. I have queues on my mikrotik and shaped at 90%, 1\1gbit FTTH, so I got A+++ bufferbloat in any test, but still shitty hitreg after summer 2020 csgo update.

Truyn commented 2 years ago

Try checking your upstream bufferbloat.

There is nothing to do with bufferbloat. CSGO sent small packets, and if only you using your router, there is no bufferbloat. Try checking it at 4-5am, csgo bug is not related to bufferbloat. P.S. I have queues on my mikrotik and shaped at 90%, 1\1gbit FTTH, so I got A+++ bufferbloat in any test, but still shitty hitreg after summer 2020 csgo update.

Until now you are engaged in ignorance and false theories. You seem to be missing something since you do not understand that the problem appeared after one of the game updates.

You are doing a complete game.

Truyn commented 2 years ago

Write black and mislead people

karl-police commented 2 years ago

I am having the same issue, it's spamming the console which is really annoying for vscript and stuff.

I can use con_filter_text_out "DispatchAsyncEvent backlog, failed to dispatch all this frame." and con_filter_enable 1 to filter it out. But if I ever want to use con_filter_text_out for something else, then there's a problem.

Evgen071 commented 2 years ago

I am also experiencing these same errors. It pops out intermittently SteamNetworkingSockets lock held for 5.2ms. (Performance warning). SendMessageToConnection Waited 6.4ms for SteamNetworkingSockets lock [ServiceThread]

I have 2 csgo accounts. One is mine, the other is my brother. My brother has more than one mistake, my entire console is red and cunning is better. We play on the same PC with the same configs and settings.

Why????

In 2018, there was not a single error, with each update you only kill the game. Characteristics of PC i7 9700kf rtx 2060 super windows 10

GenocideStomper commented 2 years ago

Could this be linked to the 4.3 GHz bug, that might still affect performance? https://github.com/valvesoftware/csgo-osx-linux/issues/2066

bahaa-ka commented 1 year ago

I re-installed the game completely and started clean then issue got fixed and no traces for this error in my console. BUT when I switched steam accounts the game got completely f*** and the error started to appear again. Even the FPS went to 110 after it was averaging +250 on the classic maps

My CPU Ryzen 5 5500 GPU RTX 2060 6G OS> Windows 11

Classes123 commented 1 year ago

Sorry, I forgot to celebrate the birthday of this problem.

Yes, as far as I know, some have found a solution to this problem, but this solution is not a default environment setting, so the problem has not been solved yet.

GenocideStomper commented 1 year ago

Sorry, I forgot to celebrate the birthday of this problem.

Yes, as far as I know, some have found a solution to this problem, but this solution is not a default environment setting, so the problem has not been solved yet.

What was the solution?

Horderp commented 1 year ago

So I currently have 2 accounts I can log into. My main account has this error and is spammed obsessively.

BUT

When I login and go to my alt account, the error is completely gone. The only difference is that the alt account is not subbed to any workshop maps at all.

Nothing has changed in between, so I don't know how to exactly share the details of a fix other than wipe out your subscribed items on csgo. If there's some sort of way to show the differences between my two accounts (same computer, same hardware, same windows login), I'll show it off.

As of now, the only difference I've found to solve the issue was unsubbing from all my workshop maps. Been googling solutions to this error since forever, and it seems in official patch notes its been tackled a few times, but it seems nothing has worked.

Hope this helps.

triplese commented 1 year ago

As of now, the only difference I've found to solve the issue was unsubbing from all my workshop maps. Been googling solutions to this error since forever, and it seems in official patch notes its been tackled a few times, but it seems nothing has worked.

How about unsubbing from any workshop maps on main acc, is it leading to fix error?

Horderp commented 1 year ago

Unsubbed from all of my maps on the main. It's fixed. Goodbye 460 subbed maps. This number was originally over 500, prior to discovering that its related to here.

The bug is isolated to subbed workshop maps. Something related to subbed maps is triggering it. I'm not about to cherry pick to climb to the limit or isolate it any further. This is where I say it's not my job anymore.
460 sub maps gone

janez33 commented 1 year ago

I unsubbed from all workshop maps and still giving me same error....

Horderp commented 1 year ago

Good luck to you then. I've done just about every "fix" I found through google.

Bios updates. bios tweaks. Ram timings, Various names for overclocking and set cpu,gpu,ram to stable speeds. Driver updates. Tested multiple computers, laptops and monitors. Thanks to friends. different gpu, cpu, ram over the years upgrading. Duplicating files from working alt account, into main account didn't fix it, even if its installed in same/different locations. nvme drives/ssd/HD all tested, no work.

Repro: Launch game > View workshop subbed maps > console spammed with error Skipping the viewing workshop maps tab and launching directly into a server minimized the error spam a little bit, but it still eventually went to unplayable states writing to console nearly every other frame in a very short time frame.

Current hardware: Win10 nvid 1080ti 32gb ram amd ryzen 3900x

The last 2 changes I did was the font install for all users above, and workshop purge are the only things that has solved this bug for me after I checked. If it doesn't work for you, then at the end of the day, someone at valve is going to need to fix this.