RFR: 8333522: JFR SwapSpace event might read wrong free swap space size [v3]
Thomas Stuefe
stuefe at openjdk.org
Sat Jun 8 11:27:15 UTC 2024
On Fri, 7 Jun 2024 11:52:22 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
> > > Feel free to do that. In a separate PR/bug though.
> >
> >
> > Thinking more about the potentially failing sysinfo - could it be that we get in this case an uninitialized sysinfo struct and just happily use the values from there ? For example here https://github.com/openjdk/jdk/blob/master/src/hotspot/os/linux/os_linux.cpp#L287
>
> Yes. Seems so.
sysinfo, as far as I know, relies on /proc. Reading from /proc can theoretically fail. So, error handling would be good.
If you want to know if the observed errors stem from sysinfo failure, init the data structure, then, after the call, assert that the init values are overwritten.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19574#issuecomment-2155996462
More information about the hotspot-runtime-dev
mailing list