AJAX calls breaks with spdy/3.1

RESOLVED FIXED in mozilla37

Status

()

Core
Networking: HTTP
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: franek, Assigned: mcmanus)

Tracking

({regression})

Trunk
mozilla37
x86_64
Windows 7
regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [spdy])

Attachments

(4 attachments)

(Reporter)

Description

3 years ago
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.

Comment 1

3 years ago
could you attach a self-contained testcase, please. BMO is SSL, so it should be easy.
Flags: needinfo?(franek)
(Reporter)

Comment 2

3 years ago
Created attachment 8538453 [details]
testcase.zip
Flags: needinfo?(franek)
(Reporter)

Comment 3

3 years ago
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.
(Reporter)

Comment 4

3 years ago
I created new test account on some hosting and putted testcase there, it will last 14 days.
https://serwer1412580.home.pl/index.html

Comment 5

3 years ago
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

Comment 6

3 years ago
Created attachment 8539020 [details]
HTTP log

Httplog with set NSPR_LOG_MODULES=timestamp,nsHttp:5,nsSocketTransport:5,nsStreamPump:5,nsHostResolver:5
(Assignee)

Updated

3 years ago
Flags: needinfo?(mcmanus)
Summary: AJAX calls breaks with SSL → AJAX calls breaks with spdy/3.1
Whiteboard: [spdy]
(Assignee)

Comment 7

3 years ago
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)

Comment 8

3 years ago
Created attachment 8540185 [details] [diff] [review]
spdy should not close session on imglib error
Attachment #8540185 - Flags: review?(daniel)
(Assignee)

Updated

3 years ago
Assignee: nobody → mcmanus
Status: NEW → ASSIGNED
(Assignee)

Updated

3 years ago
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
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
(Assignee)

Updated

3 years ago
Depends on: 1119280
You need to log in before you can comment on or make changes to this bug.