On Thu, 2 Sep 2021 14:24:24 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:

>> Please review this change to the Unix implementations of 
>> sun.nio.ch.sctp.Sctp*ChannelImpl#implCloseSelectableChannel() 
>> to be same as SocketChannelImpl at JDK-7118373. (The preClose is missing a 
>> check for the ST_KILLED state.)
>
> I have run this change on one of our machines that support SCTP. I did get 
> some intermittent failures with the other SCTP tests - they don't seem much 
> stable - but the new proposed test was failing all the time. I suspect that 
> using `lsof` to figure out whether the file descriptor was closed is not 
> reliable/portable enough. I also tried to modify the test to use /othervm - 
> which is probably a good idea if you don't want your results to be polluted 
> by whatever other test might have run previously/concurrently in the agent VM 
> - but to no avail: the test was still failing 100% of the time.
> @masyano could you figure another way to detect whether the file descriptor 
> has been released?

@dfuch I tried to count `/proc/<PID>/fd`, but there are recorded all fds in the 
process. I don't know how to pick up only active fds in `/proc/<PID>/fd`. So, I 
will change to call lsof last one time only (like 
https://github.com/openjdk/jdk/pull/4621), and counts all unreleased fds.

Could you try this test case?

-------------

PR: https://git.openjdk.java.net/jdk/pull/5274

Reply via email to