Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10857

jbosssvc on Windows can kill incorrect processes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • EAP_EWP 5.3.0.ER2
    • EAP_EWP 5.2.0
    • Other
    • None
    • Release Notes
    • Hide

      Change the user that the JBoss process runs as to a limited account. This will ensure it does not kill csrss.exe, but it may still kill other incorrect processes

      Show
      Change the user that the JBoss process runs as to a limited account. This will ensure it does not kill csrss.exe, but it may still kill other incorrect processes
    • Hide
      This version of JBoss EAP 5 contains a solution to an issue that could result in Windows operating systems experiencing a fatal system error. The potential for this scenario arose when a process that had created child processes was terminated without the child processes being re-parented, meaning they still carried the original parent process's ID. If a later process was then assigned the original parent process's ID, and then terminated, the unrelated orphan process would be ended as well, as the system would identify it as a child of the second process. This could create fatal system errors if the orphaned process was a core service, such as csrcc.exe.

      NEED FIX INFO
      Show
      This version of JBoss EAP 5 contains a solution to an issue that could result in Windows operating systems experiencing a fatal system error. The potential for this scenario arose when a process that had created child processes was terminated without the child processes being re-parented, meaning they still carried the original parent process's ID. If a later process was then assigned the original parent process's ID, and then terminated, the unrelated orphan process would be ended as well, as the system would identify it as a child of the second process. This could create fatal system errors if the orphaned process was a core service, such as csrcc.exe. NEED FIX INFO
    • Needs More Info
    • NEW

    Description

      On Windows, when a process exits it's parent processes are not re-parented (like on Linux) and the parent process ID remains the same. This can be problematic if later another process is started and is assigned the same process id.

      One situation that can occur:
      1) One of Windows' core processes smss.exe with process id P spawns another core service csrss.exe. smss.exe then exits
      2) Later on, jbosssvc.exe spawns service.bat and it is also assigned process id P, and it spawns java.exe to run JBoss with process id J
      3) When asked to stop the service, jbosssvc.exe terminates process P and all processes with the parent process id of P
      4) Since csrcc.exe also has P as it's parent process id (despite a different process spawning it) it is terminated and the OS fails with a blue screen of death.

      The best was of terminating process groups on Windows is via Job Objects, however they are only supported on XP SP3, Vista, or later.

      Aside from that, you can use heuristics by only killing processes which have:
      1) the parent process id set to P
      2) a process start time later than when we started service.bat, and/or
      3) a specific executable name (if that is known). killing java.exe would stop the JBoss instance but it may not be the only child process.

      The check in (2) can still have false positives, if service.bat exits and then process id P is re-used for yet another process.

      Attachments

        Activity

          People

            huwang@redhat.com Hui Wang
            rhn-support-jlivings James Livingston (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: