CloseSession throws NullReferenceException


  • Hi,

    I am working a service running on HPC 2016 Update 1.

    From client node, I am able to submit task and task finished. But task stayed on running state. Checking the event log, I can see there is null reference exception. 

    Further investigating, I found the null reference exception is raised in CloseSession. The stack trace is:

       at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
       at Microsoft.Hpc.Scheduler.Session.V3Session.CloseSession(String headNode, Int32 sessionId, Binding binding, Boolean isAadUser)
       at Microsoft.Hpc.Scheduler.Session.Session.CloseSession(String headnode, Int32 sessionId, Boolean isAadUser)

       at user code to call CloseSession.

    The exception source is: Microsoft.Threading.Tasks.

    Microsoft.Threading.Tasks version is

    HPC SDK version 5.1.6124.

    May I get some suggestions? Thanks.

    Mittwoch, 10. Oktober 2018 19:31

Alle Antworten

  • Hi,

    What binding are you used in you SOA service? Which version of .net framework you are using?


    Donnerstag, 11. Oktober 2018 02:27
  • <system.serviceModel>
            <binding name="myBinding"
              <security mode="Transport" />
              <readerQuotas maxStringContentLength="65536" />
            <!--binding used by broker's backend-->
            <binding name="Microsoft.Hpc.BackEndBinding" maxConnections="1000">
              <!--for non domain joined compute nodes, the security mode should be None-->
              <security mode="Transport">
                <transport clientCredentialType="Windows" protectionLevel="None"/>

    netTcpBinding is what we used for HPC 2008 and HPC 2012. BackEndBinding is what I added for HPC 2016 (I have to add them for some HPC regression).

    Our code is compiled in VS 2010. The target framework is .NET Framework4.

    Donnerstag, 11. Oktober 2018 14:17
  • Hi,

    We can not locally reproduce this issue. Could you add following xml to your app.config, and provide us the log produced?

    	<trace autoflush="true" useGlobalLock="false">
    			<remove name="Default" />
    			<add name="xmlt" />
    		<add name="xmlt" type="System.Diagnostics.XmlWriterTraceListener" initializeData= "c:\TEMP\trace.svclog" />
    		<add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData= "c:\TEMP\session.svclog" />
    		<add name="xmls" type="System.Diagnostics.XmlWriterTraceListener" initializeData= "c:\TEMP\hpcsoa.svclog" />
    		<source name="SOA Session API" switchValue="All">
    				<remove name="Default" />
    				<add name="xml"/>
    		<source name="HpcSoa" switchValue="All">
    				<remove name="Default" />
    				<add name="xmls" />



    Freitag, 12. Oktober 2018 04:06