AuT crash after SocketException: "Successful WSAStartup not yet performed" [message #1794607] |
Mon, 03 September 2018 12:39  |
Eclipse User |
|
|
|
I have a problem where my RCP application crashes when I run in RCPTT. It doesn't crash when run outside of RCPTT, which makes me suspect that it is an error in RCPTT or my configuration of RCPTT.
The crash happens after a while, ca 1 min, of successful execution, not always at the same point in the test script. Sometimes the test succeeds, but more often it fails because of a crash.
RCPTT reports the following in the Execution View:
Failed to close report node
Connection reset
Couldn't open ECL session
Before the crash I get really many log printouts in my application-under-test. Maybe 100 each second. They contain the following messages:
* java.net.SocketException: Successful WSAStartup not yet performed
* java.net.SocketException: socket closed
In the RCPTT log I get messages about the following errors at the same time:
* java.net.SocketException: Connection reset by peer: socket write error
* java.net.ConnectException: Connection refused: connect
What could be causing this? How can I fix it?
I attach the RCPTT and AuT logs, and my test project.
== Test options that I use ==
-testOptions jobTreatAsSleepingTimeout=600000;eclExecutionDelay=200;jobHangTimeout=600000
== Software versions ==
OS: Windows 10 64 bit
RCPTT: 2.2.0 64 bit
JRE for RCPTT: 1.8.0_181 64 bit
JRE for AuT: 1.8.0_101 32 bit
Eclipse version for AuT: 4.5.2.v20160212-1500
== Relevant log printouts (abbreviated, full logs are given as attached files) ==
AuT log:
!ENTRY org.eclipse.rcptt.tesla.core 4 0 2018-09-03 17:37:19.957
!MESSAGE Successful WSAStartup not yet performed: configureBlocking
!STACK 0
java.net.SocketException: Successful WSAStartup not yet performed: configureBlocking
...
at java.net.ServerSocket.accept(ServerSocket.java:513)
at org.eclipse.rcptt.tesla.core.server.TeslaNetworkServer.run(TeslaNetworkServer.java:52)
!ENTRY org.eclipse.rcptt.ecl.core 4 0 2018-09-03 17:37:19.959
!MESSAGE Failed to accept connection
!STACK 0
java.net.SocketException: socket closed
...
at java.net.ServerSocket.accept(ServerSocket.java:513)
at org.eclipse.rcptt.ecl.server.tcp.EclTcpServer.run(EclTcpServer.java:42)
RCPTT log:
!ENTRY org.eclipse.rcptt.launching 4 0 2018-09-03 17:37:19.958
!MESSAGE error getting interpreter state
!SUBENTRY 1 org.eclipse.rcptt.ecl.core 4 0 2018-09-03 17:37:19.958
!MESSAGE Failed to write org.eclipse.rcptt.ecl.core.impl.SaveStateImpl@7a98d44a (host: null)
!STACK 0
java.net.SocketException: Connection reset by peer: socket write error
...
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.DataOutputStream.writeByte(Unknown Source)
at org.eclipse.rcptt.ecl.internal.core.EMFStreamPipe.write(EMFStreamPipe.java:145)
at org.eclipse.rcptt.ecl.client.tcp.EclTcpSession$1.run(EclTcpSession.java:97)
at java.lang.Thread.run(Unknown Source)
!ENTRY org.eclipse.rcptt.launching 4 0 2018-09-03 17:37:21.974
!MESSAGE Couldn't open ECL session
!STACK 0
java.net.ConnectException: Connection refused: connect
...
at java.net.Socket.connect(Unknown Source)
at org.eclipse.rcptt.ecl.client.tcp.EclTcpSession.initSocket(EclTcpSession.java:146)
at org.eclipse.rcptt.ecl.client.tcp.EclTcpSession.<init>(EclTcpSession.java:78)
at org.eclipse.rcptt.ecl.client.tcp.EclTcpClientManager.startClientSession(EclTcpClientManager.java:26)
at org.eclipse.rcptt.internal.launching.aut.BaseAutLaunch.createEclSession(BaseAutLaunch.java:975)
Attachment: .log
(Size: 6.87KB, Downloaded 133 times)
Attachment: console.log
(Size: 259.00KB, Downloaded 146 times)
Attachment: SDK_Explorer_Tests.zip
(Size: 5.26KB, Downloaded 195 times)
|
|
|
Re: AuT crash after SocketException: "Successful WSAStartup not yet performed" [message #1794719 is a reply to message #1794607] |
Wed, 05 September 2018 08:36  |
Eclipse User |
|
|
|
Haha! I seem to have found it!
The problem was that my AuT uses some native code, which seems to do one-to-many calls to the Windows function WSACleanup. The calls to WSAStartup and WSACleanup are always supposed to match 1-to-1. But when the native code called WSACleanup one extra time, then the entire Windows socket component shut down, which closed the socket that RCPTT was using, and made it impossible to reconnect.
On the other hand, RCPTT reacted poorly when it was unable to reconnect. I didn't even think it was possible to create 100-1000 log entries per section!
RCPTT should be updated to do something more sensible in this situation.
|
|
|
Powered by
FUDForum. Page generated in 0.07937 seconds