Modify

Opened 7 years ago

Closed 7 years ago

Last modified 3 years ago

#7067 closed defect (fixed)

[x86] luci scanning wireless networks produces an error

Reported by: flux Owned by: jow
Priority: normal Milestone: Backfire 10.03.1
Component: luci Version: Backfire 10.03 RC3
Keywords: Cc:

Description

Network->Wifi->Scan

XML Parsing Error: no element found
Location: http://192.168.0.1/cgi-bin/luci/;stok=ed3695f3c4a5487195e2c5dfa33de688/admin/network/wireless
Line Number 310, Column 1:

the same error appears when changing some settings of the wifi interface and then 'save and apply'

Attachments (0)

Change History (12)

comment:1 follow-up: Changed 7 years ago by jow

Please attach the source of the broken page and your wireless configuration.

comment:2 in reply to: ↑ 1 Changed 7 years ago by anonymous

Replying to jow:

Please attach the source of the broken page and your wireless configuration.

sorry cannot reproduce the problem : )
I have rebooted several times in between. Maybe this helped

comment:3 follow-up: Changed 7 years ago by jow

  • Resolution set to worksforme
  • Status changed from new to closed

Okay, I did some more testing here, also with weird SSID (thought it might be encoding related) but could not provoke a crash. Please reopen if you see it again.

comment:4 in reply to: ↑ 3 Changed 7 years ago by flux

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Replying to jow:

Okay, I did some more testing here, also with weird SSID (thought it might be encoding related) but could not provoke a crash. Please reopen if you see it again.

Hi jow,

OK, now I have it again. Seems like it is somehow related to timeouts. Now I simply trying to display the list of all available packages (System->Software) and I get this as a resulting page

Cannot post it because everything marked as spam then

but if I add some filter like luci so only luci related packages are shown then it works as usual. I still don't know how can I force this behavior. To let the router work for a couple hours maybe?

comment:5 Changed 7 years ago by flux

XML Parsing Error: no element found
Location: http://alix/cgi-bin/luci/;stok=6bd8fb38ec0794d9c7e3c54b501a8c41/admin/system/packages
Line Number 7516, Column 34:					[td style="text-align:left"]
--------------------------------------------------------------------^

I replaced tag open-close symbols with brackets to let it go through the spam filter

comment:6 Changed 7 years ago by ledwards@…

I am experiencing a similar problem. It does appear to have something to do with timing, as I don't receive an error when I am connected directly to the lan. I only receive the errors when I am connected to the router via wireless... and the errors seem to only occur when a strenuous task is requested (where the request may take longer to respond), such as scanning for wireless networks or displaying the available software packages.

It looks like LuCI is crashing halfway through displaying the page. When I view the page source in the web browser, I only get half the page (until the line where the error occurs). The error I receive in my web browser (Firefox) is an XML parsing error or related error... because the page was cut off halfway and the XML/HTML tokens may not have closing brackets, etc.

I can post my browser error and page source if it will help.

comment:7 follow-up: Changed 7 years ago by anonymous

Can you try this patch?

Index: package/uhttpd/src/uhttpd-utils.c
===================================================================
--- package/uhttpd/src/uhttpd-utils.c	(revision 20527)
+++ package/uhttpd/src/uhttpd-utils.c	(working copy)
@@ -116,7 +116,7 @@
 	FD_ZERO(&writer);
 	FD_SET(cl->socket, &writer);
 
-	timeout.tv_sec = 0;
+	timeout.tv_sec = 1;
 	timeout.tv_usec = 500000;
 
 	if( select(cl->socket + 1, NULL, &writer, NULL, &timeout) > 0 )

comment:8 Changed 7 years ago by thepeople

  • Owner set to jow
  • Status changed from reopened to assigned

comment:9 in reply to: ↑ 7 Changed 7 years ago by ledwards@…

I tried the patch above and it appears to help, but it does not completely resolve the issue. It works some of the time, but I can still generate the error:

XML Parsing Error: unclosed token
Location: http://192.168.3.1/cgi-bin/luci/;stok=11b4317b9914aed9caa8ac775458332a/admin/network/wireless
Line Number 258, Column 1:<td class="cbi-value-field
^

If the page responds quickly, I will not get the error... if it takes a while to respond, I will get the error. Perhaps increasing timeout.tv_sec = 2 will improve the success rate?

Also note that I am only experiencing this problem when accessing LuCI via a wireless connection, not via a direct lan connection.

comment:10 follow-up: Changed 7 years ago by jow

It can even be higher, the sole purpose of this timeout is to ensure that processes serving hanging connections are terminated to make the server available for further requests.

Can you try with 5 or 10 ?

~ JoW

comment:11 in reply to: ↑ 10 Changed 7 years ago by ledwards@…

Replying to jow:

It can even be higher, the sole purpose of this timeout is to ensure that processes serving hanging connections are terminated to make the server available for further requests.

Can you try with 5 or 10 ?

~ JoW

10 seconds seems to fix the issue for me (I still get the error occasionally with 5 seconds). When I execute a wireless scan, sometimes the result takes nearly 10 seconds. With "timeout.tv_sec = 10" I don't get an error... the status in Firefox displays "Waiting for 192.168.1.1..." for a few seconds and then the scan results are displayed.

comment:12 Changed 7 years ago by jow

  • Resolution set to fixed
  • Status changed from assigned to closed

Should be fixed with r20883

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.