Skip to content

Conversation

@dougxc
Copy link
Member

@dougxc dougxc commented Apr 23, 2024

This pull request mitigates failures in memory stress tests that check the stack trace of an OutOfMemoryError for certain expected entries.

The stack trace of an OOME will not be allocated once all preallocated OOMEs are used up. If the only heap allocations performed in stressful conditions are those of the stress test, then the 4 preallocated OOMEs would be sufficient. However, it's possible for VM internal allocations to also occur during stressful conditions, especially in -Xcomp mode. For example, CompileBroker::compile_method will try to resolve the string constants in the constant pool of the method about to be compiled. This can fail as shown here:

V  [jvm.dll+0x62c23a]  Exceptions::_throw+0x11a  (exceptions.cpp:168)
V  [jvm.dll+0x62d85b]  Exceptions::_throw_oop+0xab  (exceptions.cpp:140)
V  [jvm.dll+0xbbce78]  MemAllocator::Allocation::check_out_of_memory+0x208  (memAllocator.cpp:138)
V  [jvm.dll+0xbbcac8]  MemAllocator::allocate+0x158  (memAllocator.cpp:377)
V  [jvm.dll+0x79bd05]  InstanceKlass::allocate_instance+0x95  (instanceKlass.cpp:1509)
V  [jvm.dll+0x7ddeed]  java_lang_String::basic_create+0x9d  (javaClasses.cpp:273)
V  [jvm.dll+0x7e43c0]  java_lang_String::create_from_unicode+0x60  (javaClasses.cpp:291)
V  [jvm.dll+0xdb91a5]  StringTable::do_intern+0xb5  (stringTable.cpp:379)
V  [jvm.dll+0xdba9f2]  StringTable::intern+0x1b2  (stringTable.cpp:368)
V  [jvm.dll+0xdbaaa6]  StringTable::intern+0x86  (stringTable.cpp:328)
V  [jvm.dll+0x51c8b1]  ConstantPool::string_at_impl+0x1d1  (constantPool.cpp:1251)
V  [jvm.dll+0x51b95b]  ConstantPool::resolve_string_constants_impl+0xeb  (constantPool.cpp:800)
V  [jvm.dll+0x4f2f8d]  CompileBroker::compile_method+0x31d  (compileBroker.cpp:1395)
V  [jvm.dll+0x4f3474]  CompileBroker::compile_method+0xc4  (compileBroker.cpp:1348)

These internal allocations can occur before the allocations of the test and thus use up the pre-allocated OOMEs. As a result, the OOMEs triggered by the stress test may end up throwing the default, shared OOME instance that have no stack trace.

This PR mitigates this by introducing a scope (see InternalOOMEMark in memAllocator.hpp) in which a failed heap allocation results in the shared, stacktrace-less OOME instance being thrown. This scope is used for guarding VM internal allocations where an OOME will not be propagated to user code. In addition, JVMTI "resource exhausted" events are disabled in the scope of an InternalOOMEMark.

Note that this change also improves diagnosability because internal OOMEs will no longer use up the limited number of pre-allocated OOMEs.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8331208: Memory stress test that checks OutOfMemoryError stack trace fails (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18925/head:pull/18925
$ git checkout pull/18925

Update a local copy of the PR:
$ git checkout pull/18925
$ git pull https://git.openjdk.org/jdk.git pull/18925/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18925

View PR using the GUI difftool:
$ git pr show -t 18925

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18925.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 23, 2024

👋 Welcome back dnsimon! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Apr 23, 2024

@dougxc This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8331208: Memory stress test that checks OutOfMemoryError stack trace fails

Reviewed-by: dholmes, never

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 199 new commits pushed to the master branch:

  • edd47c1: 8308033: The jcmd thread dump related tests should test virtual threads
  • 1aebab7: 8320995: RISC-V: C2 PopCountVI
  • 0eff492: 8330278: Have SSLSocketTemplate.doClientSide use loopback address
  • c6f611c: 8331798: Remove unused arg of checkErgonomics() in TestMaxHeapSizeTools.java
  • 0e1dca7: 8331715: Remove virtual specifiers in ContiguousSpace
  • 7f29904: 8330005: RandomGeneratorFactory.getDefault() throws exception when the runtime image only has java.base module
  • 2baacfc: 8331789: ubsan: deoptimization.cpp:403:29: runtime error: load of value 208, which is not a valid value for type 'bool'
  • 7b79426: 8278353: Provide Duke as default favicon in Simple Web Server
  • 466a21d: 8331863: DUIterator_Fast used before it is constructed
  • 8af606f: 8331334: com/sun/net/httpserver/HttpsParametersClientAuthTest.java fails in testServerNeedClientAuth(false)
  • ... and 189 more: https://git.openjdk.org/jdk/compare/2555166247230497453503318ccbf4dd4f047193...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk
Copy link

openjdk bot commented Apr 23, 2024

@dougxc The following labels will be automatically applied to this pull request:

  • graal
  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added graal graal-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels Apr 23, 2024
@dougxc dougxc force-pushed the JDK-8328892_openjdk branch 2 times, most recently from 8ea7188 to 07d2306 Compare April 24, 2024 16:19
@dougxc dougxc force-pushed the JDK-8328892_openjdk branch from 07d2306 to 35e6b50 Compare April 25, 2024 13:46
public:
SandboxedOOMEMark(JavaThread* thread, bool disable_events=false) {
if (thread != nullptr) {
_outer = thread->sandboxed_oome_mark();
Copy link
Member Author

@dougxc dougxc Apr 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need for supporting recursion is shown by this stack trace:

V  [libjvm.dylib+0x4c9fe4]  CompileBroker::compile_method(methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, DirectiveSet*, JavaThread*)+0x6b0
V  [libjvm.dylib+0x4c98d0]  CompileBroker::compile_method(methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, JavaThread*)+0xcc
V  [libjvm.dylib+0x4a7434]  CompilationPolicy::event(methodHandle const&, methodHandle const&, int, int, CompLevel, nmethod*, JavaThread*)+0x2e0
V  [libjvm.dylib+0x355c14]  Runtime1::counter_overflow(JavaThread*, int, Method*)+0x268
v  ~RuntimeStub::counter_overflow Runtime1 stub 0x0000000116276c3c
J 4004 c1 jdk.internal.loader.URLClassPath.getLoader(I)Ljdk/internal/loader/URLClassPath$Loader; java.base@23-internal (194 bytes) @ 0x000000010f55a7bc [0x000000010f558cc0+0x0000000000001afc]
J 3651 jvmci jdk.internal.loader.URLClassPath.getResource(Ljava/lang/String;Z)Ljdk/internal/loader/Resource; java.base@23-internal (74 bytes) @ 0x0000000116ba628c [0x0000000116ba6200+0x000000000000008c]
J 3649 jvmci jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(Ljava/lang/String;)Ljava/lang/Class; java.base@23-internal (64 bytes) @ 0x0000000116ba4ffc [0x0000000116ba4c40+0x00000000000003bc]
J 3640 jvmci jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Ljava/lang/String;Z)Ljava/lang/Class; java.base@23-internal (143 bytes) @ 0x0000000116ba26c0 [0x0000000116ba2440+0x0000000000000280]
J 3638 jvmci jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; java.base@23-internal (40 bytes) @ 0x0000000116ba17c0 [0x0000000116ba1680+0x0000000000000140]
J 3636 jvmci java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class; java.base@23-internal (7 bytes) @ 0x0000000116ba137c [0x0000000116ba1300+0x000000000000007c]
v  ~StubRoutines::call_stub 0x00000001160f0190
V  [libjvm.dylib+0x856918]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x420
V  [libjvm.dylib+0x855618]  JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x218
V  [libjvm.dylib+0x8558b0]  JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, Handle, JavaThread*)+0x70
V  [libjvm.dylib+0x1024ca8]  SystemDictionary::load_instance_class_impl(Symbol*, Handle, JavaThread*)+0x114
V  [libjvm.dylib+0x10226c8]  SystemDictionary::load_instance_class(Symbol*, Handle, JavaThread*)+0x28
V  [libjvm.dylib+0x1021a7c]  SystemDictionary::resolve_instance_class_or_null(Symbol*, Handle, Handle, JavaThread*)+0x69c
V  [libjvm.dylib+0xf5ea64]  SignatureStream::as_klass(Handle, Handle, SignatureStream::FailureMode, JavaThread*)+0x60
V  [libjvm.dylib+0xd57894]  Method::load_signature_classes(methodHandle const&, JavaThread*)+0xf0
V  [libjvm.dylib+0x4c9c8c]  CompileBroker::compile_method(methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, DirectiveSet*, JavaThread*)+0x358
V  [libjvm.dylib+0x4c98d0]  CompileBroker::compile_method(methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, JavaThread*)+0xcc
V  [libjvm.dylib+0x4a7434]  CompilationPolicy::event(methodHandle const&, methodHandle const&, int, int, CompLevel, nmethod*, JavaThread*)+0x2e0
V  [libjvm.dylib+0x355c14]  Runtime1::counter_overflow(JavaThread*, int, Method*)+0x268
v  ~RuntimeStub::counter_overflow Runtime1 stub 0x0000000116276c3c
J 4003 c1 CountUppercase.identity(ILCountUppercase$Unloaded;)I (2 bytes) @ 0x000000010f558874 [0x000000010f5587c0+0x00000000000000b4]
j  CountUppercase.main([Ljava/lang/String;)V+61
v  ~StubRoutines::call_stub 0x00000001160f0190
V  [libjvm.dylib+0x856918]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x420
V  [libjvm.dylib+0x940bf8]  jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, JavaThread*)+0x14c
V  [libjvm.dylib+0x9475c0]  jni_CallStaticVoidMethod+0x16c
C  [libjli.dylib+0xa260]  invokeStaticMainWithArgs+0x84
C  [libjli.dylib+0xaa9c]  JavaMain+0x588
C  [libjli.dylib+0xd4a0]  ThreadJavaMain+0xc

Note the recursive call to CompileBroker::compile_method (which uses a SandboxedOOMEMark).

@dougxc dougxc force-pushed the JDK-8328892_openjdk branch from c4cc8d3 to 137ab23 Compare April 25, 2024 21:00
@dougxc dougxc changed the title 8328892: AlwaysOOMProductionAnonymousTrace_InternedString still fails with libgraal 8331208: Memory stress test that checks OutOfMemoryError stack trace fails Apr 26, 2024
@dougxc dougxc marked this pull request as ready for review April 26, 2024 16:45
@dougxc
Copy link
Member Author

dougxc commented Apr 26, 2024

/cc hotspot-gc hotspot-runtime

@openjdk openjdk bot added rfr Pull request is ready for review hotspot-gc hotspot-gc-dev@openjdk.org hotspot-runtime hotspot-runtime-dev@openjdk.org labels Apr 26, 2024
@openjdk
Copy link

openjdk bot commented Apr 26, 2024

@dougxc
The hotspot-gc label was successfully added.

The hotspot-runtime label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Apr 26, 2024

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you are generalising (and seemingly simplifying) the notion of a "retryable allocation" so that internally an OOME can be ignored for a range of reasons. It seems a rather elaborate response to the test failure (especially when generating a stacktrace under OOM conditions could itself fail anyway), but I can see the general utility of expanding things this way. I really dislike the name SandboxedOOMEMark though - sorry - suggestions: InternalOOMEMark, ScopedOOMEMark, ConfinedOOMEMark ?

My main concerns relate to me not understanding the details of the existing retryable allocation, so some of the new code seems a little odd. Comments below.

Thanks

Comment on lines 126 to 127
// -XX:+HeapDumpOnOutOfMemoryError and -XX:OnOutOfMemoryError support
report_java_out_of_memory(message);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not obvious we now need this to be unconditional.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was a mistake to make it conditional when RetryableAllocationMark was first introduced. The purpose of RAM was to only to resolve a correctness issue wrt to JVMTI (it was seeing the "same" exception being reported twice). The -XX actions do not change the semantics of the exception throwing so can be done unconditionally.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But if this is a hidden/internal OOME then why would we treat it as a normal OOME and trigger the XX action? If the allocation routines returned null instead, we would never consider triggering the XX actions for OOME.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends on what the purpose of the -XX actions is. As far as I can tell, they are for understanding when and why the JVM hits a memory limit from an external perspective. For example, until something like https://bugs.openjdk.org/browse/JDK-8328639 exists, I don't think it would be easy to discover an OOME caused by the string constant resolution done by the JIT. But maybe that doesn't matter? I'm fine with keeping the XX actions conditional if you'd prefer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to keep them conditional - thanks. The -XX:OnOutOfMemoryError is an action to take when a user-visible OOME would be thrown. We don't run these actions for VM allocation failures.

Comment on lines +136 to +139
} else {
_outer = false;
_thread = nullptr;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't obvious to me how this part is intended to be used. I see it ties back to the retryable allocation "activate" mode, but I'm unclear what that means as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By "this part", do you mean the else branch? It exists for the !activate case of RetryableAllocationMark which is used when the null_on_fail parameter of JVMCIRuntime::new_instance_common is true. That is, the runtime call is from compiled code that does not want to trigger throwing of an OOME. Graal will deopt in such cases and let the interpreter throw the exception. This ensures the OOME is reported exactly once to JVMTI.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"this part" means the "else branch" which means the null receiving constructor. Yeah that whole "null_on_fail" thing had me a bit perplexed and I see there is now a JBS issue filed. to kill it off as we always want null-on-fail.

if (length > max_length) {
if (!THREAD->in_retryable_allocation()) {
report_java_out_of_memory("Requested array size exceeds VM limit");
report_java_out_of_memory("Requested array size exceeds VM limit");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again not obvious this should now be unconditional

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same reasoning as for MemAllocator::Allocation::check_out_of_memory.

@dougxc
Copy link
Member Author

dougxc commented Apr 30, 2024

So you are generalising (and seemingly simplifying) the notion of a "retryable allocation" so that internally an OOME can be ignored for a range of reasons. It seems a rather elaborate response to the test failure (especially when generating a stacktrace under OOM conditions could itself fail anyway), but I can see the general utility of expanding things this way.

Yes, it's somewhat elaborate but also resolves a long standing suboptimal behavior in HotSpot. That is, when an OOME is thrown while reallocating objects in deoptimization (for example), it uses up one of the precious pre-allocated OOMEs. This increases the chance that an OOME that actually makes it out to user code will not have a stack trace.

I really dislike the name SandboxedOOMEMark though - sorry - suggestions: InternalOOMEMark, ScopedOOMEMark, ConfinedOOMEMark ?

Aren't "sandboxed", "scoped" and "confined" kind of all the same concept? I don't mind using a different name but want to better understand the specific objection to "sandboxed" first.

@dholmes-ora
Copy link
Member

I don't think "sandbox" fits in this context:

Sandboxing is a security practice in which you use an isolated environment, or a “sandbox,” for testing. Within the sandbox you run code, analyze the code in a safe, isolated environment without affecting the application, system or platform.

@dougxc
Copy link
Member Author

dougxc commented May 1, 2024

Ok, I will rename it to InternalOOMEMark.

JavaThread* _thread;

public:
InternalOOMEMark(JavaThread* thread) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: add a comment:

// Passing a null thread allows for a no-op implementation for contexts that will suppress
// throwing of the OOME - see RetryableAllocationMark.

I was wondering if we really need this. AFAICS it would be harmless to always pass in the current thread and set the thread's field because when we would have passed null then no exception would be thrown anyway. It seems the null thread is only used as a means for RAM to track whether activate was false. But I guess a no-op IOM achieves the same goal.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throwing of the OOME is never suppressed by InternalOOMEMark. It only changes how the OOME is initialized.
When RetryableAllocationMark passes thread == null, it wants the normal OOME initialization to be done and JVMTI events to be fired.
In the context of https://bugs.openjdk.org/browse/JDK-8331429, I propose to leave this PR as is. That issue will remove activate altogether (cc @mur47x111 ).

}
}

// Returns nullptr iff `activate` was false in the constructor.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is out of place - activate is in the RAM constructor

Comment on lines 117 to 107
JavaThread* THREAD = _thread; // For exception macros.
JavaThread* THREAD = _iom.thread();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore comment: // For exception macros.

Comment on lines +112 to 114
if (ex->is_a(vmClasses::OutOfMemoryError_klass())) {
CLEAR_PENDING_EXCEPTION;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an observation but the original code will clear all exceptions except for an "async" exception, which these days is only the InternalError thrown by unsafe-access-errors. But the new code will only clear OOME thus allowing the (as expected) InternalError to remain, but also any other VirtualMachineErrors that may have arisen e.g. StackOverflowError. I actually think this is more correct, but it does seem a change in behaviour that we may need to be wary of.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the context of Graal, it doesn't really make much of a difference as the Graal stub that calls this runtime routine will clear all exceptions anyway. But yes, I think limiting the clearing here to OOME is better.

Copy link
Member

@stefank stefank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a look at this because it touches GC code, and therefore have a few nits / style requests related to that. However, don't consider this a full review since I'm not familiar with the part of the code / issues this PR intends to solve.

JavaThread* _thread;

public:
InternalOOMEMark(JavaThread* thread) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InternalOOMEMark(JavaThread* thread) {
explicit InternalOOMEMark(JavaThread* thread) {

class DeoptResourceMark;
class JNIHandleBlock;
class JVMCIRuntime;
class InternalOOMEMark;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to get this sorted as the other forward declarations.

Comment on lines 653 to 658
oop Universe::out_of_memory_error_java_heap(bool omit_backtrace) {
oop oome = out_of_memory_errors()->obj_at(_oom_java_heap);
if (!omit_backtrace) {
oome = gen_out_of_memory_error(oome);
}
return oome;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be nice to get rid of the double negation here:

Suggested change
oop Universe::out_of_memory_error_java_heap(bool omit_backtrace) {
oop oome = out_of_memory_errors()->obj_at(_oom_java_heap);
if (!omit_backtrace) {
oome = gen_out_of_memory_error(oome);
}
return oome;
oop Universe::out_of_memory_error_java_heap(bool omit_backtrace) {
oop oome = out_of_memory_errors()->obj_at(_oom_java_heap);
if (omit_backtrace) {
return oome;
}
return gen_out_of_memory_error(oome);

// may or may not have a backtrace. If error has a backtrace then the stack trace is already
// filled in.
static oop out_of_memory_error_java_heap();
static oop out_of_memory_error_java_heap(bool omit_backtrace=false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
static oop out_of_memory_error_java_heap(bool omit_backtrace=false);
static oop out_of_memory_error_java_heap(bool omit_backtrace = false);

THROW_OOP(Universe::out_of_memory_error_array_size());
} else {
THROW_OOP(Universe::out_of_memory_error_retry());
THROW_OOP(Universe::out_of_memory_error_java_heap(/* omit_backtrace*/ true));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
THROW_OOP(Universe::out_of_memory_error_java_heap(/* omit_backtrace*/ true));
THROW_OOP(Universe::out_of_memory_error_java_heap(/* omit_backtrace */ true));

THROW_OOP_(exception, true);
} else {
THROW_OOP_(Universe::out_of_memory_error_retry(), true);
THROW_OOP_(Universe::out_of_memory_error_java_heap(/* omit_backtrace*/ true), true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that the only explicitly passed in value for omit_backtrace is true I think it would be nicer to create a separate function for this case, instead of having a comment always explaining what true stands for. Maybe out_of_memory_error_java_heap_omit_backtrace()?

Comment on lines 716 to 718
bool in_internal_oome_mark() const { return _in_internal_oome_mark; }
void set_in_internal_oome_mark(bool b) { _in_internal_oome_mark = b; }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should all these be prefixed with is like:

  bool is_in_VTMS_transition() const             { return _is_in_VTMS_transition; }
  bool is_in_tmp_VTMS_transition() const         { return _is_in_tmp_VTMS_transition; }
  bool is_in_any_VTMS_transition() const { return _is_in_VTMS_transition || _is_in_tmp_VTMS_transition; }

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

@stefank
Copy link
Member

stefank commented May 2, 2024

Copy link
Contributor

@tkrodriguez tkrodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new version looks great to me.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 2, 2024
@dougxc
Copy link
Member Author

dougxc commented May 3, 2024

Any remaining concerns @dholmes-ora ?

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updates look good. Thanks

@dougxc
Copy link
Member Author

dougxc commented May 8, 2024

Thanks for the reviews.

/integrate

@openjdk
Copy link

openjdk bot commented May 8, 2024

Going to push as commit aafa15f.
Since your change was applied there have been 199 commits pushed to the master branch:

  • edd47c1: 8308033: The jcmd thread dump related tests should test virtual threads
  • 1aebab7: 8320995: RISC-V: C2 PopCountVI
  • 0eff492: 8330278: Have SSLSocketTemplate.doClientSide use loopback address
  • c6f611c: 8331798: Remove unused arg of checkErgonomics() in TestMaxHeapSizeTools.java
  • 0e1dca7: 8331715: Remove virtual specifiers in ContiguousSpace
  • 7f29904: 8330005: RandomGeneratorFactory.getDefault() throws exception when the runtime image only has java.base module
  • 2baacfc: 8331789: ubsan: deoptimization.cpp:403:29: runtime error: load of value 208, which is not a valid value for type 'bool'
  • 7b79426: 8278353: Provide Duke as default favicon in Simple Web Server
  • 466a21d: 8331863: DUIterator_Fast used before it is constructed
  • 8af606f: 8331334: com/sun/net/httpserver/HttpsParametersClientAuthTest.java fails in testServerNeedClientAuth(false)
  • ... and 189 more: https://git.openjdk.org/jdk/compare/2555166247230497453503318ccbf4dd4f047193...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 8, 2024
@openjdk openjdk bot closed this May 8, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 8, 2024
@openjdk
Copy link

openjdk bot commented May 8, 2024

@dougxc Pushed as commit aafa15f.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

graal graal-dev@openjdk.org hotspot hotspot-dev@openjdk.org hotspot-gc hotspot-gc-dev@openjdk.org hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants