RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v2]
Gerard Ziemski
gziemski at openjdk.org
Fri Jan 26 17:40:25 UTC 2024
On Fri, 26 Jan 2024 15:57:57 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Can I please get a review of this change which proposes to address https://bugs.openjdk.org/browse/JDK-8324668?
>>
>> This change proposes to fix the issue in jdwp where when launching a child process (for the `launch=<cmd>` option), it iterates over an extremely large number of file descriptors to close each one of those. Details about the issue and the proposed fixed are added in a subsequent comment in this PR https://github.com/openjdk/jdk/pull/17588#issuecomment-1912256075. tier1, tier2 and tier3 testing is currently in progress with this change.
>
> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>
> use the right include for rlim_t - <sys/resource.h>
src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c line 112:
> 110: }
> 111:
> 112: closedir(dp);
Should this be:
` (void)closedir(dp);`
to show that we're ignoring the return value?
Since this area is pretty mysterious to deal with, should we consider checking whether `closedir()` actually returns am error, and at least be verbal and print a warning, as opposed to silently ignoring it?
Printing a warning, might help us diagnose any issue in the future?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17588#discussion_r1467934723
More information about the serviceability-dev
mailing list