Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » AuT crash after SocketException: "Successful WSAStartup not yet performed"
AuT crash after SocketException: "Successful WSAStartup not yet performed" [message #1794607] Mon, 03 September 2018 16:39 Go to next message
Jens Lidestrom is currently offline Jens LidestromFriend
Messages: 8
Registered: April 2017
Location: Göteborg, Sweden
Junior Member
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)

Re: AuT crash after SocketException: "Successful WSAStartup not yet performed" [message #1794719 is a reply to message #1794607] Wed, 05 September 2018 12:36 Go to previous message
Jens Lidestrom is currently offline Jens LidestromFriend
Messages: 8
Registered: April 2017
Location: Göteborg, Sweden
Junior Member
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.
Previous Topic:How to wait until an upgrade is done.
Next Topic:Some pop ups dialog are recorded but still can't be replayed by rcptt
Goto Forum:
  


Current Time: Fri Sep 21 11:28:41 GMT 2018

Powered by FUDForum. Page generated in 0.01562 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top