none
WsmSvc.dll crashes when trying to retrieve a shell instance using a transfer/get uri soap query RRS feed

  • Question

  • I have a test java application that is submitting soap xml requests to WinRM 2.0 using basic authentication on a Windows 7 machine. I am trying to use the remote shell commands, and I can create a remote shell and I get an XML response with the shell id.

    However, when I try to run a transfer/Get query specifying the returned shell id:
    <?xml version="1.0" encoding="UTF-8"?>
    <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"> 
    <s:Header>   
       <wsa:To>http://tor-dpierre.prod.quest.corp:5985/wsman</wsa:To>
       <wsman:ResourceURI s:mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/windows/shell</wsman:ResourceURI>
       <wsa:ReplyTo>
          <wsa:Address s:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
       </wsa:ReplyTo>
       <wsa:Action s:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</wsa:Action>
       <wsman:MaxEnvelopeSize s:mustUnderstand="true">153600</wsman:MaxEnvelopeSize>
       <wsa:MessageID>uuid:968C6C1D-7FBE-4E24-A160-A3F298ABE0DA</wsa:MessageID>
       <wsman:Locale xml:lang="en-US" s:mustUnderstand="false"/>
       <wsman:SelectorSet>
          <wsman:Selector Name="ShellId">B61360AA-8E7A-4536-B192-AB1AA3DE7E25</wsman:Selector>
        </wsman:SelectorSet>
        <wsman:OperationTimeout>PT60.000S</wsman:OperationTimeout>
    </s:Header>
    <s:Body/>
    </s:Envelope>

    The WinRM service crashes with the following entry in the event log:

    Faulting application name: svchost.exe_WinRM, version: 6.1.7600.16385, time stamp: 0x4a5bc3c1
    Faulting module name: WsmSvc.DLL, version: 6.1.7601.17514, time stamp: 0x4ce7ca4e
    Exception code: 0xc0000005
    Fault offset: 0x000000000015df1c
    Faulting process id: 0x4dc
    Faulting application start time: 0x01cdbe0208e0b5e2
    Faulting application path: C:\Windows\system32\svchost.exe
    Faulting module path: c:\windows\system32\WsmSvc.DLL
    Report Id: 41f80d17-29f7-11e2-9576-d4bed994c4ff

    and my java application crashes with a connection reset:
    [REQUEST_EXCEPTION:]
    java.net.SocketException: Connection reset
            at java.net.SocketInputStream.read(SocketInputStream.java:189)
            at java.net.SocketInputStream.read(SocketInputStream.java:121)
            at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:149)
            at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:110)
            at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:260)
            at org.apache.http.impl.conn.LoggingSessionInputBuffer.readLine(LoggingSessionInputBuffer.java:115)
            at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:98)
            at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252)
            at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:281)
            at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:247)
            at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:219)
            at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:298)
            at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
            at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
            at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
            at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
            at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
            at SoapCommandTest.sendRequest(SoapCommandTest.java:490)
            at SoapCommandTest.runTest(SoapCommandTest.java:441)
            at SoapCommandTest.main(SoapCommandTest.java:588)

    The same requests are successful on WinRM v 1.1 (XP) and WinRM 3.0 (Windows 7).
    Thursday, November 15, 2012 6:17 PM

Answers