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

Symbol$CompletionFailure crash when building CFG #6396

Closed
msridhar opened this issue Jan 13, 2024 · 0 comments · Fixed by #6397
Closed

Symbol$CompletionFailure crash when building CFG #6396

msridhar opened this issue Jan 13, 2024 · 0 comments · Fixed by #6397
Assignees
Labels

Comments

@msridhar
Copy link
Contributor

msridhar commented Jan 13, 2024

To reproduce clone the following repo:

https://github.com/msridhar/cf-cfg-crash-example

Then run ./gradlew compileJava. I see (with CF 3.42.0):

> Task :lib:compileJava FAILED
error: SourceChecker.typeProcess: unexpected Throwable (CompletionFailure) while processing /Users/msridhar/git-repos/cf-cfg-crash-example/lib/src/main/java/net/sridharan/cfgcrash/Library.java; message: class file for org.apache.spark.sql.SparkSession$1 not found
  ; The Checker Framework crashed.  Please report the crash.  Version: Checker Framework 3.42.0.
  Compilation unit: /Users/msridhar/git-repos/cf-cfg-crash-example/lib/src/main/java/net/sridharan/cfgcrash/Library.java
  Last visited tree at line 8 column 1:
  public class Library {
  Exception: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for org.apache.spark.sql.SparkSession$1 not found; com.sun.tools.javac.code.Symbol$CompletionFailure: class file for org.apache.spark.sql.SparkSession$1 not found
1 error

I see the same crash with CF 3.41.0 but not with 3.40.0. The class org.apache.spark.sql.SparkSession$1 does not exist in the library org.apache.spark:spark-sql_2.12:3.3.2. I couldn't convince Gradle / javac to print a full stack trace here, sorry. We can work around this issue in NullAway by downgrading to Checker Framework 3.40.0.

When debugging the same crash in NullAway I found that it occurs during phase 1 of CFG construction for this method. I wonder if this has to do with the new try-with-resources desugaring; will take a look.

@msridhar msridhar added the crash label Jan 13, 2024
msridhar added a commit to uber/NullAway that referenced this issue Jan 14, 2024
This fixes a regression where we were seeing a crash in CFG
construction. Reported upstream as
typetools/checker-framework#6396.
msridhar added a commit to uber/NullAway that referenced this issue May 20, 2024
The previous bug that was preventing us from upgrading
(typetools/checker-framework#6396) is fixed in
this release. Benchmarks show no performance regression.
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 a pull request may close this issue.

2 participants