RFR: 8272094: compiler/codecache/TestStressCodeBuffers.java crashes with "failed to allocate space for trampoline" [v2]
    Andrew Haley 
    aph at openjdk.java.net
       
    Mon May 16 17:26:09 UTC 2022
    
    
  
> This problem is, I believe, caused by an assertion left in the source code after development.
> The fix is simply to remove the assertion.
> 
> It's not at all easy to reproduce this bug, being a very intermittent failure, but in the end I reproduced it by making `-XX:+StressCodeBuffers` much more stressful, like so:
> 
> 
> diff --git a/src/hotspot/share/asm/codeBuffer.cpp b/src/hotspot/share/asm/codeBuffer.cpp
> index ddd946d7542..c74ba21cf63 100644
> --- a/src/hotspot/share/asm/codeBuffer.cpp
> +++ b/src/hotspot/share/asm/codeBuffer.cpp
> @@ -837,7 +837,8 @@ void CodeBuffer::expand(CodeSection* which_cs, csize_t amount) {
>    if (StressCodeBuffers && blob() != NULL) {
>      static int expand_count = 0;
>      if (expand_count >= 0)  expand_count += 1;
> -    if (expand_count > 100 && is_power_of_2(expand_count)) {
> +    if (expand_count > 100 && // is_power_of_2(expand_count)
> +        expand_count % 40 == 0) {
>        tty->print_cr("StressCodeBuffers: have expanded %d times", expand_count);
>        // simulate an occasional allocation failure:
>        free_blob();
Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:
  8272094: compiler/codecache/TestStressCodeBuffers.java crashes with "failed to allocate space for trampoline"
-------------
Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8730/files
  - new: https://git.openjdk.java.net/jdk/pull/8730/files/ae6335a3..c06acfac
Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8730&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8730&range=00-01
  Stats: 11 lines in 3 files changed: 7 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8730.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8730/head:pull/8730
PR: https://git.openjdk.java.net/jdk/pull/8730
    
    
More information about the hotspot-dev
mailing list