United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-5029980 JDI can't connect to the app server a second time
JDK-5029980 : JDI can't connect to the app server a second time

Details
Type:
Bug
Submit Date:
2004-04-10
Status:
Resolved
Updated Date:
2004-10-13
Project Name:
JDK
Resolved Date:
2004-04-16
Component:
core-svc
OS:
windows_2000
Sub-Component:
debugger
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
1.4.2_07 (b01)

Related Reports
Backport:

Sub Tasks

Description
- Start the appserver on windows in debug mode, listening for a connection
  from a debugger. 
- Connect from a debugger, eg, jdb.  Note that the connection succeeds.
- Quit jdb
- Connect a second time.  The connection is not established and no
  debugging can be done.

This failure only occurs on windows when the socket transport is used,
and the debuggee launches another application with Runtime.exec().

See bug  
  4989322 Debugger doesn't connect to app server for the second time

                                    

Comments
EVALUATION

###@###.### 2004-04-10
On windows, the socket is inherited by the child process.  This
causes the socket to remain in use after the first debug session is
terminated.
                                     
2004-04-10
SUGGESTED FIX

Here are the diffs for
    j2se/src/windows/transport/socket/socket_md.c:

*** /tmp/geta23978	Sat Apr 10 12:46:24 2004
--- socket_md.c	Sat Apr 10 12:35:31 2004
***************
*** 191,197 ****
  
  int
  dbgsysSocket(int domain, int type, int protocol) {    
!     return socket(domain, type, protocol);
  }
  
  int 
--- 191,201 ----
  
  int
  dbgsysSocket(int domain, int type, int protocol) {    
!   int fd = socket(domain, type, protocol);
!   if (fd != SOCKET_ERROR) {
!       SetHandleInformation((HANDLE)(UINT_PTR)fd, HANDLE_FLAG_INHERIT, FALSE);
!   }
!   return fd;
  }
  
                                     
2004-10-02
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
1.4.2_07
tiger-beta2

FIXED IN:
1.4.2_07
tiger-beta2

INTEGRATED IN:
1.4.2_07
tiger-b48
tiger-beta2


                                     
2004-10-02



Hardware and Software, Engineered to Work Together