Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#108 total jobs = 100, too many jobs total

open
nobody
upnp (66)
5
2013-12-29
2012-04-27
No

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

Related

Bugs: #108

Discussion


  • Anonymous
    2012-10-30

    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
    • devin
      devin
      2013-08-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"

       
  • devin
    devin
    2013-08-28

    and my dlna device cann't be discovered if it appear "too many jos"

     
  • 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:

    Why didn't he submit a patch? If someone does it and test, I can apply.


    [bugs:#108] http://sourceforge.net/p/pupnp/bugs/108/ total jobs =
    100, too many jobs total

    Status: open
    Labels: upnp
    Created: Fri Apr 27, 2012 02:26 PM UTC by Marcelo Roberto Jimenez
    Last Updated: Thu Nov 14, 2013 02:13 PM UTC
    Owner: nobody

    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


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/pupnp/bugs/108/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

    --
    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

  • Why didn't he submit a patch?

    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