Bug Information
Client Version: FXServer (production) FXServer Version: [Latest stable - exact version from crash dump: c7b7731d-21cb-417d-96015995-d9d3b651] Operating System: Linux (Rocky Linux 9) Category: Server crash - File descriptor/Network handling
Expected Behavior
- Player save operations should complete successfully
- Server should remain stable during normal gameplay
- Network operations should not exhaust file descriptors
Actual Behavior
- Server crashes immediately after player save operations
- Assertion failure in libuv network handling code
- Multiple thread performance hitches before crash
- Complete server termination requiring restart
Crash Details
Error Message
[ script:qb-core] [qb-core:LOG] Gabriel PLAYER SAVED!
Assertion failed: fd_to_send >= 0 (../deps/uv/src/unix/stream.c: uv__try_write: 791)
[ citizen-server-impl] network thread hitch warning: timer interval of 324 milliseconds
[ citizen-server-impl] server thread hitch warning: timer interval of 341 milliseconds
[ citizen-server-impl] sync thread hitch warning: timer interval of 323 milliseconds
=================================================================
FXServer crashed.
A dump can be found at /home/evergreen/EverGreen/alpine/opt/cfx-server/crashes/c7b7731d-21cb-417d-96015995-d9d3b651.dmp.
Failed to automatically report the crash. Please submit the crash dump to the project developers.
=================================================================
Aborted (core dumped)
Technical Analysis
- Root Cause: File descriptor exhaustion leading to invalid
fd_to_sendvalue - Trigger: Player save operations in QB-Core framework
- Secondary Effects: Network and server thread performance degradation (300ms+ hitches)
- Location: libuv stream handling code (
../deps/uv/src/unix/stream.c:791)
Reproducible Steps
- Set up FXServer with QB-Core framework
- Configure server with default file descriptor limits (1024)
- Load multiple resources and connect players
- Trigger player save operation (disconnect/manual save)
- Server crashes with
fd_to_send >= 0assertion failure
Contributing Factors
System Configuration
- File descriptor limit: 1024 (system default - too low for FiveM)
- Resource load: High number of loaded resources
- Database operations: Multiple concurrent MySQL connections
- Network activity: Large LUA table transmissions
Workaround/Solution
Immediate Fix:
# Increase file descriptor limits
ulimit -n 65536
# Add to /etc/security/limits.conf:
* soft nofile 65536
* hard nofile 65536
Impact
- Severity: Critical - Complete server crash
- Frequency: Occurs consistently during player save operations
- Workaround Available: Yes (increase file descriptor limits)
- Data Loss: Potential player progress loss if save operation fails
Additional Information
Hardware: AMD Ryzen 9 7950X3D 16-Core Processor
, 128 GB RAM/CPU Network: Remote MySQL database connection Framework: QB-Core with oxmysql Players: Occurs with low player count (1-3 players)
The issue appears to be a combination of:
- System-level file descriptor limitations
- FXServer’s aggressive file descriptor usage during network operations
- Large data transmissions triggering the libuv assertion
Crash dump available at:
c7b7731d-21cb-417d-96015995-d9d3b651.dmp (4.7 MB)