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

checker-framework.yml should be able to fail execution if report generation is failed #14396

Closed
romani opened this issue Jan 31, 2024 · 7 comments · Fixed by #14409
Closed

checker-framework.yml should be able to fail execution if report generation is failed #14396

romani opened this issue Jan 31, 2024 · 7 comments · Fixed by #14409

Comments

@romani
Copy link
Member

romani commented Jan 31, 2024

detected at https://github.com/checkstyle/checkstyle/actions/runs/7594309984/job/20685718210?pr=14314

According to commit list , https://github.com/checkstyle/checkstyle/commits/master , failure in master started with c403a9a which is completely unrelated. Looking at the PR's CI list, the CI did run and said it passed. #14311 . The commit before that in master, half the CI ran and checker wasn't one of them.

However, looking at the actual run in #14311 you can see that checker throw an error and died. The exception was never reported and made us believe everything was fine.

https://github.com/checkstyle/checkstyle/actions/runs/7593228559/job/20683478761#step:6:470

Warning:  Garbage collection consumed 86% of CPU during the past 60 seconds.
Error:  An exception has occurred in the compiler (11.0.21). Please file a bug against the Java compiler via the Java bug reporting page (https://bugreport.java.com/) after checking the Bug Database (https://bugs.java.com/) for duplicates. Include your program and the following diagnostic in your report. Thank you.
com.sun.tools.javac.util.ClientCodeException: java.lang.OutOfMemoryError: Java heap space
	at jdk.compiler/com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:832)
	at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1414)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1371)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:311)
	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
	at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
	at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
Caused by: java.lang.OutOfMemoryError: Java heap space
	at org.checkerframework.framework.source.SourceChecker.wrapThrowableAsBugInCF(SourceChecker.java:2671)
	at org.checkerframework.framework.source.SourceChecker.typeProcess(SourceChecker.java:1059)
	at org.checkerframework.common.basetype.BaseTypeChecker.typeProcess(BaseTypeChecker.java:558)
	at org.checkerframework.javacutil.AbstractTypeProcessor$AttributionTaskListener.finished(AbstractTypeProcessor.java:188)
	at jdk.compiler/com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:828)
	... 8 more

We need to update the checker CI to detect a OOM exception and mark it as a failure if it occurs.

Edit:
CI runs checker groovy. https://github.com/checkstyle/checkstyle/blob/master/.github/workflows/checker-framework.yml#L54C14-L54C81
Groovy script scans entire maven run, so we should be able to just be able to add a check for the exception. https://github.com/checkstyle/checkstyle/blob/master/.ci/checker-framework.groovy

@MANISH-K-07
Copy link
Contributor

Already on it !!
:)

@MANISH-K-07

This comment was marked as off-topic.

MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Feb 3, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 3, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 3, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 3, 2024
@relentless-pursuit
Copy link

Already on it !!
:)

The PR #14409 seems to be addressing the same issue. Should I close my PR #14413 or ?....

I don't understand why this keeps happening !! :)

I didn't see any PR for 2 days after you had mentioned 'you were on it'. And, given my experience with checkstyle, i went on to contribute on it.

@MANISH-K-07

This comment was marked as off-topic.

@relentless-pursuit
Copy link

I didn't see any PR for 2 days after you had mentioned 'you were on it'. And, given my experience with checkstyle, i went on to contribute on it.

hey I wasn't complaining or anything.. Sorry if it sounded that way. I am currently a sophomore pursuing Computer Science Engineering and am managing my sem exams and this parallely so, it took some time getting familiar with groovy script.

I am just happy if the issue gets resolved !!

No worries. It's all good. Good luck.

relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 4, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 6, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 6, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 6, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 6, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 6, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 6, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 6, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 6, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 7, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 7, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 7, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 7, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 7, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 7, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 15, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 15, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 16, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 18, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 18, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 18, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 18, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 18, 2024
… changing plugin config

Issue checkstyle#14396: checker-framework.yml should fail execution if report generation failed
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 18, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 18, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 18, 2024
@relentless-pursuit
Copy link

relentless-pursuit commented Feb 18, 2024

The below is the commit to simulate an OOM.

b523df0

I made the following changes:

  1. <failOnError>true</failOnError>: With this Maven fails the build if any errors occur during compilation.
  2. <meminitial>256m</meminitial>, <maxmem>256m</maxmem>: The initial and maximum memory allocation was reduced to 256m of heap space, causing an OOM.

relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 18, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 18, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 19, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 19, 2024
…o ensure a proper error handling

Issue checkstyle#14396: Disabling CI for Testing OOM failure

Issue checkstyle#14396: Changes made to simulate OOM
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 19, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 19, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 19, 2024
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 20, 2024
….groovy to fail execution if report generation fails
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 20, 2024
….groovy to fail execution if report generation fails
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 20, 2024
….groovy to fail execution if report generation fails
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 20, 2024
….groovy to fail execution if report generation fails
relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 20, 2024
….groovy to fail execution if report generation fails
rnveach pushed a commit that referenced this issue Feb 21, 2024
… fail execution if report generation fails
@github-actions github-actions bot added this to the 10.14.0 milestone Feb 21, 2024
aye-nyeinSan added a commit to aye-nyeinSan/checkstyle that referenced this issue Feb 23, 2024
Issue checkstyle#14396: Made changes to pom.xml and checker-framework.groovy to fail execution if report generation fails

Issue checkstyle#14344: Fix GenericWhitespace Check ignoring exception to the '>' rule for succeeding whitespaces

Pull checkstyle#14503: improve text block grammar

Issue checkstyle#13213: Remove '//ok' comments from input files

Issue checkstyle#13213: Remove '//ok' comments from input files

Issue checkstyle#13213: Remove '//ok' comments from input files
kalpadiptyaroy pushed a commit to kalpadiptyaroy/checkstyle that referenced this issue Feb 27, 2024
….groovy to fail execution if report generation fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment