java-smt icon indicating copy to clipboard operation
java-smt copied to clipboard

Segmentation faults in unit tests on Linux and Windows

Open PhilippWendler opened this issue 4 years ago • 5 comments

I just pushed some non-code change, and unit tests failed on Travis and AppVeyor with crashes:

  • InterpolatingProverTest on Windows with OpenJDK 14 (log)
  • SolverStackTest, VariableNamesEscaperTest, and VariableNamesTest on Linux with OpenJDK 11 (log)

Note that it does not occur on GitLab in a container based on Ubuntu 18.04, nor locally for me on Ubuntu 20.04.

The crash on Linux could in theory have been triggered because of the bump from Ubuntu 18.04 to Ubuntu 20.04 for Travis CI, but this seems unlikely, especially given that it works for me locally on this version. It also seems not like a duplicate of #210 because only on Windows the crash was in a test with interpolation. Of course, the crashes might also be for different reasons, but the three crashes on Linux occurred at example the same piece of code.

PhilippWendler avatar May 21 '21 07:05 PhilippWendler

The problem might be caused by Scala (from Princess) and memory shortage. Maybe the used Scala version does not (always) work with the installed JVM version. I will take a look.

kfriedberger avatar May 21 '21 07:05 kfriedberger

I am unable to reproduce the problem on my local system. However, I can provide a few more details, from logs or related Java-issues:

  1. The failing build on WIndows was caused by Scala inside the JVM. It looks like ap.parser.CollectingVisitor::visit with a parallel running garbage collection is crashing. There is not much we can do about it.
  2. The failing build on Linux might be the same problem, or maybe a JVM bug. The log-files and core-dumps are missing in TravisCI, so we can only guess what happened. It does not look related to any binary library from our side. The strange part is that the JVM is always failing at the same code ok_to_convert(Node*, Node*)+0x15 which looks like a deterministic problem.

We can keep this issue open to further trace this problem. Maybe in the future a user reports the same problem in a deterministic way.

kfriedberger avatar May 26 '21 06:05 kfriedberger

Won't this be addressed or at least worked around such that CI is useful again and won't be ignored by developers?

Currently, everything is always red and it seems that there are several unrelated test failures that nobody noticed.

PhilippWendler avatar Aug 16 '21 13:08 PhilippWendler

This issue is quite high on my list, however it has not yet reached the top level. :smiley:
The CI does not always fail, but we had a failing JUnit test for Princess (disabled here), that flagged everything red for the last weeks.

kfriedberger avatar Aug 16 '21 16:08 kfriedberger