Simple Voice Chat

Simple Voice Chat

31M Downloads

Sometimes laggy in proximity, works fine in groups.

Cryothemium opened this issue · 26 comments

commented

Bug description
The proximity chat function works most of the time, but sometimes lags for no seeming reason. The rest of the server does not lag so I do not believe that to be the issue. Groups work fine however, and there is never any lag in those. There are no common factors to when it does speak, and nothing is showing up on the Console when it happens.

Steps to reproduce the issue

  1. Speak
  2. Continue speaking until it starts lagging

Expected behavior
I expected it not to lag randomly.

Versions

  • Minecraft version: 1.16.5
  • Fabric version:
  • Mod version: voicechat-1.16.5-1.3.11.jar

Other mods
Origins, as well as a Datapack to add extra origins. Clientside, I'm also running Optifabric and Optifine, though people without those extra mods are experiencing the same issues.

Screenshots (Optional)

2021-05-23.13-00-45_Trim.mp4
commented

Im getting this too. ill provide the logs for you since i have the exact same problem, but only if you say nessicary

commented

i have the exact same version as him, on all of those factors.

commented

Please send me the log files of your client and server.

commented

Im getting this too. ill provide the logs for you since i have the exact same problem, but only if you say nessicary

Yeah, please send me the logs.

commented

Nothing appears in server logs, at all to do with it. Ill check client.
https://gist.github.com/xxpeafowlxx/9fe07de5bc435da4680314557cf97cbf
Client seems to ahve something, but nothing appeasr in the servers one, not a single mention of vc mod or anything.

commented

Please send me the full logs of both.

commented

Got it, 1 sec.

commented

https://gist.github.com/xxpeafowlxx/bf1520abc7720e045ce2e40b049e4123 - server log
https://gist.github.com/xxpeafowlxx/37c87277ce1b653c015bc40a6b8e31c5 - client log

apologies they're a bit clogged up, those are just mods we have to have for other mods to work etc

commented

2:12:21] [VoiceChatPacketProcessingThread/INFO]: Player 39606cc0-c614-48b0-91b7-1fa335018ce2 timed out
[02:12:21] [VoiceChatPacketProcessingThread/INFO]: Reconnecting player Luden / Lud3n_23
[02:12:21] [VoiceChatPacketProcessingThread/INFO]: Sent secret to Luden / Lud3n_23
[02:12:21] [VoiceChatPacketProcessingThread/INFO]: Player 93d3fe29-9cab-41dd-8eeb-9c381660ce9b timed out
[02:12:21] [VoiceChatPacketProcessingThread/INFO]: Reconnecting player maeuko
[02:12:21] [VoiceChatPacketProcessingThread/INFO]: Sent secret to maeuko
[02:12:21] [VoiceChatPacketProcessingThread/INFO]: Player d7081a7f-33bf-45fa-b9ad-a3a5285759b9 timed out
[02:12:21] [VoiceChatPacketProcessingThread/INFO]: Reconnecting player XxPeafowlxX
[02:12:21] [VoiceChatPacketProcessingThread/INFO]: Sent secret to XxPeafowlxX
[02:12:21] [VoiceChatPacketProcessingThread/INFO]: Player 8d8af8f8-75e7-4824-ae13-b0ec9f49d6fb timed out
[02:12:21] [VoiceChatPacketProcessingThread/INFO]: Reconnecting player Exsul
[02:12:21] [VoiceChatPacketProcessingThread/INFO]: Sent secret to Exsul
[02:12:21] [VoiceChatPacketProcessingThread/INFO]: Player 6ecddc46-128d-4d87-a98d-dfdebbd63daa timed out

It seems that you are experiencing frequent timeouts. Does this happen all the time?

[02:21:13] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2969ms or 59 ticks behind
[02:21:32] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 3863ms or 77 ticks behind
[02:21:51] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 4162ms or 83 ticks behind

It also seems that your server is under heavy load.
This can cause the voice chat to lag. Especially when using the proximity feature, since it requires more resources to do the locating of players, calculating position vectors for and stuff.

What are the specs of your server and what is your servers CPU usage when the voice chat laggs?

Is the proximity chat delayed when it laggs?

commented

Yeah, I am experiencing the same exact thing on the same version and everything.

We run a Shockbyte server with ~7 people on average. And I notice a massive server lag spike when everyone time outs and reconnects.

What are the specs of your server and what is your servers CPU usage when the voice chat laggs?

Memory: 5GB (Planning to upgrade to see if that fixes the issue)
CPU: "Intel® Xeon™ CPU's, SSD's and high-grade DDR4 ECC Memory" as stated in the shockbyte homepage.

Is the proximity chat delayed when it laggs?

Yes for me

commented

Do you have a way to see the CPU usage of your server?

commented

I have a way of seeing it through the server host, it almost never goes over 50% capacity, usually around 35%, sometimes around 60% when there are more than ten people on which is rare enough on its own.

commented

How many cores do you have?
When having 50% usage it could utilize a single core of dual core CPU by 100%.

commented

I believe it is single core.

commented

I believe it is single core.

Having at least another core is recommended, since the voice chat is running a lot of stuff threaded.

commented

I believe it is single core.

Having at least another core is recommended, since the voice chat is running a lot of stuff threaded.

could more memory help if you cant upgrade the cpu easily?

commented

If the memory isn't the bottleneck, no.

commented

Is there any way you could add a config that restricts the number of threads or removes the encryption to lighten the load on the CPU?

commented

No. It has to happen threaded, so the voicechat works in realtime.
If your system is too weak to handle this, please consider upgrading.
Removing the ability to use threads would it make far worse!

commented

I pushed a new update. Can you please send me the logs of this happening in this version:

https://www.curseforge.com/minecraft/mc-mods/simple-voice-chat/files/3344919

commented

Hi @henkelmax going to piggy back on this issue as my is too similar to open a different thread.

I'm currently hosting a server for a YouTube series where we have ~ 14 people online at the same time. When we did our first session stress test, we had really bad issues with audio hitching mid sentence, as well as audio lagging so bad that it was unrecognizable using proximity chat with large numbers of people. Surprisingly, despite the audio lag in large groups, when the group was split up we noticed the following:

  • Even with 14 people on the server, the server did not exhibit any block lag, even when audio lag was occurring.
  • Audio Lag was virtually non existent with all 14 people split into groups of 2 using proximity chat.
  • With groups of 3 there tended to be slightly more issues with proximity chat.
  • Groups of 4 or more in the same proximity chat rendered audio virtually unrecognizable.

We also tried using the group feature, which does not work for our series, but yielded similar results to proximity chat with audio becoming unrecognizable as more people were added (~ 5 people in groups)

I haven't had a chance to browse through the source code, but it's interesting that the "separate" proximity chats can work fine, but as you add more people to them it breaks down. (I.e. 7 proximity chats of 2 players works great, but 2 proximity chats of 7 players struggles).

Our server is running:

  • Minecraft 1.16.5
  • fabric-api 0.34.6
  • During the test: 1.16.5 - 1.3.11 Simple Voice Chat

We have also tried the most recent version of simple, 1.16.5 - 1.4.4. This did not seem to fix the problems we were having. Albeit we only were able to test with 5 players. However we did notice a new problem that I had not seen before where peoples mics would cut out halfway through a sentence. This was a problem that did not exists on 1.3.11

Currently using a hosting service that only offers single core cpus. I know that this was a possible reason for the lag. Did some cursory searches and have not been able to find any that offer multi core cpus.

System Stats from my server host's website:
CPU: 4.4 - 5 GHz Processor (High Priority)
Ram: 5 GBs DDR4 2400 MHz
SSD: NVMe 2500+ MB r/w

The two common logs I've been seeing is this, but not sure if it's even related:
[22:25:55] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at java.net.PlainDatagramSocketImpl.send(Native Method) [22:25:55] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at java.net.DatagramSocket.send(DatagramSocket.java:693) [22:25:55] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at de.maxhenkel.voicechat.voice.server.ClientConnection.send(ClientConnection.java:49) [22:25:55] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at de.maxhenkel.voicechat.voice.server.Server.processProximityPacket(Server.java:214) [22:25:55] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at de.maxhenkel.voicechat.voice.server.Server.access$700(Server.java:20) [22:25:55] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at de.maxhenkel.voicechat.voice.server.Server$ProcessThread.run(Server.java:155) [22:25:55] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: java.io.IOException: Operation not permitted (sendto failed)

and
[23:03:17] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: java.io.IOException: Operation not permitted (sendto failed) [23:03:17] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at java.net.PlainDatagramSocketImpl.send(Native Method) [23:03:17] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at java.net.DatagramSocket.send(DatagramSocket.java:693) [23:03:17] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at de.maxhenkel.voicechat.voice.server.ClientConnection.send(ClientConnection.java:49) [23:03:17] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at de.maxhenkel.voicechat.voice.server.Server.sendPacket(Server.java:253) [23:03:17] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at de.maxhenkel.voicechat.voice.server.Server.keepAlive(Server.java:228) [23:03:17] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at de.maxhenkel.voicechat.voice.server.Server.access$100(Server.java:20) [23:03:17] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at de.maxhenkel.voicechat.voice.server.Server$ProcessThread.run(Server.java:117)

Thanks for your help on this, let me know if there's anything I can help with or additional info I can give!

commented

Can you please send me the full logs via github gist?

commented

Can you please send me the full logs via github gist?

I've copied a portion of the server logs to a gist here. The actual log is almost 300 MB so if you need more let me know
https://gist.github.com/Hhartle/ce1e8c489e7b37aa770cdf8498660586#file-gistfile1-txt

commented

@henkelmax I saw that too. What is strange is that in the logs it says that it successfully started on the port.
[20:28:06] [VoiceChatServerThread/INFO]: Server started at port 24454

There were a few hidden errors that I also saw. Unsure if they are related or not.
[21:04:55] [VoiceChatPacketProcessingThread/INFO]: Player timed out [21:04:55] [VoiceChatPacketProcessingThread/INFO]: Reconnecting player Player7 [21:04:55] [VoiceChatPacketProcessingThread/INFO]: Sent secret to Player7 [21:04:55] [VoiceChatPacketProcessingThread/INFO]: Successfully authenticated player

Regardless, I'll open this in a new issue here: #218, and also reach out to my server host to make sure that the port can be / is opened.

commented

[21:06:44] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: java.io.IOException: Operation not permitted (sendto failed)
[21:06:44] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at java.net.PlainDatagramSocketImpl.send(Native Method)
[21:06:44] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at java.net.DatagramSocket.send(DatagramSocket.java:693)
[21:06:44] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at de.maxhenkel.voicechat.voice.server.ClientConnection.send(ClientConnection.java:49)
[21:06:44] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at de.maxhenkel.voicechat.voice.server.Server.sendPacket(Server.java:253)
[21:06:44] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at de.maxhenkel.voicechat.voice.server.Server.keepAlive(Server.java:228)
[21:06:44] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at de.maxhenkel.voicechat.voice.server.Server.access$100(Server.java:20)
[21:06:44] [VoiceChatPacketProcessingThread/INFO]: [STDERR]: at de.maxhenkel.voicechat.voice.server.Server$ProcessThread.run(Server.java:117)

@Hhartle It seems that this is not related to this issue. Your logs are completely spammed with this messgae.
Can you please make sure your server hoster supports opening other ports than the default minecraft port?

These messages usually occur if a server hoster tries to block other types of connections. But the strange thing is that it partially works for you.

If my assumption isn't correct and it is some kind of different cause, please open another issue for this problem.

commented

I'm closing this, since it is basically the same as #209