UniTime / unitime

Comprehensive University Timetabling System
http://www.unitime.org
Apache License 2.0
282 stars 163 forks source link

Ant built failure #114

Closed jgfoster closed 2 years ago

jgfoster commented 2 years ago

I've created a Docker image with the following:

FROM ubuntu:22.04
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y git vim
RUN git clone https://github.com/UniTime/unitime.git /opt/unitime
WORKDIR /opt/unitime
RUN apt-get install -y ant
ENTRYPOINT bash

I then connected to that image and ran ant (after fixing the deprecation warnings as proposed in #113):

root@c511ef11c0ab:/opt/unitime# ant
Buildfile: /opt/unitime/build.xml

load-properties:

clean:
   [delete] Deleting directory /opt/unitime/temp/build

set-debug-mode:

set-optimize-mode:

init:
    [mkdir] Created dir: /opt/unitime/temp/build

prepare:
     [echo] Build number: 3 (dev)
     [echo] Build date: Tue, 26 Jul 2022
[propertyfile] Updating property file: /opt/unitime/build.date
     [copy] Copying 2710 files to /opt/unitime/temp/build

compile-java:
    [javac] Compiling 2598 source files to /opt/unitime/temp/build
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

timetable-jar:
      [jar] Building jar: /opt/unitime/Distributions/timetable.jar

compile-gwt:
     [java] Compiling module org.unitime.timetable.gwt.UniTime
     [java]    Compiling 30 permutations
     [java]       Compiling permutation 0...
     [java]       Process output
     [java]          Compiling
     [java]             Compiling permutation 1...
     [java]       Process output
     [java]          Compiling
     [java]             Compiling permutation 2...
     [java]       Process output
     [java]          Compiling
     [java]             Compiling permutation 3...

BUILD FAILED
/opt/unitime/build.xml:109: Java returned: 137

Total time: 15 minutes 8 seconds

How should I investigate this?

tomas-muller commented 2 years ago

I guess that ant runs out of memory. Try to set ANT_OPTS with -Xmx1g before running ant. That is

export ANT_OPTS=-Xmx1g
ant

Though I have not seen this particular error before. From what I was able to find, it may mean that the process received signal 9 (SIGKILL), which is an unblockable kill. This could be an out-of-memory condition on the operating system, as the GWT build uses four threads, each allowed to allocate up to 2 GB of memory. You can try to change the build.xml here to set the number of local workers to just one.

jgfoster commented 2 years ago

With the change to use only one thread and ANT_OPTS environment variable, we get the following:

BUILD SUCCESSFUL
Total time: 80 minutes 18 seconds

Thanks for your suggestions.