[mythtv-commits] Ticket #12395: SSDP thread uses 100% CPU
MythTV
noreply at mythtv.org
Tue Mar 3 18:16:04 UTC 2015
#12395: SSDP thread uses 100% CPU
----------------------------------------+------------------------
Reporter: Warren Falk <warren@…> | Owner: dblain
Type: Bug Report - General | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - UPnP | Version: 0.27-fixes
Severity: medium | Keywords:
Ticket locked: 0 |
----------------------------------------+------------------------
On both backend and frontend, the SSDP thread after a few minutes or hours
will jump to 100% CPU and never come down.
I discovered this to be caused by a zero byte UDP packet (that some badly
designed UPNP device on my network must be sending).
This can be reproduced using the following C program:
{{{
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>
#include <stdio.h>
int main(int argc, char**argv)
{
int sockfd,n;
struct sockaddr_in servaddr,cliaddr;
char sendline[0];
sockfd=socket(AF_INET,SOCK_DGRAM,0);
bzero(&servaddr,sizeof(servaddr));
servaddr.sin_family = AF_INET;
servaddr.sin_addr.s_addr=inet_addr("239.255.255.250");
servaddr.sin_port=htons(1900);
int len = 0;
printf("Send %d bytes\n", len);
sendto(sockfd,sendline,len,0,(struct sockaddr
*)&servaddr,sizeof(servaddr));
}
}}}
And then running the following (on the backend, just for example)
{{{
top -H -p `pgrep mythbackend`
}}}
--
Ticket URL: <https://code.mythtv.org/trac/ticket/12395>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list