| Summary: | [Webkit2] Deadlock due to blocking javascript execution in a synchronous callback from webkit2 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Leo Ufimtsev <lufimtse> | ||||||
| Component: | SWT | Assignee: | Leo Ufimtsev <lufimtse> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P2 | CC: | platform-swt-inbox | ||||||
| Version: | 4.8 | ||||||||
| Target Milestone: | 4.8 M6 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=510905 https://git.eclipse.org/r/112522 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=5f801a066f2bfd52d2b48ed6accfe4be88a67ac6 |
||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | 527737 | ||||||||
| Bug Blocks: | 514859, 516838 | ||||||||
| Attachments: |
|
||||||||
|
Description
Leo Ufimtsev
Created attachment 271575 [details]
snippet to reproduce
Using different Function classes still hangs on webkit2. Need to dig deeper into this one. I should also make a junit for this. Multiple functions in a single browser works, but multiple once seem to cause the hang. Created attachment 271576 [details]
Snippet with minimum set of code to reproduce.
The pattern that reproduces the issue seems to be:
Browser b1
b1.settext(..)
new CustomFunction(..)
Browser b2
b2.settext(..)
new CustomFunction2(..) << hang occurs here. In 'execute()', never comes back.
(attaching minimum snippet).
Notes:
- hang only occurs for BrowserFunction registration function, a sole evalute() doesn't trigger it. (But fault could be some javascript syntax).
- hang only occurs if statements are executed in that order, if you first initialize both browsers and then both functions, the issue doesn't occur.
Not quite sure if bug in Webkitgtk or if in SWT logic. Need to investigate further.
After investigation, I found that the deadlock occurred because javascript was being executed from a synchronous callback, which lead to a deadlock. I'll implement relevant logic to prevent this and other such issues in the future. New Gerrit change created: https://git.eclipse.org/r/112522 Gerrit change https://git.eclipse.org/r/112522 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=5f801a066f2bfd52d2b48ed6accfe4be88a67ac6 Verified against master. Fixed. |