none
cminit hangs running Windows 2008 R2 service application RRS feed

  • Question

  • (English content) : Hi,

    I have a "C" x64 application running as Windows 2008 R2 Service with HIS 2010 service pack 4. Everytime program hangs when calling "cminit" function while it runs OK if program started from "line command" or from Visual Studio 2010 debug mode.

    Knowledge base reports several similar cases concerning troubles for old versions but I thought it was solved in latest HIS 2010 version? I tried with local APPC LUs configured as "member of Local APPC LU pool" and and also without this parameter checked. LU Names are 8 characters long.

    Does someone have an idea to solve this problem ?

    Thanks.
    JC

    -------------------------------------------

    (Message en français) : Bonjour,

    J'ai une application servant d'interface SNA HIS 2010, écrite en langage "C" sous Visual Studio 2010 qui fonctionne en x64, mode "service" sous Windows 2008 R2 + HIS 2010 service pack 4.

    En mode "service" le programme bloque sur l'appel à cminit(), fonction SNA alors que tout marche bien en mode debug ou ligne de commande.

    J'ai vu sur différents forum et bases de connaissance que cminit() bloquait sous Windows NT 4 dans certaines conditions mais ce problème a été corrigé depuis. J'ai essayé suivant les différentes remarque de configurer ma LU en tant que membre du groupe local et sans ("member of Local APPC LU pool").

    Quelqu'un a-t-il une expérience similaire ou un moyen de résolution ?
    Ce message concerne HIS 2010, SNA, Windows Server 2008 R2. Je le poste également sur le forum BizTalk.

    Merci d'avance si vous avez des éléments pouvant m'aider à la résolution de mon blocage cminit().

    JC


    Thanks JC

    Monday, September 10, 2012 8:42 AM

Answers

  • Many thanks Stefen for your post including pertinent links.

    I understand new user creation is a must for security issue and I would report it to my company.

    My case is now solved and user creation permits program run as requested.

    Thanks again. I close this case.

    JC


    Thanks JC

    • Marked as answer by jcc_upus Tuesday, September 11, 2012 5:00 PM
    Tuesday, September 11, 2012 4:59 PM

All replies

  • We would likely need to see some traces to actually see what is happening. Are there any events in the Application event log when this occurs?

    When running from Visual Studio, is the program running under a different user context or possibly running as a 32-bit process?

    What user context if the Windows service running under? If running under Local System, try running it under a user account.

    If it works from a command prompt, you could get traces of the command prompt scenario and the failing scenario for comparison.

    The traces we would need to see are as follows:

    1. Run snatrace.exe
    2. Click the Tracing Global Properties tab and enable the "Allow HIS Administrators to perform tracing" option.
    3. Click Apply.
    4. Click the Trace Items tab.
    5. Click SNA Application and then click Properties.
    6. Click Set All on the Internal Trace tab.
    7. Click the Message Trace tab and then click Set All.
    8. Click the API Trace tab and then click Set All.
    9. Minimize the SNA Trace Utility window.
    10. With these traces running, run the command line scenario that works. After that, run the failing scenario.
    11. Once finishing the two test scenarios, restore the SNA Trace Utility window and click Clear All Traces to stop the traces.

    The trace files will be located in the C:\Program Files\Microsoft Host Integration Server 2010\traces (default location).

    You may need to open a support case (with the suggested traces) to get deeper analysis as it is difficult to analyze HIS traces via copy and paste into a forum post.

    Thanks...


    Stephen Jackson - MSFT

    Monday, September 10, 2012 2:13 PM
  • Thanks Stefen for your answer.

    Just before your post I could have success starting program with new user accout.

    Good! But it’s not enough while I think my company security restrictions will not agree this solution.

    Please find more description concerning the problem.

    This program was written long time ago with Visual Studio 6 (eventualy previous version) and old SNA version. Currently we use it with Windows 2003. Program needs updating while we migrate to Windows 2008 R2 + HIS 2010. I made “C” updates conforming security options like sprintf_s, wchar_t, etc. This required few changes.

    Program pupose is: gateway between user computer and SNA mainframe. Program accepts input connections on IP sockets, establishes SNA link to IBM and forwards data from user computer to mainframe, and the reverse. Program uses threads having several simultaned connections.

    Following your indications I made 3 tests:

    1<sup>st</sup>: Windows service mode with user account. OK.

    2<sup>nd</sup> test: Visual Studio 2010, start program in debug mode and special program parameter preventing issuing “service” functions calls. i.e running as command line program. OK.

    3<sup>rd</sup> test: Windows service mode with local system account. KO.

    I could identify exactly where program hangs using Visual Studio, attaching to existing process, and setting breakpoint on “cminit()” function call. Prompt never gets back again after stepping this call, thread not responding. Program is still working as it accepts new incoming connections and will hang again on next cminit() calls.

    I couldn’t join trace files to this forum because files contains many lines and sensitive information. I could also send program source code if needed.

    I can open a support case joining theses files.

    Currently this subject is “half resolved” I hope we could find complete explanation for hanging trouble.

    Thanks. JC


    Thanks JC

    Monday, September 10, 2012 6:10 PM
  • JC,

    This may be due to new security that has been implemented in Windows Server 2008 and later. See the following for some details:

    http://technet.microsoft.com/en-us/library/dd349799(v=WS.10).aspx

    We don't recommend running services under Local System because of the security implications. Specifically, for HIS take a look at the following:

    888478 SNA applications that run as Windows services do not connect to a Host Integration Server 2004-based server and log an event 705 message
    http://support.microsoft.com/kb/888478/EN-US

    888762 Distributed Link Services that are started by using the LocalSystem account do not connect to Host Integration Server 2004-based servers
    http://support.microsoft.com/kb/888762/EN-US

    If you'd like to dive into this more, please open a support case. Go to the following link and then enter Host Integration Server 2010 as the product and following the wizard:

    http://support.microsoft.com/select/?target=assistance

    Thanks...


    Stephen Jackson - MSFT

    Monday, September 10, 2012 6:20 PM
  • Many thanks Stefen for your post including pertinent links.

    I understand new user creation is a must for security issue and I would report it to my company.

    My case is now solved and user creation permits program run as requested.

    Thanks again. I close this case.

    JC


    Thanks JC

    • Marked as answer by jcc_upus Tuesday, September 11, 2012 5:00 PM
    Tuesday, September 11, 2012 4:59 PM