overte-org / overte

Overte open source virtual worlds platform.
https://overte.org/
Other
148 stars 51 forks source link

Assert crashes debug version of entity server #856

Open ksuprynowicz opened 8 months ago

ksuprynowicz commented 8 months ago

Assert in entity server crashes debug build of the server very often, making it almost impossible to work on it. Maybe we can change assert to critical message, or figure out why it happens?

[03/06 23:25:12] [FATAL] [default] [34667] [entity-server] ASSERT failure in LimitedNodeList::sendUnreliablePacket: "Trying to send a reliable packet unreliably.", file /home/ksuprynowicz/overte/overte_v8/overte/libraries/networking/src/LimitedNodeList.cpp, line 425
Aborted (core dumped)
HifiExperiments commented 8 months ago

is this coming from OctreeSendThread::packetDistributor? it does call sendUnreliablePacket:

    // Re-send packets that were nacked by the client
    while (nodeData->hasNextNackedPacket() && _packetsSentThisInterval < maxPacketsPerInterval) {
        const NLPacket* packet = nodeData->getNextNackedPacket();
        if (packet) {
            DependencyManager::get<NodeList>()->sendUnreliablePacket(*packet, *node);
...
        }
    }

presumably this should call sendPacket instead, like we do in OctreeSendThread::handlePacketSend?

the packet nacking was one thing I didn't understand with the PacketList PR. specifically, in OctreeQueryNode::packetListSent/SentPacketHistory::packetListSent, we only have one sequence number, but multiple packets, so maybe that's breaking something.