Closed Bug 1113065 Opened 9 years ago Closed 9 years ago

AJAX calls breaks with spdy/3.1

Categories

(Core :: Networking: HTTP, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: franek, Assigned: mcmanus)

References

Details

(Keywords: regression, Whiteboard: [spdy])

Attachments

(4 files)

Attached image console.jpg
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
Build ID: 20141125180439

Steps to reproduce:

To reproduce problem you need two things:
simple page with jQuery (any version), on SSL (https)

index.html:
<!DOCTYPE html>
<html>
    <head>
	<title>title</title>
	<meta charset="UTF-8">
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript">
	    $(document).ready(function()
	    {
		$.ajax({
		    async: true,
		    url: "ajax.xml",
		    type: 'GET',
		    dataType: "xml",
		
		    success: function(xmldoc) 
		    {
			var $xml = $( xmldoc ),
			$result = $xml.find("result"),
			$message = $result.attr('message');
			alert($message);
		    }
		});
	    });
	</script>
    </head>
    <body>
	<div style="background-image: url(nonexistent.png)"><a href="index.html">this site</a></div>
    </body>
</html>

And of course simple xml file:
<?xml version="1.0"?> <root><result message="Hello World!"/></root>

Enter this web site and click link few times.


Actual results:

For about 9 times out of 10 when clicking link, ajax.xml will never be loaded. Console shows call, but no response at all and "0ms" loading time.
This happens only on FF (tried on Chrome and IE), only on https sites.
Problem source is non-existing image that ff is trying to load before ajax request is made.


Expected results:

Ajax call should have completed.
could you attach a self-contained testcase, please. BMO is SSL, so it should be easy.
Flags: needinfo?(franek)
Attached file testcase.zip
Flags: needinfo?(franek)
I added the testcase. Btw. sometimes when refreshing, page have identical symptoms.

(In reply to franek from comment #0)
> Created attachment 8538416 [details]
> console.jpg
> 
> User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101
> Firefox/34.0
> Build ID: 20141125180439
> 
> Steps to reproduce:
> 
> To reproduce problem you need two things:
> simple page with jQuery (any version), on SSL (https)
> 
> index.html:
> <!DOCTYPE html>
> <html>
>     <head>
> 	<title>title</title>
> 	<meta charset="UTF-8">
> 	<script type="text/javascript" src="jquery.js"></script>
> 	<script type="text/javascript">
> 	    $(document).ready(function()
> 	    {
> 		$.ajax({
> 		    async: true,
> 		    url: "ajax.xml",
> 		    type: 'GET',
> 		    dataType: "xml",
> 		
> 		    success: function(xmldoc) 
> 		    {
> 			var $xml = $( xmldoc ),
> 			$result = $xml.find("result"),
> 			$message = $result.attr('message');
> 			alert($message);
> 		    }
> 		});
> 	    });
> 	</script>
>     </head>
>     <body>
> 	<div style="background-image: url(nonexistent.png)"><a
> href="index.html">this site</a></div>
>     </body>
> </html>
> 
> And of course simple xml file:
> <?xml version="1.0"?> <root><result message="Hello World!"/></root>
> 
> Enter this web site and click link few times.
> 
> 
> Actual results:
> 
> For about 9 times out of 10 when clicking link, ajax.xml will never be
> loaded. Console shows call, but no response at all and "0ms" loading time.
> This happens only on FF (tried on Chrome and IE), only on https sites.
> Problem source is non-existing image that ff is trying to load before ajax
> request is made.
> 
> 
> Expected results:
> 
> Ajax call should have completed.
I created new test account on some hosting and putted testcase there, it will last 14 days.
https://serwer1412580.home.pl/index.html
STR
1. Crear cache
2. Load https://serwer1412580.home.pl/index.html
   ---- observe message alart and networks
3. Close alart box if any
4. Reload
   ---- observe message alart and networks

Actual Results:
 No alert box and 0byte of xml at step 2

Expexted Results:
 alart box should popos up at step 2 and step 4 both



Regression window
Good:
http://hg.mozilla.org/integration/mozilla-inbound/rev/d110fa56f680
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 ID:20130927105542
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/e39d4f589f10
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 ID:20130927105639
Pushlog: 
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=d110fa56f680&tochange=e39d4f589f10

Suspect: bug 912549

FYI
Setting network.http.spdy.enabled.v3-1 = false seems to fix the problem
Blocks: 912549
Status: UNCONFIRMED → NEW
Component: Untriaged → Networking: HTTP
Ever confirmed: true
Flags: needinfo?(mcmanus)
Keywords: regression
Product: Firefox → Core
Version: 34 Branch → Trunk
Attached file HTTP log
Httplog with set NSPR_LOG_MODULES=timestamp,nsHttp:5,nsSocketTransport:5,nsStreamPump:5,nsHostResolver:5
Flags: needinfo?(mcmanus)
Summary: AJAX calls breaks with SSL → AJAX calls breaks with spdy/3.1
Whiteboard: [spdy]
this is a good bug report, thank you.

The page in question has a css drive image load for nonexistent.png which returns a 404 with a html body. Our image parsing code fails to parse that html and returns an error code that mistakenly terminated the whole session. The ajax code was sometimes outstanding on that session and when it got canceled the dialog failed to appear.

The fix is a more specific error code in the img parsing logic and a more conservative screen for session-ending error codes in the spdy logic.

https://tbpl.mozilla.org/?tree=Try&rev=ae2e73af64f1
Assignee: nobody → mcmanus
Status: NEW → ASSIGNED
Attachment #8540185 - Flags: review?(seth)
Comment on attachment 8540185 [details] [diff] [review]
spdy should not close session on imglib error

Review of attachment 8540185 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM!
Attachment #8540185 - Flags: review?(daniel) → review+
Comment on attachment 8540185 [details] [diff] [review]
spdy should not close session on imglib error

Review of attachment 8540185 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good! (Only reviewed imgRequest.cpp.)
Attachment #8540185 - Flags: review?(seth) → review+
https://hg.mozilla.org/mozilla-central/rev/dc7317efb518
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Depends on: 1119280
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: