2014年3月8日土曜日

Swap_pager: out of swap space


-c -o gnu/java/nio/charset.lo -fsouce-filename=/usr/ports/lang/gcc/word MP -Mk/build/i386-portbld-freebsd8.4/libjava/classpath/lib/classes -MT gnu/java/nio/charset.lo -MD -MP -MF gnu/java/nio/charset.deps @gnu/java/nio//charset.list libtool: compile  /usr/ports/lang...


Swap_pager: out of swap space
Swap_pager_getswapspace(16): failed
Mar 8 11:37 freebsdpc kernel :pid 14535 (jc1), uid 0, was killed: out of swap space

gcj: internal compiler error: Killed: 9 (program jc1)
Please submit a full bug report, with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
gmake[3]: *** [gnu/java/nio/charset.lo] Error 1
gmake[3]: Leaving directory '/usr/ports/lang/gcc/work/build/i386-portbled-freebsd8.4/libjava'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory '/usr/ports/lang/gcc/work/build/i386-portbled-freebsd8.4/libjava'
gmake[1]: *** [all-target-libjava] Error 2
gmake[1]: Leaving directory '/usr/ports/lang/gcc/work/build'
gmake: *** [all] Error 2
*** Error code 1

Stop in /usr/ports/lang/gcc.
*** Error code 1

Stop in /usr/ports/lang/gcc.
*** Error code 1

Stop in /usr/ports/www/firefox.
*** Error code 1

Stop in /usr/ports/www/firefox.
root@freeebsdpc:/usr/ports/wwwfirerox # \


shhdを設定して導入済みの一覧でも取っておくか



root@freebsdpc:~ # pkg_info
bigreqsproto-1.1.1  BigReqs extension headers
binutils-2.23.1     GNU binary tools
bison-2.7,1         A parser generator from FSF, (mostly) compatible with Yacc
cairo-1.10.2_5,2    Vector graphics library with cross-device output support
cmake-2.8.10.2      Cross-platform Makefile generator
cmake-modules-2.8.10.2 Modules and Templates for CMake
dialog4ports-0.1.3  Console Interface to configure ports
en-freebsd-doc-41380_1,1 Documentation from the FreeBSD Documentation Project
expat-2.0.1_2       XML 1.0 parser written in C
fontconfig-2.9.0,1  An XML-based font configuration API for X Windows
freetype2-2.4.11    A free and portable TrueType font rendering engine
gamin-0.1.10_5      A file and directory monitoring system
gcc-ecj-4.5         Eclipse Java Compiler used to build GCC Java
gettext-0.18.1.1_1  GNU gettext package
gio-fam-backend-2.34.3 FAM backend for GLib\'s GIO library
glib-2.34.3         Some useful routines of C programming (current stable versi
gmake-3.82_1        GNU version of 'make' utility
gmp-5.1.1           A free library for arbitrary precision arithmetic
inputproto-2.0.2    Input extension headers
kbproto-1.0.5       KB extension headers
libX11-1.4.4,1      X11 library
libXau-1.0.6        Authentication Protocol library for X11
libXdmcp-1.1.0      X Display Manager Control Protocol library
libXrender-0.9.6    X Render extension library
libcheck-0.9.9      A unit test framework for C
libffi-3.0.13       Foreign Function Interface
libgcrypt-1.5.0_1   General purpose crypto library based on code used in GnuPG
libgpg-error-1.11   Common error values for all GnuPG components
libiconv-1.14_1     A character set conversion library
libpthread-stubs-0.3_3 This library provides weak aliases for pthread functions
libtool-2.4.2       Generic shared library support script
libxcb-1.7          The X protocol C-language Binding (XCB) library
libxml2-2.8.0_1     XML parser library for GNOME
libxslt-1.1.28      The XSLT C library for GNOME
m4-1.4.16_1,1       GNU m4
mpc-0.9             Library of complex numbers with arbitrarily high precision
mpfr-3.1.2          A library for multiple-precision floating-point computation
nspr-4.9.6          A platform-neutral API for system level and libc like funct
nss-3.14.3          Libraries to support development of security-enabled applic
pcre-8.32           Perl Compatible Regular Expressions library
perl-5.14.2_3       Practical Extraction and Report Language
pixman-0.24.2       Low-level pixel manipulation library
pkgconf-0.9.1_2     Utility to help to configure compiler and linker flags
png-1.5.14          Library for manipulating PNG images
py27-sqlite3-2.7.3_3 Standard Python binding to the SQLite3 library
python27-2.7.3_6    An interpreted object-oriented programming language
renderproto-0.11.1  RenderProto protocol headers
sqlite3-3.7.14.1    An SQL database engine in a C library
v4l_compat-1.0.20120501_1 Video4Linux IOCTL header files
xcb-proto-1.7.1     The X protocol C-language Binding (XCB) protocol
xcb-util-0.3.9_1,1  A module with libxcb/libX11 extension/replacement libraries
xcb-util-renderutil-0.3.8 Convenience functions for the Render extension
xcmiscproto-1.2.1   XCMisc extension headers
xextproto-7.2.0     XExt extension headers
xf86bigfontproto-1.2.0 XFree86-Bigfont extension headers
xorg-macros-1.16.1  X.Org development aclocal macros
xproto-7.0.22       X11 protocol headers
xtrans-1.2.6        Abstract network code for X
zip-3.0             Create/update ZIP files compatible with PKZIP
root@freebsdpc:~ #



さて、ここからどうしたものやら。無知な男は辛いよトラ次郎。


cd /usr/ports/www/firefox
make install clean

ってオイコラ頭悪いだろ自分。gmakeから動き始めこそしたが、半日経ってまたswapエラーかも。浅はかな電気の無駄になりかねない。


再発:


gmake[3]: Entering directory `/usr/ports/lang/gcc/work/build/i386-portbld-freebsd8.4/libjava'
/bin/sh ./libtool --tag=GCJ   --mode=compile /usr/ports/lang/gcc/work/build/./gcc/gcj -B/usr/ports/lang/gcc/work/build/i386-portbld-freebsd8.4/libjava/ -B/usr/ports/lang/gcc/work/build/./gcc/ -B/usr/local/i386-portbld-freebsd8.4/bin/ -B/usr/local/i386-portbld-freebsd8.4/lib/ -isystem /usr/local/i386-portbld-freebsd8.4/include -isystem /usr/local/i386-portbld-freebsd8.4/sys-include    -ffloat-store -fomit-frame-pointer -Usun -fclasspath= -fbootclasspath=../.././../gcc-4.6.3/libjava/classpath/lib --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2  -c -o gnu/java/nio/charset.lo -fsource-filename=/usr/ports/lang/gcc/work/build/i386-portbld-freebsd8.4/libjava/classpath/lib/classes -MT gnu/java/nio/charset.lo -MD -MP -MF gnu/java/nio/charset.deps @gnu/java/nio/charset.list
libtool: compile:  /usr/ports/lang/gcc/work/build/./gcc/gcj -B/usr/ports/lang/gcc/work/build/i386-portbld-freebsd8.4/libjava/ -B/usr/ports/lang/gcc/work/build/./gcc/ -B/usr/local/i386-portbld-freebsd8.4/bin/ -B/usr/local/i386-portbld-freebsd8.4/lib/ -isystem /usr/local/i386-portbld-freebsd8.4/include -isystem /usr/local/i386-portbld-freebsd8.4/sys-include -ffloat-store -fomit-frame-pointer -Usun -fclasspath= -fbootclasspath=../.././../gcc-4.6.3/libjava/classpath/lib --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -c -fsource-filename=/usr/ports/lang/gcc/work/build/i386-portbld-freebsd8.4/libjava/classpath/lib/classes -MT gnu/java/nio/charset.lo -MD -MP -MF gnu/java/nio/charset.deps @gnu/java/nio/charset.list  -fPIC -o gnu/java/nio/.libs/charset.o





gcj: internal compiler error: Killed: 9 (program jc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
gmake[3]: *** [gnu/java/nio/charset.lo] Error 1
gmake[3]: Leaving directory `/usr/ports/lang/gcc/work/build/i386-portbld-freebsd8.4/libjava'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/ports/lang/gcc/work/build/i386-portbld-freebsd8.4/libjava'
gmake[1]: *** [all-target-libjava] Error 2
gmake[1]: Leaving directory `/usr/ports/lang/gcc/work/build'
gmake: *** [all] Error 2
*** Error code 1

Stop in /usr/ports/lang/gcc.
*** Error code 1

Stop in /usr/ports/lang/gcc.
*** Error code 1

Stop in /usr/ports/www/firefox.
*** Error code 1

Stop in /usr/ports/www/firefox.
root@freebsdpc:/usr/ports/www/firefox #

# pstat -s
Device          1K-blocks     Used    Avail Capacity
/dev/ad0s1b        332648     8908   323740     3%


根本的にswapファイルを増やすしかない。


NOBWAK'S LAIRさん
http://april.fool.jp/blogs/tag/freebsd/

UNIXの部屋さん
http://x68000.q-e-d.net/~68user/unix/pickup?df


swapファイルをddコマンドで作成

dd if=/dev/zero of=/var/cache/swapfile bs=1m count=1024

ちょっと時間がかかる。

# dd if=/dev/zero of=/var/cache/swapfile bs=1m count=1024
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 49.177941 secs (21833810 bytes/sec)

サイズを確認。

# du -sh /var/cache/swapfile
1.0G    /var/cache/swapfile

 属性を変更と確認

# chmod 0600 /var/cache/swapfile

# ls -alF /var/cache/swapfile
-rw-------  1 root  wheel  1073741824 Mar  8 16:35 /var/cache/swapfile


 ここでmdconfigコマンド
http://www.jp.freebsd.org/cgi/mroff.cgi?subdir=man&lc=1&cmd=&man=mdconfig&dir=jpman-6.0.0%2Fman&sect=0


NOBWAKさんが教えてくださっているところは

sudo mdconfig -a -t vnode -f /var/cache/swapfile -u 0 && sudo swapon /dev/md0

これをこうすればいいかたぶん

mdconfig -a -t vnode -f /var/cache/swapfile -u 0 && swapon /dev/md0

-a メモリディスクをアタッチ

-t vnode -f ファイル で「指定されたファイルがメモリディスクのため のバッキングストアになります。」

-u ユニット

ここでは0になっているがおそらくHDDが1基だけなのでこのようになる、のか?

swapon(8)
http://www.jp.freebsd.org/cgi/mroff.cgi?subdir=man&lc=1&cmd=&man=swapon&dir=jpman-8.4.2%2Fman&sect=0


# swapinfo
Device          1K-blocks     Used    Avail Capacity
/dev/ad0s1b        332648     8852   323796     3%
/dev/md0          1048576        0  1048576     0%
Total             1381224     8852  1372372     1%

md0になっている。


とりあえずインストールを再試行。

0 件のコメント:

コメントを投稿