periodic network problem
#1
I've got a network issue that seems to repeat itself 10 times in roughly 9 minutes, or somewhere around every 54 seconds or so. It doesn't just affect the box that kodi is running on. It causes a hiccup on the entire network, as the cable modem / router from my ISP seems to freak out when this happens. Repeating traceroutes show latencies from 500-2500 ms or more on the first hop at 192.168.0.1 for any/all machines in the house. Exiting Kodi solves the problem, and the network shows no signs of any trouble after that. Fire Kodi back up again and the periodic trouble returns.

I am at a loss as to what might be causing it. I'm using PingPlotter running on my main up-to-date Win10 desktop to help in troubleshooting, which is a different machine than Kodi runs on. I've got an up-to-date Win7 home theater PC in the livingroom for Kodi. Both of these machines are wired directly into the router with CAT5e, so there isn't any wireless interference at play, either. Here's the troubleshooting I've done so far:

Kodi running, with problem shown as periodic huge peaks of latency
Image

Kodi exited around 3:41, problem gone
Image

Kodi restarted just after 3:47, problem returns
Image

In UPnP I disabled 'share my libraries' and found no change. Re-enabled.
Disabled UPnP 'allow remote control' and found no change. Re-enabled.
Disabled 'allow remote control via HTTP' and found no change. Re-enabled.
Disabled 'allow remote control by programs on this system' and found no change. Re-enabled.
Disabled AirPlay and found no change. Left off for next step, as that was required.
Disabled zeroconf's 'announce services to other systems' and found no change. Re-enabled it and AirPlay.

Since the problem shows latency on 192.168.0.1, the router itself, and is the same on any of the other machines here I kind of doubt the OS on any other machine here is playing any part. I had been pulling my hair out over this one, trying different network cards and cutting/crimping/running new network cables to try and track down the source of the issue, including having my ISP over here to check all my equipment for their service. They even gave me a new cable modem / router, which somehow seemed to fix the issue temporarily. I think the only reason that even did anything to "solve" the problem was because one of the things we did while the cable guy was here and had finished replacing the modem was to shut all computers down and start with just my desktop. All seemed fine. Fired up some other machines, all seemed fine. So he went on his way, job done.

Then later that day when I got around to firing Kodi up again, the problem was back. Aha! Kill Kodi, problem goes away. OK, so it has something to do with Kodi. That's one step closer to solving it, but I've gone as far as I can to try and figure this out. I'll be glad to do any work I need to do to try to help get this solved, but I don't know what else I can do on my own now. I've backed up my current settings and I've started going backwards in release versions to see if/when the problem goes away/appears. But I've only just started that portion, and I've tested 15.2, 15.1, and 15.0 now and they all do it. I think I'll actually go a step further and nuke each version and existing settings so I'm starting fresh with each version, as that may help, too. But I thought I would at least get this out there while some of this is still fresh in my mind, before I forget any details.

edit: I'd post a log, but when I turned debugging on and let the box sit through a few of the hiccups and then turned logging back off and had a look through the log there was nothing listed during that time that the machine just sat there and the hiccups occurred.
Reply
#2
Well, I've now remembered that Wireshark exists, so I downloaded that and installed it. I'm guessing this has something to do with UPnP, as I think that's all I see from Kodi in there. And the Kodi UPnP packets seem to coincide with the latency spikes I'm seeing. Here's some of what I found with the different versions concerning whether or not they cause the latency spikes:

14.0-14.2 releases: No.
15.0 alpha 1: No.
15.0 alpha 2: No.
15.0 beta 1: Yes.
15.0 beta 2: Yes.
15.0 release - 15.2 release: Yes.
16.0 beta 1: Yes.

I have no idea what code differences there are between the 14.x branch, and the first two alphas for 15.0 compared to the first beta for 15.0 and onwards from there, but up to 15.0 alpha 2 all the builds seem to behave themselves. And then from 15.0 beta 1 onward it makes things freak out on my modem/router every time the UPnP packets are fired out onto the wire.
Reply
#3
Hello _Shorty,

i have exactly the same problem as you. I blamed OpenElec, because previous Kodi versions caused no problems, and i recently switched to OpenElec, but now, i am sure that the problem is Kodi related.
I described my problems here:
http://openelec.tv/forum/134-usage/78922-lagspikes
and here
http://openelec.tv/forum/146-wetek-play/...-box-is-on

I would apreciate any hints or tips.
Reply
#4
I did myself short check, running pingplot and wireshark in parallel. The result is attached. There is some periodicall upnp scream, originating from Kodi machine, which causes the problems.
Image

i am also attaching Wireshark capture of the traffic.
Wireshark capture

If any other log or anything is needed, please let me know.
Reply
#5
Well, at the very least, I'm "happy" to see that someone else has noticed it. And I can exit Kodi on that machine if I am doing any "important" gaming that I don't want interrupted by this. hehe. But obviously it would be nicer if a fix is figured out and implemented.
Reply
#6
periodical multicast scream from zeroconf provider is perfectly fine - because this is how it works.
those packets have sizes not worth mentioning.

those parts you pointed out are most probably provocated directly by your router, which is sending SSDP notifies - which can be answered by client machines on network via unicast http requests. and that answer is perhaps what what is causing spikes on the routed traffic.
(as router notify about multicast group availability, zeroconf of kodi will decide to join - what is a process router must handle in the role of multicast proxy - it can take some 1-2-3s)

but by all means this is no bad pictorure of kodi, but your routers firmware poor quality, misconfiguration on your side - and very much also braveness - to have all this auto configuration protocols allowed on your outside gateway device (and without any control be passed to your home LAN).

good advice, don't continue with that approach Wink

at least try to disable the SSDS part.
Reply
#7
Nothing I can do to make Motorola fix their "poor firmware quality" that I know of. The fact that Kodi 14.x doesn't cause the problem, but 15.x does, tells me that there is something that can be done in Kodi to remove the problem, though.
Reply
#8
Ok, mk01, thanks a lot for your answer. Few points to this:
1) I have Cisco router, sure the quality of the fw could be bad but i would doubt that. Anyway, i can not change the router and thats fact also for many other users, because the router choice is limited by the ISP.
2) You are right, its the answer on the routers request, i put Kodi on another network, where upnp is switched off and yes, it works without any flaws.
3) As _Shorty pointed out, the hiccups are present from version 15.x onwards, so, Kodi is partially responsible for the problems.
4) Now, as i am not an networking expert, could yopu be please more elaborate on SSDP part? As i understood, SSDP is service, which allows to discover other devices and services within the LAN. You speak about braveness and misconfiguration. Ok. How those services should be configurated in the right way? If i disable SSDP (upnp) on the router, would that mean, that the devices within LAN wil be no more capable to see each other without manual config? (As far as i know, Kore uses upnp for discovering Kodi in LAN, isnt it so?) Will this limit functionality of other devices in the network? (as for example smart TVs, DAP radios etc.).
I have no deep knowledge of the networking side, neither have thousands of other users. I tried to google out the impact of the SSDP service, but i can be wrong in my conclusions, so i would apreciate, if you can be more specific. Thanks a lot in advance. (sorry for my bad english, i am not native speaker)
Reply
#9
Latest report.
1) I moved Kodi to completely different network running on Zyxel router/modem P660HN-T3A. No matter, whats the setup of upnp at the router the lag spikes are not there
2) I moved Kodi back to my network, runnig on Cisco EPC3925. Disabling upnp solves the problem.

I did vulnerability scan of upnp on my networks with rapid7 free tool and in both networks, the scanner is able to find upnp devices but does not see any possible vulnerability. Now, the problem is gone, but i am not so happy with the solution. I have to check if everything in the network works as it worked before and i still think, that Kodi is partially responsible for the strange behavior. I will probably write a bug report later on. If someone with better english skill could add this temprorary solution into Kodi wiki, that would be great.
Reply
#10
Same problem here. Are there any updates on this?
Reply

Logout Mark Read Team Forum Stats Members Help
periodic network problem0