RFR: 8347406: [REDO] C1/C2 don't handle allocation failure properly during initialization (RuntimeStub::new_runtime_stub fatal crash) [v4]

Damon Fenacci dfenacci at openjdk.org
Mon Mar 3 12:43:53 UTC 2025


On Fri, 28 Feb 2025 20:35:58 GMT, Dean Long <dlong at openjdk.org> wrote:

> Refreshing my memory, isn't the real problem with trying to fix this with a minimum codecache size is that some of these stubs are not allocated during initial single-threaded JVM startup, but later when the first compiler threads start, and that allows other code blobs to fill up the codecache?

Yes, exactly. This seems to be even more of an issue with 2 compiler threads (i.e. C1/C2) since the first can fill up the code cache first at the expense of the other.  
The result is that if one compiler thread tries to allocate more space in a full code cache during initialization with one of the 4 call paths above, the VM crashes (but could actually just turn off the compiler thread instead).

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23630#issuecomment-2694260818


More information about the shenandoah-dev mailing list