Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/scala-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ jobs:
scala-version: 2.13.5
runs-on: ubuntu-22.04
env:
# define Java options for both official sbt and sbt-extras
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

Copy link
Copy Markdown

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?

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown

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?

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown

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?

JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Dfile.encoding=UTF-8
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Dfile.encoding=UTF-8
steps:
- uses: actions/checkout@v3
- uses: olafurpg/setup-scala@v13
Expand Down