Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE & Edge crash with "Permission denied" on the contents() for <frame /> test #4441

Closed
mgol opened this issue Jul 29, 2019 · 10 comments · Fixed by #4471, jquery/sizzle#459 or #4512
Closed

IE & Edge crash with "Permission denied" on the contents() for <frame /> test #4441

mgol opened this issue Jul 29, 2019 · 10 comments · Fixed by #4471, jquery/sizzle#459 or #4512

Comments

@mgol
Copy link
Member

@mgol mgol commented Jul 29, 2019

Description

IE 11 as well as Edge (even 17-18) often crash on the traversing: contents() for <frame /> test with the "Permission denied" error. IE crashes way often than Edge. This is probably related to my Sizzle removal PR (#4395) but I wasn't able to pinpoint the exact reason so far. The error points to line 174 in src/selector.js. An example failing run: http://swarm.jquery.org/result/3337866.

It's hard to debug as it's clearly a race condition. If I run this test in isolation, it always passes.

I think I've seen a similar failure on the 3.4-stable branch as well but it was happening way less often.

We should figure this out before the 4.0.0 release.

Link to test case

N/A, it's a core test already in the repo.

@mgol
Copy link
Member Author

@mgol mgol commented Aug 5, 2019

Unfortunately, while in the vast majority of cases the test case fails in IE, when you run that particular test in isolation it almost never fails. This makes debugging tricky.

@mgol mgol changed the title IE & Edge often crash on the contents() for <frame /> test IE & Edge crash with "Permission denied" on the contents() for <frame /> test Aug 5, 2019
@mgol
Copy link
Member Author

@mgol mgol commented Aug 12, 2019

Some conclusions from my investigation:

  1. The error is triggered by this line:
    var contents = container.find( "#test-frame" ).contents();
  2. This is not the only test failing with "Permission denied". I initially thought this one failure triggers more of them sometimes but commenting out that one test results in frequent failures in some other tests, e.g. the traversing: sort direction test. The stack trace doesn't point to anything that could help.

@mgol
Copy link
Member Author

@mgol mgol commented Aug 26, 2019

I found the cuplrit. IE/Edge sometimes crash when comparing documents between frames... but only if one of the strict equality operators (=== or !==) is used. Shallow equivalents (== or !=) work fine... PR incoming.

This means the issue might as well exist on 3.x as well, maybe it just triggers the condition less often. I'm changing the milestone to 3.4.2 & I'll submit a PR to Sizzle as well.

@mgol mgol removed this from the 4.0.0 milestone Aug 26, 2019
@mgol mgol added this to the 3.4.2 milestone Aug 26, 2019
mgol added a commit to mgol/jquery that referenced this issue Aug 26, 2019
…crashes

IE/Edge sometimes crash when comparing documents between frames using the strict
equality operator (`===` & `!==`). Funnily enough, shallow comparisons
(`==` & `!=`) work without crashing.

Fixes jquerygh-4441
@mgol
Copy link
Member Author

@mgol mgol commented Aug 26, 2019

jQuery PR (for jQuery 4.0): #4471.

mgol added a commit to mgol/jquery that referenced this issue Aug 26, 2019
…crashes

IE/Edge sometimes crash when comparing documents between frames using the strict
equality operator (`===` & `!==`). Funnily enough, shallow comparisons
(`==` & `!=`) work without crashing.

Fixes jquerygh-4441
@mgol
Copy link
Member Author

@mgol mgol commented Aug 26, 2019

Note to self: reopen issue after landing #4471 so that a Sizzle PR also lands.

mgol added a commit to mgol/jquery that referenced this issue Aug 26, 2019
…crashes

IE/Edge sometimes crash when comparing documents between frames using the strict
equality operator (`===` & `!==`). Funnily enough, shallow comparisons
(`==` & `!=`) work without crashing.

Fixes jquerygh-4441
mgol added a commit to mgol/jquery that referenced this issue Aug 30, 2019
…crashes

IE/Edge sometimes crash when comparing documents between frames using the strict
equality operator (`===` & `!==`). Funnily enough, shallow comparisons
(`==` & `!=`) work without crashing.

Fixes jquerygh-4441
mgol added a commit to mgol/jquery that referenced this issue Aug 30, 2019
…crashes

IE/Edge sometimes crash when comparing documents between frames using the strict
equality operator (`===` & `!==`). Funnily enough, shallow comparisons
(`==` & `!=`) work without crashing.

Fixes jquerygh-4441
mgol added a commit that referenced this issue Sep 24, 2019
IE/Edge sometimes crash when comparing documents between frames using the strict
equality operator (`===` & `!==`). Funnily enough, shallow comparisons
(`==` & `!=`) work without crashing.

Fixes gh-4441
Closes gh-4471
@mgol
Copy link
Member Author

@mgol mgol commented Sep 24, 2019

Reopening as we still need to land a fix in Sizzle & then update Sizzle on the 3.4-stable 3.x-stable branch.

@mgol mgol reopened this Sep 24, 2019
mgol added a commit to mgol/jquery that referenced this issue Sep 24, 2019
IE/Edge sometimes crash when comparing documents between frames using the strict
equality operator (`===` & `!==`). Funnily enough, shallow comparisons
(`==` & `!=`) work without crashing.

The change to shallow comparisons in `src/selector.js` was done in jquerygh-4471 but
relevant changes in `src/selector/uniqueSort.js` were missed.

Fixes jquerygh-4441
Closes jquerygh-4471
mgol added a commit to mgol/sizzle that referenced this issue Sep 26, 2019
IE/Edge sometimes crash when comparing documents between frames using the strict
equality operator (`===` & `!==`). Funnily enough, shallow comparisons
(`==` & `!=`) work without crashing.

Fixes jquery/jquery#4441
Closes jquery/jquery#4471
@mgol
Copy link
Member Author

@mgol mgol commented Sep 26, 2019

Sizzle PR: jquery/sizzle#459.

mgol added a commit to mgol/sizzle that referenced this issue Sep 30, 2019
IE/Edge sometimes crash when comparing documents between frames using the strict
equality operator (`===` & `!==`). Funnily enough, shallow comparisons
(`==` & `!=`) work without crashing.

Fixes jquery/jquery#4441
Closes jquery/jquery#4471
mgol added a commit to mgol/sizzle that referenced this issue Oct 1, 2019
IE/Edge sometimes crash when comparing documents between frames using the strict
equality operator (`===` & `!==`). Funnily enough, shallow comparisons
(`==` & `!=`) work without crashing.

Fixes jquery/jquery#4441
Closes jquery/jquery#4471
@mgol mgol reopened this Oct 1, 2019
@mgol
Copy link
Member Author

@mgol mgol commented Oct 1, 2019

Re-opening as we still need a new Sizzle with the fix for jQuery 3.x. The Sizzle PR: jquery/sizzle#459 has been merged.

mgol added a commit to mgol/jquery that referenced this issue Oct 9, 2019
IE/Edge sometimes crash when comparing documents between frames using the strict
equality operator (`===` & `!==`). Funnily enough, shallow comparisons
(`==` & `!=`) work without crashing.

The change to shallow comparisons in `src/selector.js` was done in jquerygh-4471 but
relevant changes in `src/selector/uniqueSort.js` were missed.

Fixes jquerygh-4441
Closes jquerygh-4471
@mgol
Copy link
Member Author

@mgol mgol commented Oct 10, 2019

Reopening since we still need to update Sizzle in jQuery 3.x.

@mgol mgol reopened this Oct 10, 2019
mgol added a commit to mgol/jquery that referenced this issue Oct 14, 2019
IE/Edge sometimes crash when comparing documents between frames using the strict
equality operator (`===` & `!==`). Funnily enough, shallow comparisons
(`==` & `!=`) work without crashing.

The change to shallow comparisons in `src/selector.js` was done in jquerygh-4471 but
relevant changes in `src/selector/uniqueSort.js` were missed.

Fixes jquerygh-4441
Closes jquerygh-4471
mgol added a commit to mgol/jquery that referenced this issue Oct 14, 2019
IE/Edge sometimes crash when comparing documents between frames using the strict
equality operator (`===` & `!==`). Funnily enough, shallow comparisons
(`==` & `!=`) work without crashing.

The change to shallow comparisons in `src/selector.js` was done in jquerygh-4471 but
relevant changes in `src/selector/uniqueSort.js` were missed. Those changes
have landed in Sizzle in jquery/sizzle#459.

Fixes jquerygh-4441
Closes jquerygh-4471
Ref jquery/sizzle#459
mgol added a commit that referenced this issue Oct 21, 2019
IE/Edge sometimes crash when comparing documents between frames using the strict
equality operator (`===` & `!==`). Funnily enough, shallow comparisons
(`==` & `!=`) work without crashing.

The change to shallow comparisons in `src/selector.js` was done in gh-4471 but
relevant changes in `src/selector/uniqueSort.js` were missed. Those changes
have landed in Sizzle in jquery/sizzle#459.

Fixes gh-4441
Closes gh-4512
Ref gh-4471
Ref jquery/sizzle#459
@mgol mgol reopened this Oct 21, 2019
mgol added a commit to mgol/jquery that referenced this issue Mar 14, 2020
mgol added a commit that referenced this issue Mar 16, 2020
@mgol
Copy link
Member Author

@mgol mgol commented Mar 16, 2020

Sizzle update merged in #4641. The issue is now fixed both on master & on 3.x-stable.

@mgol mgol closed this as completed Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment