Opened 12 years ago

Closed 9 years ago

#4883 closed defect (Unverified)

Duplicates in UPnP backend chooser

Reported by: Nigel Owned by: beirdo
Priority: trivial Milestone: unknown
Component: MythTV - UPnP Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

Network has two UPnP backends, chooser showed the 149.135.128.182 one twice. Happens very rarely, but I finally got a -v upnp,network,file output:

2008-03-07 10:07:50.554 Putting up the UPnP backend chooser
2008-03-07 10:07:50.746 UPnpDeviceDesc::Retrieve( http://149.135.128.182:6544/getDeviceDesc, 1 ) - Requesting Device Description.
2008-03-07 10:07:50.747 getHttp: grabbing: http://149.135.128.182:6544/getDeviceDesc
2008-03-07 10:07:50.761 HttpComms::stateChanged: connecting (2)
2008-03-07 10:07:50.846 HttpComms::stateChanged: sending (3)
2008-03-07 10:07:50.949 HttpComms::stateChanged: reading (4)
2008-03-07 10:07:50.950 Got HTTP response: 200:OK
2008-03-07 10:07:50.950 Keys: accept-ranges,connection,content-length,content-type,date,server
2008-03-07 10:07:50.950 HttpComms::stateChanged: connected (5)
2008-03-07 10:07:50.950 done: 1419 bytes
2008-03-07 10:07:50.961 Got 1419 bytes from url: 'http://149.135.128.182:6544/getDeviceDesc'
2008-03-07 10:07:50.962 <?xml version="1.0" encoding="utf-8"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<URLBase>http://149.135.128.182:6544/</URLBase>
<device>
<deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
<friendlyName>mythtv: MythTV AV Media Server</friendlyName>
<manufacturer>MythTV</manufacturer>
<modelURL>http://www.mythtv.org/</modelURL>
<modelName>MythTV AV Media Server</modelName>
<manufacturerURL>http://www.mythtv.org/</manufacturerURL>
<modelDescription>MythTV AV Media Server</modelDescription>
<modelNumber>0.21.20080114-1</modelNumber>
<serialNumber>15462M</serialNumber>
<presentationURL>/</presentationURL>
<dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.00</dlna:X_DLNADOC>
<UDN>uuid:d187075f-e70f-4568-be3a-76271d5ffe1c</UDN>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
<serviceId>urn:upnp-org:serviceId:CMGR_1-0</serviceId>
<SCPDURL>CMGR_Control/GetServDesc</SCPDURL>
<controlURL>CMGR_Control</controlURL>
<eventSubURL>CMGR_Event</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>
<serviceId>urn:upnp-org:serviceId:CDS_1-0</serviceId>
<SCPDURL>CDS_Control/GetServDesc</SCPDURL>
<controlURL>CDS_Control</controlURL>
<eventSubURL>CDS_Event</eventSubURL>
</service>
</serviceList>
</device>
</root>

2008-03-07 10:07:50.962 UPnpDeviceDesc - Constructor
2008-03-07 10:07:50.963 ProcessServiceList adding service : urn:schemas-upnp-org:service:ConnectionManager:1 : urn:upnp-org:serviceId:CMGR_1-0 :
2008-03-07 10:07:50.963 ProcessServiceList adding service : urn:schemas-upnp-org:service:ContentDirectory:1 : urn:upnp-org:serviceId:CDS_1-0 :
2008-03-07 10:07:50.968 UPnpDeviceDesc::Retrieve( http://149.135.128.182:6544/getDeviceDesc, 1 ) - Requesting Device Description.
2008-03-07 10:07:50.968 getHttp: grabbing: http://149.135.128.182:6544/getDeviceDesc
2008-03-07 10:07:50.978 HttpComms::stateChanged: connecting (2)
2008-03-07 10:07:51.051 HttpComms::stateChanged: sending (3)
2008-03-07 10:07:51.154 HttpComms::stateChanged: reading (4)
2008-03-07 10:07:51.154 Got HTTP response: 200:OK
2008-03-07 10:07:51.154 Keys: accept-ranges,connection,content-length,content-type,date,server
2008-03-07 10:07:51.154 HttpComms::stateChanged: connected (5)
2008-03-07 10:07:51.155 done: 1419 bytes
2008-03-07 10:07:51.165 Got 1419 bytes from url: 'http://149.135.128.182:6544/getDeviceDesc'
2008-03-07 10:07:51.166 <?xml version="1.0" encoding="utf-8"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<URLBase>http://149.135.128.182:6544/</URLBase>
<device>
<deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
<friendlyName>mythtv: MythTV AV Media Server</friendlyName>
<manufacturer>MythTV</manufacturer>
<modelURL>http://www.mythtv.org/</modelURL>
<modelName>MythTV AV Media Server</modelName>
<manufacturerURL>http://www.mythtv.org/</manufacturerURL>
<modelDescription>MythTV AV Media Server</modelDescription>
<modelNumber>0.21.20080114-1</modelNumber>
<serialNumber>15462M</serialNumber>
<presentationURL>/</presentationURL>
<dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.00</dlna:X_DLNADOC>
<UDN>uuid:d187075f-e70f-4568-be3a-76271d5ffe1c</UDN>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
<serviceId>urn:upnp-org:serviceId:CMGR_1-0</serviceId>
<SCPDURL>CMGR_Control/GetServDesc</SCPDURL>
<controlURL>CMGR_Control</controlURL>
<eventSubURL>CMGR_Event</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>
<serviceId>urn:upnp-org:serviceId:CDS_1-0</serviceId>
<SCPDURL>CDS_Control/GetServDesc</SCPDURL>
<controlURL>CDS_Control</controlURL>
<eventSubURL>CDS_Event</eventSubURL>
</service>
</serviceList>
</device>
</root>

2008-03-07 10:07:51.166 UPnpDeviceDesc - Constructor
2008-03-07 10:07:51.166 ProcessServiceList adding service : urn:schemas-upnp-org:service:ConnectionManager:1 : urn:upnp-org:serviceId:CMGR_1-0 :
2008-03-07 10:07:51.166 ProcessServiceList adding service : urn:schemas-upnp-org:service:ContentDirectory:1 : urn:upnp-org:serviceId:CDS_1-0 :
2008-03-07 10:07:51.167 UPnpDeviceDesc::Retrieve( http://149.135.128.77:6544/getDeviceDesc, 1 ) - Requesting Device Description.
2008-03-07 10:07:51.167 getHttp: grabbing: http://149.135.128.77:6544/getDeviceDesc
2008-03-07 10:07:51.178 HttpComms::stateChanged: connecting (2)
2008-03-07 10:07:51.260 HttpComms::stateChanged: sending (3)
2008-03-07 10:07:51.364 HttpComms::stateChanged: reading (4)
2008-03-07 10:07:51.364 Got HTTP response: 200:OK
2008-03-07 10:07:51.364 Keys: accept-ranges,connection,content-length,content-type,date,server
2008-03-07 10:07:51.364 HttpComms::stateChanged: connected (5)
2008-03-07 10:07:51.364 done: 1418 bytes
2008-03-07 10:07:51.375 Got 1418 bytes from url: 'http://149.135.128.77:6544/getDeviceDesc'
2008-03-07 10:07:51.375 <?xml version="1.0" encoding="utf-8"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<URLBase>http://149.135.128.77:6544/</URLBase>
<device>
<deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
<friendlyName>viking: MythTV AV Media Server</friendlyName>
<manufacturer>MythTV</manufacturer>
<modelURL>http://www.mythtv.org/</modelURL>
<modelName>MythTV AV Media Server</modelName>
<manufacturerURL>http://www.mythtv.org/</manufacturerURL>
<modelDescription>MythTV AV Media Server</modelDescription>
<modelNumber>0.21.20080224-1</modelNumber>
<serialNumber>16350M</serialNumber>
<presentationURL>/</presentationURL>
<dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.00</dlna:X_DLNADOC>
<UDN>uuid:2d11d9ba-f6e5-4ccc-9df7-24260a1a5dca</UDN>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
<serviceId>urn:upnp-org:serviceId:CMGR_1-0</serviceId>
<SCPDURL>CMGR_Control/GetServDesc</SCPDURL>
<controlURL>CMGR_Control</controlURL>
<eventSubURL>CMGR_Event</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>
<serviceId>urn:upnp-org:serviceId:CDS_1-0</serviceId>
<SCPDURL>CDS_Control/GetServDesc</SCPDURL>
<controlURL>CDS_Control</controlURL>
<eventSubURL>CDS_Event</eventSubURL>
</service>
</serviceList>
</device>
</root>

2008-03-07 10:07:51.376 UPnpDeviceDesc - Constructor
2008-03-07 10:07:51.376 ProcessServiceList adding service : urn:schemas-upnp-org:service:ConnectionManager:1 : urn:upnp-org:serviceId:CMGR_1-0 :
2008-03-07 10:07:51.376 ProcessServiceList adding service : urn:schemas-upnp-org:service:ContentDirectory:1 : urn:upnp-org:serviceId:CDS_1-0 :

This is barely a bug (I think selecting either of the duplicates gets its details just fine), but it really shouldn't happen

Change History (7)

comment:1 Changed 11 years ago by Dibblah

Status: newassigned

comment:2 Changed 10 years ago by stuartm

Component: upnpMythTV - UPnP

comment:3 Changed 9 years ago by beirdo

Owner: changed from dblain to beirdo

comment:4 Changed 9 years ago by beirdo

Status: assignedinfoneeded

This was two releases ago. Is this still the case now? I don't currently have two backends to check it with, but I can set one up for testing if needed.

comment:5 Changed 9 years ago by Nigel

Last saw it about three months ago. That was with a 23-fixes BE, a trunk BE, and a trunk FE. I wouldn't waste time setting up a second BE especially, though. It isn't easy to reproduce - I one tried for two hours before giving up :-(

comment:6 Changed 9 years ago by beirdo

Status: infoneededassigned

OK. This means it's probably still a possibility, as I don't think much has changed in that part of the UPnP code during that time. I guess I'll leave this open for now, as it can probably use another once over after 0.24 release before totally giving up on it. The code as it stands looks like it shouldn't be allowing this to happen, as it seems to have some de-duplication code in there, but if we choose to chase it down, we could instrument it with a pile of logging.

But not right now. :)

comment:7 Changed 9 years ago by beirdo

Resolution: Unverified
Status: assignedclosed

I went to read through the code again... in libs/libmyth/backendselect.cpp, BackendSelection::Init(), it seems to be creating a local QMap that should de-dupe by USN (and thus by backend). I don't see how it would be possible for the duplicates to happen. I'm going to close this, and if it persists/comes back, reopen, and we'll put a pile of logging in there to catch how it's doing this. It seems like this is a rathole that will just use up time for little gain. :)

Note: See TracTickets for help on using tickets.