JDK-8164076 : [Windows] JavaFX crash in WebPage.twkOpen in 8u112 when closing WebView while debugging
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8u112,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_7
  • CPU: x86
  • Submitted: 2016-08-16
  • Updated: 2016-09-06
  • Resolved: 2016-09-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u112Fixed 9Fixed
Related Reports
Relates :  
Description
To verify the issue https://bugs.openjdk.java.net/browse/JDK-8163252,
we download  Java 8u112 (b04) from https://jdk8.java.net/download.html,
and execute it.

However,  I found that this JavaSE8u112-ea b02 Windows-x86 JVM crashed when executing WebPage.twkOpen of JavaFx.
Refer to attached hs_err_pid12584.log for detail of the crash.

This crash will occur neither in SE8u92 nor SE8u102.

This crash can be reproduce with following steps.

Attached DebuggerCrash.java  is a test case to reproduce:
1) it requires jetty and javax.servlet-api in the classpath (attached)
2) it require you to run the test case, then attach the Chrome Browser debugger to the vm by putting this url in Chromel:
chrome-devtools://devtools/bundled/inspector.html?ws=localhost:9222/devtools/page/1
3) Right click the page and press reload, the vm will crash every time for me and another PCs we've tested on . The same steps in Java 8 U92 have never crashed.

.

Comments
This was a similar mistake to the one that caused the webrev to be uploaded in to the wrong directory. There is no relation between this bug and JDK-8164960. I filed a new bug to fix the comments: JDK-8165508
06-09-2016

UR SQE OK to take the fix to PSU16_04, but we need rid off the comments on unrelated bug in the patch. Kevin to file the bug.
06-09-2016

Why the patch above contains references on JDK-8164960 in comments?
05-09-2016

Patch with Correct JBS ID : http://cr.openjdk.java.net/~ghb/8164076/webrev.00/ Sorry for uploading my earlier webrev with wrong JBS ID (Even though the fix intend to address current defect).
04-09-2016

Could you also back port this fix done in jdk9 into jdk8u112 official release?
02-09-2016

Changeset: 4c69a8f5bbe9 Author: ghb Date: 2016-09-02 01:20 +0530 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/4c69a8f5bbe9
01-09-2016

looks good.. +1
01-09-2016

Looks fine. +1
01-09-2016

Webrev : http://cr.openjdk.java.net/~ghb/8164960/webrev.00/ RC : ScriptState (ExecState) Null pointer deference at discardInjectedScriptsFor WebInjectedScriptManager::discardInjectedScriptsFor and InjectedScript::releaseObjectGroup trying to release an already destroyed ScriptObject (m_injectedScriptObject). Fix : Same crash was fixed (Speculatively) at https://bugs.webkit.org/show_bug.cgi?id=144636 which didn't had re-producer. Extended the similar logic for WebInjectedScriptManager and InjectedScript. Native call stack using Debug build. C [jfxwebkit.dll+0x318708] JSC::Register::jsValue+0x28 C [jfxwebkit.dll+0x31897d] JSC::Register::object+0x2d C [jfxwebkit.dll+0x31782a] JSC::ExecState::callee+0x3a C [jfxwebkit.dll+0x4b9ea8] JSC::ExecState::lexicalGlobalObject+0x28 C [jfxwebkit.dll+0x5c0a28] WebCore::domWindowFromExecState+0x28 C [jfxwebkit.dll+0x105cbd5] WebCore::WebInjectedScriptManager::discardInjectedScriptsFor+0xe5 C [jfxwebkit.dll+0x105a7c3] WebCore::WebConsoleAgent::frameWindowDiscarded+0xe3 C [jfxwebkit.dll+0xfaa799] WebCore::InspectorInstrumentation::frameWindowDiscardedImpl+0x49 C [jfxwebkit.dll+0x10dac59] WebCore::InspectorInstrumentation::frameWindowDiscarded+0x49 C [jfxwebkit.dll+0x10b92cc] WebCore::FrameLoader::clear+0x14c C [jfxwebkit.dll+0x109d753] WebCore::DocumentWriter::begin+0x253 C [jfxwebkit.dll+0x107a703] WebCore::DocumentLoader::commitData+0x83 C [jfxwebkit.dll+0x1e7c5f4] WebCore::FrameLoaderClientJava::committedLoad+0x44 C [jfxwebkit.dll+0x107b3ea] WebCore::DocumentLoader::commitLoad+0x10a C [jfxwebkit.dll+0x107ce61] WebCore::DocumentLoader::dataReceived+0x1f1 C [jfxwebkit.dll+0x11b0cb7] WebCore::CachedRawResource::notifyClientsDataWasReceived+0xa7 C [jfxwebkit.dll+0x11afe7b] WebCore::CachedRawResource::addDataBuffer+0xbb C [jfxwebkit.dll+0x1131197] WebCore::SubresourceLoader::didReceiveDataOrBuffer+0x207 C [jfxwebkit.dll+0x11306ac] WebCore::SubresourceLoader::didReceiveData+0x6c C [jfxwebkit.dll+0x1128354] WebCore::ResourceLoader::didReceiveData+0x64 C [jfxwebkit.dll+0x1ef5d4e] WebCore::URLLoader::AsynchronousTarget::didReceiveData+0x6e C [jfxwebkit.dll+0x1ef6665] Java_com_sun_webkit_network_URLLoader_twkDidReceiveData+0xa5 External library and application (Chrome / Firefox) dependency to have regression test. Tested on Windows , OS X (Didn't had any crash without this fix)
31-08-2016

Guru, please check above Comments from Guixin
31-08-2016

The error that you reported doesn't make much sense to us, but we removed the Lambda that could be causing the AbstractMethodError and replaced it with a regular WebSocketCreator implementation which might help reproduce the crash, this change is uploaded into DebuggerCrash2.java. The test environment is as below: 1) WIndows 7 Enterprise Service Pack 1 (64 bit) 2) 64 bit processor 3) Chrome 52.0.2743.116 m 4) 1.8.0_112-ea, Java HotSpot(TM) 64-Bit Server VM Could you check this WebPage.twkOpen crash issue by utilizing the attached DebuggerCrash2.java test?
29-08-2016

Could not re-produce the crash even with 8u112 b04. Please provide the correct dependency library and steps to re-produce the crash.
19-08-2016

Test results are same with b07 vs b04 (One from downloaded at https://jdk8.java.net/download.html) D:\ws\tac\dtest\psu>java -DproxyHost=www-proxy.idc.oracle.com -DproxyPort=80 -cp "repro\javax.servlet-api-3.1.0.jar;repro\jetty-all-compact3-9.3.6.v20151106.jar;." DebuggerCrash Paste this url into chrome:chrome-devtools://devtools/bundled/inspector.html?ws=localhost:9222/devtools/page/1 2016-08-19 15:47:32.405:INFO::JavaFX Application Thread: Logging initialized @1354ms 2016-08-19 15:47:32.538:INFO:oejs.Server:JavaFX Application Thread: jetty-9.3.6.v20151106 2016-08-19 15:47:32.670:INFO:oejsh.ContextHandler:JavaFX Application Thread: Started o.e.j.s.ServletContextHandler@57481d41{/,null,AVAILABLE} 2016-08-19 15:47:32.898:INFO:oejs.ServerConnector:JavaFX Application Thread: Started ServerConnector@7713f1f2{HTTP/1.1,[http/1.1]}{0.0.0.0:9222} 2016-08-19 15:47:32.899:INFO:oejs.Server:JavaFX Application Thread: Started @1849ms 2016-08-19 15:47:45.854:WARN:oejs.ServletHandler:qtp491812058-24: Error for /devtools/page/1 java.lang.AbstractMethodError: DebuggerCrash$FxWebBrowserDebugServer$DevToolsWebSocketServlet$$Lambda$188/932547547.createWebSocket(Lorg/eclipse/jetty/websocket/servlet/ServletUpgradeRequest;Lorg/eclipse/jetty/websocket/servlet/ServletUpgradeResponse;)Ljava/la ng/Object; at org.eclipse.jetty.websocket.server.WebSocketServerFactory.acceptWebSocket(WebSocketServerFactory.java:171) at org.eclipse.jetty.websocket.server.WebSocketServerFactory.acceptWebSocket(WebSocketServerFactory.java:156) at org.eclipse.jetty.websocket.servlet.WebSocketServlet.service(WebSocketServlet.java:155) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:821) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1158) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1090) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119) at org.eclipse.jetty.server.Server.handle(Server.java:517) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572) at java.lang.Thread.run(Thread.java:745) D:\ws\tac\dtest\psu>java -version java version "1.8.0_112-ea" Java(TM) SE Runtime Environment (build 1.8.0_112-ea-b04) Java HotSpot(TM) 64-Bit Server VM (build 25.112-b04, mixed mode) Q1 : Did you re-produce the crash ? (If yes, is it always / intermittent)
19-08-2016

Your above test utilized JavaSE8u112 b07. The JavaSE8u112 b07 is not yet publicly available on the early access site. One of our customers utilizes JavaSE8u112 bo4 JVM to reproduce this crash issue. Please try to utilize bo4 JVM to reproduce this issue.
19-08-2016

Guixin, please update the bug with requested info and re-open
18-08-2016

[~gucheng] with "JDK : build 1.8.0_112-b07" & java -DproxyHost=www-proxy.idc.oracle.com -DproxyPort=80 -cp "repro\javax.servlet-api-3.1.0.jar;repro\jetty-all-compact3-9.3.6.v20151106.jar;." DebuggerCrash (Jars attached in JBS) i am seeing only Exceptions (not the crash) D:\ws\tac\dtest\psu>java -DproxyHost=www-proxy.idc.oracle.com -DproxyPort=80 -cp "repro\javax.servlet-api-3.1.0.jar;repro\jetty-all-compact3-9.3.6.v20151106.jar;." DebuggerCrash Paste this url into chrome:chrome-devtools://devtools/bundled/inspector.html?ws=localhost:9222/devtools/page/1 2016-08-17 11:28:09.373:INFO::JavaFX Application Thread: Logging initialized @1205ms 2016-08-17 11:28:09.490:INFO:oejs.Server:JavaFX Application Thread: jetty-9.3.6.v20151106 2016-08-17 11:28:09.604:INFO:oejsh.ContextHandler:JavaFX Application Thread: Started o.e.j.s.ServletContextHandler@545ae26b{/,null,AVAILABLE} 2016-08-17 11:28:09.788:INFO:oejs.ServerConnector:JavaFX Application Thread: Started ServerConnector@41e36f3e{HTTP/1.1,[http/1.1]}{0.0.0.0:9222} 2016-08-17 11:28:09.790:INFO:oejs.Server:JavaFX Application Thread: Started @1621ms 2016-08-17 11:28:25.894:WARN:oejs.ServletHandler:qtp2132295926-25: Error for /devtools/page/1 java.lang.AbstractMethodError: DebuggerCrash$FxWebBrowserDebugServer$DevToolsWebSocketServlet$$Lambda$188/2101408366.createWebSocket(Lorg/eclipse/jetty/websocket/servlet/ServletUpgradeRequest; ang/Object; at org.eclipse.jetty.websocket.server.WebSocketServerFactory.acceptWebSocket(WebSocketServerFactory.java:171) at org.eclipse.jetty.websocket.server.WebSocketServerFactory.acceptWebSocket(WebSocketServerFactory.java:156) at org.eclipse.jetty.websocket.servlet.WebSocketServlet.service(WebSocketServlet.java:155) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:821) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1158) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1090) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119) at org.eclipse.jetty.server.Server.handle(Server.java:517) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572) at java.lang.Thread.run(Thread.java:745) 2016-08-17 11:28:49.875:WARN:oejs.ServletHandler:qtp2132295926-23: Error for /devtools/page/1 Please confirm occurrence of crash (Always / some times). I am not seeing a crash with the steps mentioned in the description and getting an exception which is not from our component (Javafx).
17-08-2016

I previously attached the wrong file for jetty, I incorrectly attached the "signature file" instead of the jar file itself. I have just attached the correct one.
17-08-2016