Application deletion fails on Windows/JDK 17
Applications can sometimes hang in a Windows/JDK 17 environment if it uses geode-core library to read properties from any resource in com/vmware/gemfire/internal/version/. This can result in failure to delete application jars and is caused by an InputStream that is not being closed correctly. This is not likely to be an issue in the Linux and Mac environments as they are less strict about handling InputStream closures. In Java 17, the file can be kept open after the InputStream is dereferenced, and until the GC, based on the timing, picks it up.
See related open source code below.
https://github.com/apache/geode/blob/develop/geodecore/src/main/java/org/apache/geode/internal/VersionDescription.java#L85 [github.com]
public VersionDescription(InputStream resource, String name) {
if (resource == null) {
error = Optional
.of(String.format("<Could not find resource com/vmware/gemfire/internal/version/%s>",
name));
description = null;
return;
}
description = new Properties();
try {
description.load(resource);
} catch (Exception ex) {
error = Optional
.of(String.format(
"<Could not read properties from resource com/vmware/gemfire/internal/version/%s because: %s>",
name, ex));
return;
}
error = validate(description);
}
Until a fix is released to close the InputStream, the workaround is to manually delete the application jar files.
The releases listed below will have the fix.
Fix Version: 9.15.16
Fix Version: 10.0.7
Fix Version: 10.1.4
Fix Version: 10.2.0 (develop)
If this still doesn't resolve the issue, please capture heap dumps and thread dumps, in addition to the stats and logs and raise a Support case.