-
Notifications
You must be signed in to change notification settings - Fork 232
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
Add JVM args to fix sbt.ForkMain error #438
Add JVM args to fix sbt.ForkMain error #438
Conversation
3a8b937
to
fa5dcb7
Compare
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## master #438 +/- ##
=======================================
Coverage 91.30% 91.30%
=======================================
Files 18 18
Lines 828 828
Branches 55 47 -8
=======================================
Hits 756 756
Misses 72 72 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 | ||
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 | ||
# fixing this error after tests success: sbt.ForkMain failed with exit code 134 | ||
# https://stackoverflow.com/questions/33287424/strange-exception-in-sbt-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linked failed has a segfault in the jvm:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f8514592807, pid=2096, tid=2099
#
# JRE version: OpenJDK Runtime Environment (11.0.2+9) (build 11.0.2+9)
# Java VM: OpenJDK 64-Bit Server VM (11.0.2+9, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x792807] void G1FullGCMarker::mark_and_push<oopDesc*>(oopDesc**) [clone .isra.112]+0x47
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/runner/work/graphframes/graphframes/core.2096)
#
# An error report file with more information is saved as:
# /home/runner/work/graphframes/graphframes/hs_err_pid2096.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Exception in thread "Thread-6" java.io.EOFException
at java.base/java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:3062)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1561)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:430)
at org.scalatest.tools.Framework$ScalaTestRunner$Skeleton$1$React.react(Framework.scala:822)
at org.scalatest.tools.Framework$ScalaTestRunner$Skeleton$1.run(Framework.scala:811)
at java.base/java.lang.Thread.run(Thread.java:834)
so to me it looks very different from the failure in the stackoverflow thread.
Any good arguments why these changes would solve the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say the error in the CI
Exception in thread "Thread-6" java.io.EOFException
at java.base/java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:3062)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1561)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:430)
at org.scalatest.tools.Framework$ScalaTestRunner$Skeleton$1$React.react(Framework.scala:822)
at org.scalatest.tools.Framework$ScalaTestRunner$Skeleton$1.run(Framework.scala:811)
at java.base/java.lang.Thread.run(Thread.java:834)
...
sbt.ForkMain 42361 failed with exit code 134
and the error in Stackoverflow:
Exception in thread "Thread-159" java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2601)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1319)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
at sbt.React.react(ForkTests.scala:114)
at sbt.ForkTests$$anonfun$mainTestTask$1$Acceptor$2$.run(ForkTests.scala:74)
at java.lang.Thread.run(Thread.java:745)
sbt.ForkMain 59974 failed with exit code 134
look quite similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but the stackoverflow post claims that it is related the classpath being too long:
Almost certainly this is related to the Java classpath being too long when invoking sbt.ForkMain in certain linux distros. To avoid this I added
That seems like something one would be a reproducible errror? And it seems very unlikely that would be the root cause of the segmentation fault?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You would think that should be deterministic, but since GC is involved, this might be probabilistic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the issue that is mentioned in the stackoverflow post "Java classpath being too long when invoking sbt.ForkMain in certain linux distros" is referring to limits on arguments length of a process (https://www.in-ulm.de/~mascheck/various/argmax/) this is not something that has to do with the JVM or something were the GC would be involved?
Trying to fix:
https://github.com/graphframes/graphframes/actions/runs/6175843274/job/16763535111?pr=437#step:5:722