RFR: 8255908: ExceptionInInitializerError due to UncheckedIOException while initializing cgroupv1 subsystem
Poonam Bajaj
poonam at openjdk.java.net
Thu Nov 19 16:44:12 UTC 2020
On Thu, 19 Nov 2020 14:36:53 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Hi,
>>
>> Please review this simple change that catches UncheckedIOException that can occur if /proc/self/cgroup or /proc/self/mountinfo files don't exist on the system, or if there is an interrupt while these are being read.
>>
>> Testing: Tier1, Tier2 and Tier3.
>>
>> Thanks,
>> Poonam
>
> src/java.base/linux/classes/jdk/internal/platform/CgroupUtil.java line 50:
>
>> 48: throw new InternalError(e.getCause());
>> 49: } catch (UncheckedIOException e) {
>> 50: throw e.getCause();
>
> There are other reader methods in the same file, should this block be added to them as well?
This change takes care of the case when reading of files /proc/self/cgroup or /proc/self/mountinfo might fail due to some reason that can cause the initialization of cgroupv1 subsystem (initSubSystem) to fail. Looking at the usages of other reader methods, I think it makes sense to catch UncheckedIOException there as well.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1303
More information about the core-libs-dev
mailing list