RFR: 8192154 - JVM crashes inside some chroot environments on linux

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 8192154 - JVM crashes inside some chroot environments on linux

Bob Vandette
Please review this robustness fix to the Container support recently added to Hotspot.

BUG:
https://bugs.openjdk.java.net/browse/JDK-8192154

WEBREV:
http://cr.openjdk.java.net/~bobv/8192154/webrev/

In the event that there is a partial setup of the cgroup subsystems, it’s
possible that the VM will crash.

The change moves NULL checking earlier in the scanning of the cgroup subsystems.

Tested with jtreg container tests and Mach5.

Bob.


Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8192154 - JVM crashes inside some chroot environments on linux

John Paul Adrian Glaubitz
On 11/29/2017 10:43 PM, Bob Vandette wrote:
> Tested with jtreg container tests and Mach5.

I can confirm this change fixes the issue for me for the cases were
I first discovered it.

Thanks,
Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8192154 - JVM crashes inside some chroot environments on linux

David Holmes
In reply to this post by Bob Vandette
Hi Bob,

On 30/11/2017 7:43 AM, Bob Vandette wrote:

> Please review this robustness fix to the Container support recently added to Hotspot.
>
> BUG:
> https://bugs.openjdk.java.net/browse/JDK-8192154
>
> WEBREV:
> http://cr.openjdk.java.net/~bobv/8192154/webrev/
>
> In the event that there is a partial setup of the cgroup subsystems, it’s
> possible that the VM will crash.
>
> The change moves NULL checking earlier in the scanning of the cgroup subsystems.

The change looks good.

BTW:

326   if (mntinfo != NULL) fclose(mntinfo);
391   if (cgroup != NULL) fclose(cgroup);

in both cases the value can't be NULL as in that case you've already
returned from the function.

Thanks,
David

> Tested with jtreg container tests and Mach5.
>
> Bob.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8192154 - JVM crashes inside some chroot environments on linux

Severin Gehwolf
In reply to this post by Bob Vandette
On Wed, 2017-11-29 at 16:43 -0500, Bob Vandette wrote:

> Please review this robustness fix to the Container support recently added to Hotspot.
>
> BUG:
> https://bugs.openjdk.java.net/browse/JDK-8192154
>
> WEBREV:
> http://cr.openjdk.java.net/~bobv/8192154/webrev/
>
> In the event that there is a partial setup of the cgroup subsystems, it’s
> possible that the VM will crash.
>
> The change moves NULL checking earlier in the scanning of the cgroup subsystems.
>
> Tested with jtreg container tests and Mach5.

This looks fine to me. I'm not a Reviewer.

Thanks,
Severin