JDK-6380091 : IOException/SIGSEGV occurs during SocketChannel.close processing.
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 5.0,5.0u4,5.0u5,5.0u6
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS:
    linux,linux_2.6,linux_redhat_3.0,solaris_10 linux,linux_2.6,linux_redhat_3.0,solaris_10
  • CPU: generic,x86,sparc
  • Submitted: 2006-02-02
  • Updated: 2010-04-02
  • Resolved: 2006-02-18
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.
Other JDK 6
5.0u8Fixed 6 b73Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
The customer is getting following 3 errors at SocketChannel.close processing.

Case1: SIGSEGV occurs and VM crashes.
       (See hs_err_pid14024.log, but core was not generated.)
Case2: "IOException: No such file or directory" occurs.
Case3: "IOException: Thread signal failed" occurs

Comments
EVALUATION -- Submitter has confirmed that fix addresses the issues that they observed.
24-02-2006

EVALUATION The bug is that a non-existant thread is being signalled. The issue is intermittent and the failure modes vary because the pthread_t of a terminated thread is passed to pthread_kill. The reason this is happening is because SocketChannelImpl's connect method isn't resetting the readerThread so when the channel is closed it attempts to signal the reader. The test case provokes this problem because it has a thread that terminates immediately after establishing a connection.
02-02-2006

SUGGESTED FIX ------- SocketChannelImpl.java ------- *** /tmp/sccs.ZwayGQ Thu Feb 2 09:40:26 2006 --- SocketChannelImpl.java Thu Feb 2 09:40:16 2006 *************** *** 476,481 **** --- 476,482 ---- } } } finally { + readerThread = 0; end((n > 0) || (n == IOStatus.UNAVAILABLE)); assert IOStatus.check(n); }
02-02-2006