JDK-8067748 : (process) Child is terminated when parent's console is closed [win]
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 7u60
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_7
  • CPU: x86_64
  • Submitted: 2014-06-27
  • Updated: 2016-06-13
  • Resolved: 2015-01-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 JDK 9
7u85Fixed 8u60Fixed 9 b48Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Windows 7 Ultimate 64 Bit
Windows Server 2008 64 Bit
Windows XP 32 Bit

EXTRA RELEVANT SYSTEM CONFIGURATION :
GlassFish Server Open Source Edition 3.1.2.2 (build 5)
GlassFish Server Open Source Edition 4.0 (build 89)

A DESCRIPTION OF THE PROBLEM :
A glassfish process, that is started in a command line window with the command asadmin start-domain, quits silently, if the command line window is closed.

Problem appears with JDK 1.7.0_u60 only on windows systems, under linux this is working fine.

That was working with every pior Java Release.


REGRESSION.  Last worked in version 7u55

ADDITIONAL REGRESSION INFORMATION: 
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Install JDK 1.7.0_u60
2) unzip glassfish.3.1.2.2.zip or glassfish-4.0-b89.zip
3) Open command line window
4) Change to glassfish\bin directory
5) Start glassfish with command 'asadmin start-domain'
6) (optional) Try to close command line window with 'exit' (-> command will hang)
7) Close command line window with click on X 

The glassfish java process will dissappear in task manager

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Command exit closes the command line window and the glassfish java process ist still running
ACTUAL -
The glassfish java process quits silently and dissappears in the task manager

ERROR MESSAGES/STACK TRACES THAT OCCUR :
no error message, no hs_err_pid

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
no workaround found


Comments
Good catch Rob! JDK-8023130 appears to be the root cause.
21-01-2015

Assigning to Ivan for a quick look. (feel free to bounce it back to me regardless of your conclusions)
17-12-2014

Probably not a coincidence that 7u60 was when these fixes were pushed.
17-12-2014

I can't reproduce this problem on 7u55b13. Can the submitter confirm that the latest version of glassfish4 shows this problem on that build? I'll check with a few other versions of the JDK but the java process always dies as soon as I close the cmd prompt for me.
17-12-2014

Response from the original submitter: we are not able to reproduce the problem under 7u55! 7u55 is the last java build that doesn't show this problem. We verified this on Windows 7, Windows Server 2008 and Windows XP (German installations). With all following java7 builds (including 7u72) the glassfish process (3.1.2.2, 4.0 and 4.1) quits silently after closing the comand line window. Now, we have tried to use 8u25 with glassfish 4.x (because glassfish 3.1.2.2 is not running on java8). Our test results are as follows: 7u55 7u60 7u65 7u71 7u72 8u25 3.1.2.3 ok fail fail fail fail - 4.0 ok fail fail fail fail fail 4.1 ok fail fail fail fail fail
17-12-2014

Resolving as incomplete until there is some detail to indicate if this is a JDK issue.
17-12-2014

Sent an email to the submitter requesting above information.
17-12-2014