Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004068Zandronum[All Projects] Bugpublic2022-12-29 18:522024-04-09 04:04
ReporterKaminsky 
Assigned ToKaminsky 
PrioritynormalSeveritymajorReproducibilitysometimes
StatusresolvedResolutionfixed 
Platformx86_64OSLinuxOS Version
Product Version3.1 
Target Version3.2Fixed in Version3.2 
Summary0004068: Linux servers don't send out commands normally if there's at least one client connected but spectating
DescriptionHere's a recording from a 3.2-alpha server that was full of bots and only one client that was connected but spectating:'https://cdn.discordapp.com/attachments/472599799825432577/1021956762414370846/2022-09-20_20-28-33.mp4 [^]'

You'll see that the bots' movements aren't updating constantly, their movement gets updated roughly once every second. Likewise, actors that are spawned like projectiles only happen in the same intervals. Although this was recorded on a 3.2-alpha server, it should also happen in 3.1.

While the client's spectating, commands sent by the server don't actually get sent out properly, but as soon as they join the game, the issue stops and the commands get sent out normally.
Additional InformationThis issue particularly affects Linux servers because the network socket goes to sleep for one second, waiting for any input commands from clients. After one second, the socket stops waiting and sends out any server commands that are queued (in bursts). This doesn't happen on Windows servers since the network socket doesn't go to sleep, as shown in I_DoSelect below:

void I_DoSelect (void)
{
#ifdef WIN32
/*
    struct timeval timeout;
    fd_set fdset;

    FD_ZERO(&fdset);
    FD_SET(g_NetworkSocket, &fdset);
    timeout.tv_sec = 1;
    timeout.tv_usec = 0;
    if (select (static_cast<int>(g_NetworkSocket)+1, &fdset, NULL, NULL, &timeout) == -1)
        return;
*/
#else
    struct timeval timeout;
    fd_set fdset;

    FD_ZERO(&fdset);
    if (do_stdin)
        FD_SET(0, &fdset);

    FD_SET(g_NetworkSocket, &fdset);
    timeout.tv_sec = 1;
    timeout.tv_usec = 0;
    if (select (static_cast<int>(g_NetworkSocket)+1, &fdset, NULL, NULL, &timeout) == -1)
        return;

    stdin_ready = FD_ISSET(0, &fdset);
#endif
}

Clients don't send commands (e.g. CLC_CLIENTMOVE) to the server constantly, unlike when they're in the game. With no incoming commands reaching the server, the network keeps waiting even though there's already a client in the server.
Attached Files

- Relationships
related to 0002602resolved Ceiling height updates aren't sent correctly to spectators 

-  Notes
User avatar (0022859)
Kaminsky (developer)
2023-07-02 21:15

This should now be fixed with:'http://hg.osdn.net/view/zandronum/zandronum-stable/rev/a5156e1a5726 [^]'
User avatar (0023573)
Ru5tK1ng (updater)
2024-04-09 04:04

Hoped on a EB server that was running Linux and the latest April 3.2 beta. The server had 9 bots and as I connected and spectated they all moved and fired normally. No issues were spotted after a few minutes of spectating.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2022-12-29 18:52 Kaminsky New Issue
2022-12-29 18:53 Kaminsky Relationship added related to 0002602
2022-12-29 19:12 Kaminsky Status new => confirmed
2023-07-02 21:15 Kaminsky Note Added: 0022859
2023-07-02 21:15 Kaminsky Assigned To => Kaminsky
2023-07-02 21:15 Kaminsky Status confirmed => needs testing
2024-04-09 04:04 Ru5tK1ng Note Added: 0023573
2024-04-09 04:04 Ru5tK1ng Status needs testing => resolved
2024-04-09 04:04 Ru5tK1ng Resolution open => fixed
2024-04-09 04:04 Ru5tK1ng Fixed in Version => 3.2






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker