#154 sparql stuff causes long hang when no network connection

open
nobody
None
5
2010-07-13
2010-07-13
Dan Stowell
No

My internet connection was down last night. I was using SV - loaded a file, opted to run an analysis plugin, set some settings, pressed go. Then SV seemed stuck for a few minutes (not showing the usual little analysis-in-progress progress meter), with very low CPU usage (unusual since I expected the plugin to be underway).

When I checked SV's console output it was generating lots of sparql/rdf-related error messages - VERY slowly. Every two or three seconds it would add a line, showing that the sparql stuff was failing to comprehend my router's error messages as RDF (unsurprisingly).

Judging from the console, this happens after my plugin is initialised but before it starts to process.

An excerpt of the console output, starting from the first line after my plugin initialised:

librdf error URI <head> - R
SimpleSPARQLQuery::addSourceToModel: Failed to add source URI "<head>: Failed to parse RDF from URI "<head>"
PluginRDFIndexer::indexConfiguredURLs: url is <title>Thomson Gateway</title>
librdf error URI <title>Thomson Gateway</title> - R
SimpleSPARQLQuery::addSourceToModel: Failed to add source URI " <title>Thomson Gateway</title>: Failed to parse RDF from URI " <title>Thomson Gateway</title>"
PluginRDFIndexer::indexConfiguredURLs: url is <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
librdf error URI <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - R
SimpleSPARQLQuery::addSourceToModel: Failed to add source URI " <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">: Failed to parse RDF from URI " <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">"
PluginRDFIndexer::indexConfiguredURLs: url is <script type="text/javascript">var g_navitem = -1;</script>
librdf error URI <script type="text/javascript">var g_navitem = -1;</script> - R
SimpleSPARQLQuery::addSourceToModel: Failed to add source URI " <script type="text/javascript">var g_navitem = -1;</script>: Failed to parse RDF from URI " <script type="text/javascript">var g_navitem = -1;</script>"
PluginRDFIndexer::indexConfiguredURLs: url is <script type="text/javascript"> var g_focus = -1;</script>
librdf error URI <script type="text/javascript"> var g_focus = -1;</script> - R
SimpleSPARQLQuery::addSourceToModel: Failed to add source URI " <script type="text/javascript"> var g_focus = -1;</script>: Failed to parse RDF from URI " <script type="text/javascript"> var g_focus = -1;</script>"
PluginRDFIndexer::indexConfiguredURLs: url is <script type='text/javascript' src='/cgi/b/ic/util.js'></script>
librdf error URI <script type='text/javascript' src='/cgi/b/ic/util.js'></script> - R
SimpleSPARQLQuery::addSourceToModel: Failed to add source URI " <script type='text/javascript' src='/cgi/b/ic/util.js'></script>: Failed to parse RDF from URI " <script type='text/javascript' src='/cgi/b/ic/util.js'></script>"
PluginRDFIndexer::indexConfiguredURLs: url is <link rel="stylesheet" type="text/css" href="/styles.css">
librdf error URI <link rel="stylesheet" type="text/css" href="/styles.css"> - R
SimpleSPARQLQuery::addSourceToModel: Failed to add source URI " <link rel="stylesheet" type="text/css" href="/styles.css">: Failed to parse RDF from URI " <link rel="stylesheet" type="text/css" href="/styles.css">"
PluginRDFIndexer::indexConfiguredURLs: url is </head>
librdf error URI </head> - R
SimpleSPARQLQuery::addSourceToModel: Failed to add source URI "</head>: Failed to parse RDF from URI "</head>"

After literally about 7 or 8 minutes it gave up with

PluginRDFDescription: WARNING: No RDF description available for plugin ID "vamp:vamp-birdseg1:dans_birdseg1"

and then finally ran the actual plugin processing.

Discussion

  • Dan Stowell
    Dan Stowell
    2010-07-14

    OK, I can confirm that the root cause is that my router doesn't give 404 headers when it can't connect to the internet.

    So there's basically no way SV can tell from the headers that it's being forwarded to an error page rather than to some actual sparql. Here's the headers I get (when I unplug the router from the phone line), for the first page and then the redirected page (I've censored the url a bit):

    HTTP/1.1 302 Found
    Location: http://dsldevice.lan/cgi..........
    Content-Length: 0
    Connection: close

    HTTP/1.0 200 OK
    Cache-Control: no-cache
    Expires: -1
    Content-Type: text/html

     
  • Chris Cannam
    Chris Cannam
    2010-07-14

    Thanks for the info... What about the delay -- is it the router taking a long time to come back with that page?

    Either way, I'm not sure SV needs to wait at this point so there's certainly something to investigate.

     
  • Dan Stowell
    Dan Stowell
    2010-07-14

    Yes, it takes a few seconds for the second page to appear. (A few seconds, not a few minutes; but I guess the many-minute hang in the OP is because multiple http requests are being sent out.)