Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asserts fired due to PROD_WITH_ASSUMES commented out #15509

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

manashaVetrivelu
Copy link
Contributor

Asserts from Issues: #15440, #15447, #15472, #15482

Signed-off-by: Manasha Vetrivelu [email protected]

Copy link
Contributor

@mpirvu mpirvu left a comment

Choose a reason for hiding this comment

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

I would prefer the asserts that fail while running the jitdump code to stay. These are secondary asserts in the sense that before they fire something bad already has happened.

Also, it may useful to write a comment explaining why the asserts have been commented out. Otherwise, other people may simply delete them (we tend to delete code rather than comment it out)

@mpirvu mpirvu added the comp:jit label Jul 8, 2022
@mpirvu
Copy link
Contributor

mpirvu commented Jul 9, 2022

Regarding the copyrights, every time you modify a file you have to make sure that the years that appear in the copyright are correct. For instance, J9MonitorTable.cpp shows
Copyright (c) 2000, 2021 IBM Corp. and others and it should read
Copyright (c) 2000, 2022 IBM Corp. and others

Secondary Asserts have not been commented out. A reason for why the assert is commented has been provided. Copyright fixed for J9MonitorTable.cpp

Signed-off-by: Manasha Vetrivelu <[email protected]>
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2021 IBM Corp. and others
* Copyright (c) 2000, 2022 IBM Corp. and others
Copy link
Contributor

Choose a reason for hiding this comment

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

This file only has the date in the copyright changed. We can skip it.

@@ -10776,7 +10776,8 @@ void J9::X86::TreeEvaluator::VMwrtbarWithoutStoreEvaluator(
{
TR::Compilation *comp = cg->comp();
TR_J9VMBase *fej9 = (TR_J9VMBase *)(cg->fe());
TR_ASSERT(!(comp->getOptions()->realTimeGC()),"Call the real-time barrier");
//assert below is commented because it is fired when compiled with PROD_WITH_ASSUMES
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest something like:
// Temporarily disable the asset below until we figure out the root cause

@@ -11599,7 +11599,8 @@ TR::CompilationInfo::replenishInvocationCount(J9Method *method, TR::Compilation
}
else
{
TR_ASSERT(false, "Unexpected value for method->extra = %p (method=%p)\n", TR::CompilationInfo::getJ9MethodExtra(method), method);
//assert below is commented because it is fired when compiled with PROD_WITH_ASSUMES
//TR_ASSERT(false, "Unexpected value for method->extra = %p (method=%p)\n", TR::CompilationInfo::getJ9MethodExtra(method), method);
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to further investigate this case

@mpirvu mpirvu self-assigned this Jul 14, 2022
Deleted assert mentioned in Issue:eclipse-openj9#15481.
Commented the other primary asserts.

Signed-off-by: Manasha Vetrivelu <[email protected]>
@@ -2109,7 +2109,6 @@ bool TR::CompilationInfo::shouldAbortCompilation(TR_MethodToBeCompiled *entry, T

if (entry->_unloadedMethod) // method was unloaded while we were trying to compile it
{
TR_ASSERT(entry->_compErrCode == compilationInterrupted, "Received error code %u, expect compilationInterrupted when the method was unloaded", entry->_compErrCode);
Copy link
Contributor

Choose a reason for hiding this comment

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

For the record, this assert was eliminated because we found it to be bogus. A compilation can fail with some error code and the immediately a redefinition even can take place which marks the compilation entry as unloaded. So it's totally possible to have the entry marked as unloaded and the error code be something else than compilationInterrupted.

@@ -10776,7 +10776,7 @@ void J9::X86::TreeEvaluator::VMwrtbarWithoutStoreEvaluator(
{
TR::Compilation *comp = cg->comp();
TR_J9VMBase *fej9 = (TR_J9VMBase *)(cg->fe());
//assert below is commented because it is fired when compiled with PROD_WITH_ASSUMES
// Temporarily disable the asset below until we figure out the root cause
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: asset --> assert

@mpirvu
Copy link
Contributor

mpirvu commented Jul 14, 2022

The description of the PR mentions 4 different issues, but in the PR there are only 3 asserts that are dealt with.

@mpirvu
Copy link
Contributor

mpirvu commented Jul 14, 2022

When the PR is merged, the issues may automatically close. We need to reopen the issues for the asserts that are temporarily commented out because we want to fix the problems not just cover them up.

@manashaVetrivelu
Copy link
Contributor Author

Initially 4 asserts were changed but I decided to cancel the changes that were made to the secondary asserts.

@manashaVetrivelu
Copy link
Contributor Author

I will reopen issues for all the asserts if they are closed once it is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants