Reported by Rafiullah Khan (rafiuk7 at gmail dot com)
Dear sir,
I found your email ID on libupnp forum. I am using libupnp 1.6.16... I created my control point using hints from tv_ctrlpt sample example.
When I run my written control point or sample, tv_ctrlpt in my lab network where also other UPnP devices are attached to network, I get the following error after like 1 or 2 mins.
total jobs = 100, too many jobs total jobs = 100, too many jobstotal jobs = 100, too many jobstotal jobs = 100, too many jobstotal jobs = 100, too many jobstotal jobs = 100, too many jobstotal jobs = 100, too many jobstotal jobs = 100, too many jobstotal jobs = 100, too many jobstotal jobs = 100, too many jobstotal jobs = 100, too many jobstotal jobs = 100, too many jobstotal jobs = 100, too many jobstotal jobs = 100, too many jobstotal jobs = 100, too many jobstotal jobs = 100, too many jobstotal jobs = 100, too ...............- - - - - --- - - - -
I found that the problem occurs at the ssdp events, and may be most probably with ixml_document, that generate a lot of threads.
Can you please help me in this regards.
Thank you so much for your time..
Kind Regards,
Rafiullah Khan
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
As there is a work-a-round for MediaTomb available, I was wondering if this bug is already fixed?
There are something will block by UpnpDownloadXmlDoc() function when libupnp received UPNP_DISCOVERY_ADVERTISEMENT_ALIVE and UPNP_DISCOVERY_SEARCH_RESULT events
Because there are some devices will provide download location to tell the CP where can download their device description or service description, but actually you can't download from it. so tcp connection will take a long time to make sure the connection is fake and release the thread resource in the thread pool.
But those devices are still broadcast events and they will occupy the receive thread pool, so finally the receive thread pool will be overflowed by those jobs.
I think maybe can add timeout mechanism in http_RequestAndResponse() as the follows.
struct timeval timeout;
timeout.tv_sec = 10;
timeout.tv_usec = 0;
tcp_connection = socket((int)destination->hostport.IPaddress.ss_family, SOCK_STREAM, 0);
if (tcp_connection == INVALID_SOCKET) {
parser_response_init(response, req_method);
return UPNP_E_SOCKET_ERROR;
}
if (setsockopt (tcp_connection, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout)) < 0) {
parser_response_init(response, req_method);
return UPNP_E_SOCKET_ERROR;
}
if (setsockopt (tcp_connection, SOL_SOCKET, SO_SNDTIMEO, (char *)&timeout, sizeof(timeout)) < 0) {
parser_response_init(response, req_method);
return UPNP_E_SOCKET_ERROR;
}
regards,
Archer Chang
Is this fix or work-a-round resolves the too many jobs issue?
please let me know if anybody tried it
Last edit: Anonymous 2014-05-26
Hi, I have tested what set socket recv and send timeout in accord with you say, but my dlna render still appear "too many jobs total jobs = 100"
and my dlna device cann't be discovered if it appear "too many jos"
This guy appears to have figured out the issue and come up with a solution back in 2012. Not sure why it has gotten propagated here.
http://blog.aplikacja.info/2012/09/solved-too-many-jobs-case-in-libupnp/
Why didn't he submit a patch? If someone does it and test, I can apply.
Yes, I wondered the same thing.
On 11/18/2013 11:28 AM, Marcelo Roberto Jimenez wrote:
--
Michael Lynch
Software Engineer
HBM Inc.
Tel: +1 217 328-5359, Extension 24
Fax: +1 217 328-6576
Email: mike.lynch@hbm.com
Internet: www.hbm.com
The information in this email is confidential. It is intended solely for
the addressee. If you are not the intended recipient, please let me know
and delete this email.
Related
Bugs: #108
Good question, Marcelo :-)
I failed to apply my patch cleanly on latest libupnp source code (1.6.18), so it was clear to me the issue had been already fixed. It seems it was not the case, though.
Attaching a patch for libupnp 1.6.5, anyway. I hope someone can migrate it to a more recent release.
Last edit: Dariusz Cieslak 2013-12-29