sagemath / docker-images

Dockerfiles for Sage
54 stars 18 forks source link

Out of space on build VM #15

Closed embray closed 8 years ago

embray commented 8 years ago

On the VM we're currently using for the builds I'm actually running out of space, since the sage images are so large:

/dev/vdc         30G   26G  2.4G  92% /var/lib/docker

This has made it difficult, for example, to build test versions of some of the images. Can we expand the size of this volume? @nthiery

embray commented 8 years ago

A different, but even worse problem, is that I can't seem to get sage to compile anymore. It's trying to compile gcc (should it even be doing that? I haven't figured out under what conditions it compiles its own gcc), and runs out of the memory upon hitting a particular source file:

             total       used       free     shared    buffers     cached
Mem:          7794       7691        103          0          0          9
-/+ buffers/cache:       7681        113
Swap:         1535       1535          0

That's so bad that I almost wonder if it's a bug in the gcc in the container. But it's also running with make -j8 so it might be trying to compile multiple large source files at the same time, and g++ seems to be very generous with itself.

embray commented 8 years ago

For reference:

g++ -c   -g -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../src/gcc -I../../src/gcc/. -I../../src/gcc/../include -I../../src/gcc/../libcpp/include -I/opt/sage/local/include -I/opt/sage/local/include -I/opt/sage/local/include  -I../../src/gcc/../libdecnumber -I../../src/gcc/../libdecnumber/bid -I../libdecnumber -I../../src/gcc/../libbacktrace    -o insn-automata.o -MT insn-automata.o -MMD -MP -MF ./.deps/insn-automata.TPo insn-automata.c
In file included from ../../src/gcc/c/c-decl.c:10543:0:
./gt-c-c-decl.h: In function 'void gt_ggc_mx_c_binding(void*)':
./gt-c-c-decl.h:93:50: warning: switch condition has type bool [-Wswitch-bool]
       switch (TREE_CODE ((*x).decl) == LABEL_DECL)
                                                  ^
./gt-c-c-decl.h: In function 'void gt_ggc_mx_lang_tree_node(void*)':
./gt-c-c-decl.h:148:61: warning: switch condition has type bool [-Wswitch-bool]
       switch (TREE_CODE (&((*x)).generic) == IDENTIFIER_NODE)
                                                             ^
./gt-c-c-decl.h: In function 'void gt_pch_nx_c_binding(void*)':
./gt-c-c-decl.h:735:50: warning: switch condition has type bool [-Wswitch-bool]
       switch (TREE_CODE ((*x).decl) == LABEL_DECL)
                                                  ^
./gt-c-c-decl.h: In function 'void gt_pch_nx_lang_tree_node(void*)':
./gt-c-c-decl.h:790:61: warning: switch condition has type bool [-Wswitch-bool]
       switch (TREE_CODE (&((*x)).generic) == IDENTIFIER_NODE)
                                                             ^
./gt-c-c-decl.h: In function 'void gt_pch_p_9c_binding(void*, void*, gt_pointer_operator, void*)':
./gt-c-c-decl.h:1372:46: warning: switch condition has type bool [-Wswitch-bool]
   switch (TREE_CODE ((*x).decl) == LABEL_DECL)
                                              ^
./gt-c-c-decl.h: In function 'void gt_pch_p_14lang_tree_node(void*, void*, gt_pointer_operator, void*)':
./gt-c-c-decl.h:1438:57: warning: switch condition has type bool [-Wswitch-bool]
   switch (TREE_CODE (&((*x)).generic) == IDENTIFIER_NODE)
                                                         ^
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
...
embray commented 8 years ago

Memory problem solved, I think--I had a small bug in the install script that was causing make to run as make -j instead of make -j8. That, combined with the fact that the kernel has memory overcommit enabled, was causing things to go out of control.

embray commented 8 years ago

@nthiery built a new VM with more resources that we can switch over to, so problem solved for now.