fivem icon indicating copy to clipboard operation
fivem copied to clipboard

[Urgent] No Viable Production Artifact After b25770 Degradation - Sync Network Hitches / Mass Connection Timeouts

Open singlesdon opened this issue 2 months ago • 31 comments

I wanted to follow up on #4140 because this has now become an urgent issue for servers still relying on b25770 and for some reason that Issue is marked as complete when it's not.

Today, October 1, b25770 was degraded and players started receiving an “Outdated Server Artifact” message and were unable to connect to the server.

Image

The confusing part is that the previously announced compatibility window was supposed to remain open until October 15. We were expecting to have until then to move off b25770, but it appears that servers using it have effectively been forced off the artifact two weeks early.

The bigger issue is that there still does not seem to be a reliable replacement for servers affected by this regression.

I have tested all three options:

  • b25770 – stable and does not have the network thread hitch issue.
  • Current/recommended artifacts – the network thread hitches return and eventually lead to player timeouts/disconnections.
  • Experimental branch provided/referenced by @Gogsi – this actually resolves the network thread hitch problem, but it introduces another issue where players disconnect with Timed out after 60 seconds.

So right now we are in a situation where:

b25770 works, but players can no longer connect because it was marked outdated today.

Current artifacts allow players to connect, but the network thread regression is still present.

The experimental branch fixes the network thread regression, but causes another connection timeout issue.

That leaves affected servers without a reliable artifact to run.

What makes this more concerning is that the experimental branch fixing the network thread issue also seems to confirm that there is an actual artifact-level problem here. On our normal server setup, current artifacts reproduce the hitches, while the experimental branch removes them.

Can CFX please clarify:

  1. Why was b25770 degraded on October 1 when the previously announced deadline was October 15?
  2. Was the early Outdated Server Artifact restriction intentional?
  3. What artifact are servers affected by #4140 expected to use right now?
  4. Is there an updated version of the experimental branch available that fixes the Timed out after 60 seconds problem?
  5. Can b25770 temporarily remain usable until there is a stable artifact containing the network fix?
  6. Should #4140 be reopened since the issue is still reproducible on current artifacts?

I’m happy to provide logs, profiler captures, ETW traces, network graphs, or test another artifact/branch if needed.

But with b25770 being blocked earlier than expected, we really need guidance on what affected servers are supposed to run until this is fully resolved.

Expected result

Resolve the Degression

Reproduction steps

Run the server using artifact b25770/Win. Use the same server configuration, resources, database, and player load. Observe the server performance and console output. Update the server to a newer/current artifact. Start the server using exactly the same configuration and resources. Observe the server console and thread performance. sync thread and network thread hitch/warning messages begin occurring repeatedly and are heavily spammed.

The issue appears to be artifact-version dependent, as reverting back to b25770/Win removes the behavior.

Importancy

Crash

Area(s)

FXServer

Specific version(s)

b36897

Additional information

No response

singlesdon avatar Oct 02 '26 02:10 singlesdon

All the tests I’ve done with the newer artifacts are documented here: GitHub Issue #4140 — CitizenFX/FiveM None of the newer artifacts work properly for my server. Please do not remove or block artifact 25770, as it is currently the most stable version and the only one that works reliably without the network thread hitch issues.

constanciooeste avatar Oct 02 '26 02:10 constanciooeste

Hi, I would say they would need an ETW trace to be able to debug and fix that. So if you had one, please send it.

czsquizer avatar Oct 02 '26 06:10 czsquizer

Was the early Outdated Server Artifact restriction intentional?

No it was not intentional. 25770 was supposed to be available until October 15 but the automation to remove it after 6 weeks kicked in. It is being looked into.

Simultaneously, a new version of the feature branch is being prepared which should address the Latent event ACK Overflow and Timed out after 60 seconds (1, 0) issues that appear for some players joining the server.

Gogsi avatar Oct 02 '26 08:10 Gogsi

Hi, are the issues regarding mass timeout of players at once (being) addressed as well? Or have these been already resolved?

czsquizer avatar Oct 02 '26 09:10 czsquizer

That issue has been resolved on the feature branch. The remaining issues only affect people that are still connecting, if the server is sending events or latent events to them: https://runtime.fivem.net/artifacts/fivem/build_server_windows/feature/network-improvements/ https://runtime.fivem.net/artifacts/fivem/build_proot_linux/feature/network-improvements/

Gogsi avatar Oct 02 '26 09:10 Gogsi

Image

I tested artifact 35959 from the network-improvements feature branch, but unfortunately the issue is still happening on my server.

The network thread hitches continue to occur. So far, the only artifact that does not reproduce this issue is 25770.

With the exact same server configuration, resources, and environment:

  • 25770: stable, no network thread hitch issue.
  • 35959: network thread hitches still occur.

constanciooeste avatar Oct 02 '26 09:10 constanciooeste

Wow, you are the first person I know of to still have hitches on the branch. Can you do these diagnostics steps for me:

ETW trace (Windows only)

Record a 20-30 second ETW trace of FXServer when the hitches are happening https://support.cfx.re/hc/en-us/articles/8366604193436-Creating-an-Event-Tracing-for-Windows-ETW-trace-log-for-FiveM-Troubleshooting

Prometheus logs

This feature branch includes additional diagnostics data in the form of Prometheus metrics. If you haven't set up Prometheus/Grafana for your server, you will have to do so. I'll describe the simplest way here:

  1. In txAdmin, edit your config to set a username and password for the Prometheus /perf endpoint. Obviously change the password
set sv_perfDiagnostics true
set sv_prometheusBasicAuthUser "metrics"
set sv_prometheusBasicAuthPassword "replace-with-a-secret"
  1. Download Prometheus https://prometheus.io/download/ prometheus-3.14.0.windows-amd64.zip or prometheus-3.14.0.linux-amd64.tar.gz
  2. Extract it somewhere and run it
  3. This will create the prometheus.yml config file. Open it and add this under scrape_configs. Change the password again
  - job_name: 'fxserver'
    scrape_interval: 1s
    basic_auth:
      username: metrics
      password: replace-with-a-secret
    metrics_path: /perf
    static_configs:
      - targets: ['127.0.0.1:30120']
Image 5. Restart Prometheus and go to http://localhost:9090/.

Note: If your server is on Linux and doesn't have a desktop environment, you may have to forward port 9000 and access it from http://server_ip:9000/. This is very much not recommended as it publicly exposes your server's performance, but it will work for the one time. Long term look into setting up some VPN like Tailscale and only exposing port 9000 to it

  1. In the search box type in fxserver_diagnostic_activity_total and select Graph. This will start graphing the dataImage

When you have hitches, run the following command in a terminal to export the diagnostics data to a json file. Change the date and time to the time you're having hitches in UTC timezone. Send the file to me on Discord @Gogsi123

curl -G "http://localhost:9090/api/v1/query_range" \
  --data-urlencode "query={__name__=~'.+'}" \
  --data-urlencode "start=2026-09-01T19:00:00Z" \
  --data-urlencode "end=2026-09-01T20:00:00Z" \
  --data-urlencode "step=1s" \
  -o prometheus_metrics_export.json

(Alternatively you can also set up a Grafana instance, connect it to Prometheus and export the data from there https://grafana.com/docs/grafana/latest/fundamentals/getting-started/first-dashboards/get-started-grafana-prometheus/)

Gogsi avatar Oct 02 '26 09:10 Gogsi

I’ll switch the artifact on my server during the next restart and run the test. I’ll send you the results via Discord.

constanciooeste avatar Oct 02 '26 10:10 constanciooeste

This fixes the hitches https://github.com/citizenfx/fivem/pull/4242 https://github.com/citizenfx/fivem/pull/4246 And this probably address the root cause of latent event being sent as reliable fragments https://github.com/citizenfx/fivem/pull/4243

manzarek123 avatar Oct 02 '26 10:10 manzarek123

Was the early Outdated Server Artifact restriction intentional?

No it was not intentional. 25770 was supposed to be available until October 15 but the automation to remove it after 6 weeks kicked in. It is being looked into.

Simultaneously, a new version of the feature branch is being prepared which should address the Latent event ACK Overflow and Timed out after 60 seconds (1, 0) issues that appear for some players joining the server.

Thank you for the reply! Do you know when we can expect to be able to resume using 25770 or when the update for the new experimental build will be available as I really don’t want to enter the weekend and have my server timeout everyday and have players deal with this due to this issue.

singlesdon avatar Oct 02 '26 10:10 singlesdon

@prikolium-cfx Sorry for the ping, but can we please get some insight as this is an urgent issue. There is no available stable artifact after 25770 was discontinued early yesterday. What are servers supposed to do?

singlesdon avatar Oct 02 '26 12:10 singlesdon

Can we please get an update for this?

singlesdon avatar Oct 05 '26 16:10 singlesdon

Running on the feature branch above i still have svMain hangs and such, players are having timeout issues when connecting

Image

madd15 avatar Oct 06 '26 08:10 madd15

Running on the feature branch above i still have svMain hangs and such, players are having timeout issues when connecting

The networking changes shouldn't have an impact on svMain. Another difference between 25770 and later artifacts is the upgrade to Node.js 22. Do you happen to have a lot of Javascript resources? Or resources that run heavy queries in ox_mysql for example?

Gogsi avatar Oct 06 '26 16:10 Gogsi

Can we please get an update for this or 25770 back as an artifact as this is still an urgent issue.

We have tested this https://runtime.fivem.net/artifacts/fivem/build_server_windows/feature/network-improvements-clean/ and we are still getting mass timeouts from players timing out after 60 seconds. There is no working viable artifact and it has been close to a week now.

Image

singlesdon avatar Oct 07 '26 11:10 singlesdon

Same issue here, nobody knows solution, everything worked fine on 25770.

florijanftw avatar Oct 07 '26 19:10 florijanftw

https://runtime.fivem.net/artifacts/fivem/build_server_windows/feature/network-improvements-clean/

I tried this artifact for the last two days and this build causes the network thread to hang when going over 360 players. Can CFX please respond to this urgent issue it’s effecting a vast amount of servers across the platform and there is no working artifact and it’s been over a week now. Can you please bring back the bucketed reliable-command lookup and per-tick scan budget, all the work under sv_perfDiagnostics, into the -clean branch?

singlesdon avatar Oct 08 '26 11:10 singlesdon

b35245 Windows heap contention during svSync watchdog failure

The full dump provides a concrete allocator bottleneck during the sync-warning/voice-failure episode. On Windows artifact 35245, UV loop: tcp0 owns the default process heap lock while traversing a long free list for a 64 KiB allocation. Nine other threads, including svSync, svMain and all seven other TCP loops, are waiting for that same lock.

This narrows the investigation beyond a generic sync/network hitch. It does not yet establish which allocation pattern produced the fragmentation or identify a server resource as the cause.

Exact evidence

  • Full dump: 07234302-a557-434e-bc05-d7bb063d439e-full.dmp, header timestamp 2026-10-13 01:46:56 UTC, process uptime 2:46:04.
  • Artifact verified from DLL version resources: 1.0.0.35245. Windows Server build 20348, 16 logical CPUs.
  • PEB ProcessHeap: 0x2b3836b0000; heap LockVariable / critical section: 0x2b3836b02c0.
  • OwningThread = 0x33dc (13276), RecursionCount = 1, thread name UV loop: tcp0.
  • Owner RIP: ntdll!RtlpAllocateHeap+0x2ae. Requested allocation: 0x10000; internal required size: 0x1001 16-byte units.

Owner stack, with module-relative offsets for Cfx/libuv frames lacking exact PDBs:

ntdll!RtlpAllocateHeap+0x2ae
ntdll!RtlpAllocateHeapInternal+0x6c9
ucrtbase!_malloc_base+0x36
net-tcp-server.dll+0x37ea7
net-tcp-server.dll+0x254d7
libuv.dll+0x214b7
libuv.dll+0x8b93
libuv.dll+0x85d0
net-tcp-server.dll+0x1cb20
net-tcp-server.dll+0x1dece

The heap free list contains 47,790 blocks totaling 1,117,773,088 bytes, exactly matching TotalFreeSize * 16. Traversal checked backlinks, cycles, decoded header checksums and free flags without finding an inconsistency in this list.

The current last-bucket hint (ArraySize=0x400, BaseIndex=0x80, no extended lookup, ExtraItem=0) points to 0x2b42805f030. Walking forward reaches 30,178 undersized blocks before the first 65,552-byte fit at 0x2b5fc748110. The currently examined node, 0x2b4b76de080, is at position 11,127 in that walk. This reconstructs the search on the snapshot; it does not time the allocation or assert that it completed. The ntdll instruction loop advances through that list while retaining the heap lock.

Free-block distribution includes 16,491 blocks of 20,512 bytes, 3,622 of 41,024 bytes and 3,027 of 24,528 bytes.

Sync-side lead

svSync is waiting inside aligned_free, called from citizen-server-state-fivesv.dll+0x35bc0. The reconstructed caller operates on a vector with a 40-byte element stride, 20,480-byte capacity (512 elements) and 11,200 used bytes (280 elements). Its still-busy underlying heap block is 20,512 bytes, matching the dominant free-block size.

The surrounding stack contains recursive destruction at citizen-server-state-fivesv.dll+0x406fb/+0x4070b and a call from citizen-server-impl!fx::Client::~Client+0x68. This appears consistent with destruction of saved client synchronization state, but that source/type mapping needs confirmation using exact b35245 symbols. It does not establish the provenance of every similarly sized free block.

ETW correlation and boundaries

  • The ETL from the same episode has 37,413 / 56,283 FXServer CPU samples (66.47%) at ntdll!RtlpAllocateHeap+0x2ae and ntdll!RtlpHeapFindListLookupEntry+0x14c combined.
  • svSync, svMain and TCP waits share the same critical-section address.
  • The stored exception is a deliberate null write from the watchdog, with svSync in the exception stack, consistent with the server watchdog termination path.
  • Full and small dump timestamps differ by six seconds, and TCP thread states differ; this is not evidence that one TCP thread held the lock continuously for the entire watchdog interval.
  • There is free memory in the heap and its CommitFailures counter is zero. This is not sufficient to assess host-wide physical-memory pressure.
  • Exact Microsoft PDB identities were verified. The Cfx symbol endpoint returned HTTP 401 during the earlier analysis, so Cfx offsets are intentionally not assigned speculative function names.

Could the team symbolize these b35245 offsets and investigate the allocation/free pattern, particularly TCP buffer allocations competing with synchronization-state buffers on the process heap? Is there a build that specifically addresses this allocator contention? The existing evidence does not identify a custom model/map or establish that a networking feature branch fixes this particular bottleneck.

daviten74 avatar Oct 13 '26 17:10 daviten74

I was facing the same issue using latest recommended artifacts and the only stable one was depreciated forcing my players to join through the connect code.

I was able to fix this by changing the embedded version strings from 25770 to 37474 so FiveM thinks it's a supported build but really it's the depreciated working one.

PabloBong avatar Oct 19 '26 17:10 PabloBong

I was able to fix this by changing the embedded version strings from 25770 to 37474

I would heavily advise against doing that as it's possible it trips certain checks and your server ends up getting delisted or even banned. You should not under any circumstances mess with data that's being sent to the server masterlist, it is not a supported use-case.

Instead of that, try these artifacts 37264 - everyone that I've spoken to has no issues on them, except for 4 servers that all share the same hosting provider. I'm suspecting the issue there is with the provider's DDoS protection not being compatible with the new changes

Windows: https://runtime.fivem.net/artifacts/fivem/build_server_windows/feature/network-improvements-clean/ Linux: https://runtime.fivem.net/artifacts/fivem/build_proot_linux/feature/network-improvements-clean/

Gogsi avatar Oct 19 '26 17:10 Gogsi