A dead process

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • shawn

    #1

    A dead process

    A Windows service A which starts multiple instances of an application B at
    random time.

    Both A and B are written in C#.

    It quite often shows in Task Manager that CPU time for B is 00:00:00 and
    memory usage stay the same and never changes.

    Can we assume that B is stuck based on this observation? Also, debug code at
    the very beginning of B is never run through...

    What could be the cause of the problem of B being stuck and how to debug it?

    Thanks in advance!


  • =?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?=

    #2
    Re: A dead process

    shawn wrote:
    A Windows service A which starts multiple instances of an application B at
    random time.
    >
    Both A and B are written in C#.
    >
    It quite often shows in Task Manager that CPU time for B is 00:00:00 and
    memory usage stay the same and never changes.
    >
    Can we assume that B is stuck based on this observation? Also, debug code at
    the very beginning of B is never run through...
    >
    What could be the cause of the problem of B being stuck and how to debug it?
    >
    Thanks in advance!
    >
    >
    Just as a hunch, could the program be attempting to display a message box?

    If it's started by a service, it will most likely run under a different
    user context than the logged on interactive user, so message boxes might
    not be displayed.

    --
    Lasse Vågsæther Karlsen
    mailto:lasse@vk arlsen.no
    Blogger ist ein Veröffentlichungs-Tool von Google, mit dem du ganz einfach deine Gedanken der Welt mitteilen kannst. Mit Blogger kannst du problemlos Texte, Fotos und Videos in deinem persönlichen Blog oder deinem Team-Blog veröffentlichen.

    Comment

    • shawn

      #3
      Re: A dead process

      Lasse Vågsæther Karlsen <lasse@vkarlsen .nowrote in message
      news:e$LqQBpOIH A.4480@TK2MSFTN GP06.phx.gbl...
      shawn wrote:
      A Windows service A which starts multiple instances of an application B
      at
      random time.

      Both A and B are written in C#.

      It quite often shows in Task Manager that CPU time for B is 00:00:00 and
      memory usage stay the same and never changes.

      Can we assume that B is stuck based on this observation? Also, debug
      code at
      the very beginning of B is never run through...

      What could be the cause of the problem of B being stuck and how to debug
      it?

      Thanks in advance!
      Just as a hunch, could the program be attempting to display a message box?
      >
      If it's started by a service, it will most likely run under a different
      user context than the logged on interactive user, so message boxes might
      not be displayed.
      >
      Thanks, Lasse!

      First, Application B is a console one. Of course, it could cause some
      Windows error/warning messagebox popped up.

      Second, most instances of B running and shutting down themselves fine while
      one or two of B hanging there.

      "a different user context than the logged on interactive user"

      I'm not sure what's this and how to check on it...Could you elaborate this?


      Comment

      • Eternal Snow

        #4
        Re: A dead process

        Please check this:
        Whether you wrote a MessageBos.Show (ex.ToString()) in catch block of TRY.

        Remove all MessageBox or other UI like Form. Windows Service of c# cannot
        support those.

        "shawn" <shawnl913@yaho o.comwrote in message
        news:OJRoKVpOIH A.4948@TK2MSFTN GP02.phx.gbl...
        Lasse Vågsæther Karlsen <lasse@vkarlsen .nowrote in message
        news:e$LqQBpOIH A.4480@TK2MSFTN GP06.phx.gbl...
        >shawn wrote:
        A Windows service A which starts multiple instances of an application B
        at
        random time.
        >
        Both A and B are written in C#.
        >
        It quite often shows in Task Manager that CPU time for B is 00:00:00
        and
        memory usage stay the same and never changes.
        >
        Can we assume that B is stuck based on this observation? Also, debug
        code at
        the very beginning of B is never run through...
        >
        What could be the cause of the problem of B being stuck and how to
        debug
        it?
        >
        Thanks in advance!
        >
        >
        >Just as a hunch, could the program be attempting to display a message
        >box?
        >>
        >If it's started by a service, it will most likely run under a different
        >user context than the logged on interactive user, so message boxes might
        >not be displayed.
        >>
        >
        Thanks, Lasse!
        >
        First, Application B is a console one. Of course, it could cause some
        Windows error/warning messagebox popped up.
        >
        Second, most instances of B running and shutting down themselves fine
        while
        one or two of B hanging there.
        >
        "a different user context than the logged on interactive user"
        >
        I'm not sure what's this and how to check on it...Could you elaborate
        this?
        >
        >

        Comment

        • Wingot

          #5
          Re: A dead process

          From: shawn [mailto:shawnl91 3@yahoo.com]
          Posted At: Monday, 10 December 2007 3:18 AM
          Posted To: microsoft.publi c.dotnet.langua ges.csharp
          Conversation: A dead process
          Subject: A dead process
          >
          A Windows service A which starts multiple instances of an application
          B
          at
          random time.
          >
          Both A and B are written in C#.
          >
          It quite often shows in Task Manager that CPU time for B is 00:00:00
          and
          memory usage stay the same and never changes.
          >
          Can we assume that B is stuck based on this observation? Also, debug
          code at
          the very beginning of B is never run through...
          >
          What could be the cause of the problem of B being stuck and how to
          debug it?
          >
          Thanks in advance!
          Hi shawn,

          Is it possible for you to post the code listing for B? Or more
          specifically, the parts that are called when the service is started.


          Comment

          Working...