Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 550312 - dev-java/icedtea-7.2.5.5 fails to build: test_gamma fails to allocate ~2,4 GiB of RWX memory.
Summary: dev-java/icedtea-7.2.5.5 fails to build: test_gamma fails to allocate ~2,4 Gi...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrew John Hughes
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-24 18:15 UTC by Jaak Ristioja
Modified: 2015-09-03 21:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.xz (build.log.xz,47.97 KB, text/plain)
2015-05-24 18:16 UTC, Jaak Ristioja
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaak Ristioja 2015-05-24 18:15:18 UTC
When upgrading from icedtea-7.2.5.4 to 7.2.5.5 I get the following error (using MAKEOPTS=-j1):

gmake[6]: Leaving directory '/var/tmp/portage/dev-java/icedtea-7.2.5.5/work/icedtea-2.5.5/openjdk.build/hotspot/outputdir/linux_amd64_compiler2/product'
cd linux_amd64_compiler2/product && ./test_gamma
Using java runtime at: /var/tmp/portage/dev-java/icedtea-7.2.5.5/work/icedtea-2.5.5/bootstrap/jdk1.6.0/jre
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000723f15000000, 2555904, 1) failed; error='Operation not permitted' (errno=1)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 2555904 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /var/tmp/portage/dev-java/icedtea-7.2.5.5/work/icedtea-2.5.5/openjdk.build/hotspot/outputdir/linux_amd64_compiler2/product/hs_err_pid9957.log
/var/tmp/portage/dev-java/icedtea-7.2.5.5/work/icedtea-2.5.5/openjdk/hotspot/make/linux/Makefile:310: recipe for target 'product' failed
gmake[5]: *** [product] Error 1
gmake[5]: Leaving directory '/var/tmp/portage/dev-java/icedtea-7.2.5.5/work/icedtea-2.5.5/openjdk.build/hotspot/outputdir

Relevant `dmesg` output:

grsec: denied RWX mmap of <anonymous mapping> by /var/tmp/portage/dev-java/icedtea-7.2.5.5/work/icedtea-2.5.5/openjdk.build/hotspot/outputdir/linux_amd64_compiler2/product/gamma[gamma:9958] uid/euid:250/250 gid/egid:250/250, parent /var/tmp/portage/dev-java/icedtea-7.2.5.5/work/icedtea-2.5.5/openjdk.build/hotspot/outputdir/linux_amd64_compiler2/product/test_gamma[test_gamma:9915] uid/euid:250/250 gid/egid:250/250
Comment 1 Jaak Ristioja 2015-05-24 18:16:37 UTC
Created attachment 403876 [details]
build.log.xz
Comment 2 Jaak Ristioja 2015-05-24 18:20:49 UTC
Portage 2.2.18 (python 3.4.1-final-0, hardened/linux/amd64/no-multilib, gcc-4.9.2, glibc-2.20-r2, 4.0.3-hardened x86_64)
=================================================================
KiB Mem:    16300152 total,  10101337 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Sat, 23 May 2015 00:45:01 +0000
sh bash 4.3_p33-r2
ld GNU gold (Gentoo 2.24 p1.4 2.24) 1.11
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.3_p33-r2::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r1::gentoo, 3.4.1::gentoo
dev-util/ccache:          3.1.9-r4::gentoo
dev-util/cmake:           2.8.12.2-r2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.13.11::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo
sys-devel/binutils:       2.24-r3::gentoo
sys-devel/gcc:            4.7.4::gentoo, 4.8.4::gentoo, 4.9.2::gentoo, 5.1.0::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -ggdb"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="-O2 -pipe -march=native -ggdb"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j12"
USE="64bit X a52 aac acl acpi alsa amd64 amr aspell avx avx2 bash-completion bidi boost bzip2 cairo canberra caps cdda cdr cli colord consolekit cracklib crypt cups custom-optimization cxx dbus directfb djvu doc dri dvd dvdr dvdread eds emboss enca encode evo exif faac faad fam fbcon ffmpeg firefox flac fluidsynth fontforge fortran gcrypt gif git gles glitz gmp gnuplot gnutls gphoto2 gpm gstreamer gtk gtk3 hardened hdri htmlhandbook iconv icu id3tag idn imagemagick introspection ipv6 jpeg justify kate kde kontact kpathsea ladspa lapack laptop latex lcms libedit libnotify lua lz4 lzma lzo mad mailwrapper matroska md5sum midi mikmod mmap mms mmx mmxext mng modplug modules mp3 mp4 mpeg mudflap ncurses nptl nptlonly ogg openal openexr opengl opus pam pax_kernel pcre pdf phonon pic plasma png policykit postscript ppds projectm qalculate qt4 readline reflection rrdtool rtmp scanner schroedinger sdl seccomp session smp sndfile source speex spell spl sqlite sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification subversion svg sysfs system-sqlite tbb tcpd theora threads tiff truetype ucs2 udev unicode urandom usb v4l v4l2 vaapi vdpau vorbis vpx wayland webkit webp wifi wmf x264 xattr xcb xcomposite xetex xft xinerama xorg xosd xprint xscreensaver xtpax xulrunner xv xvid zlib" ABI_X86="64" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" KERNEL="linux" LINGUAS="en et et_EE" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 3 James Le Cuirot gentoo-dev 2015-05-24 19:55:50 UTC
You are building on a grsec kernel. I don't know whether upstream really supports that. We run paxctl against binaries to be installed at the end of the build but it would appear that some binaries used during the build need to be adjusted earlier. Assigning to gnu_andrew to see what he thinks.
Comment 4 Andrew John Hughes 2015-06-12 21:30:37 UTC
Yes it is supported and I build on a hardened kernel regularly. Something is going wrong here.

This all looks fine:

checking if a PaX kernel is in use... yes
checking if a PaX utility was specified... /usr/sbin/paxmark.sh
checking if /usr/sbin/paxmark.sh is a valid executable file... yes
checking which options to pass to /usr/sbin/paxmark.sh... -m

and

echo "if [ -x \"/usr/sbin/paxmark.sh\" ]; then "; \
echo "  /usr/sbin/paxmark.sh -m ./\${GAMMA_PROG}"; \
echo "fi"; \

is present in the test_gamma script. 

Can you check that /usr/sbin/paxmark.sh -m actually works for you?

Does a bootstrap build work?
Comment 5 James Le Cuirot gentoo-dev 2015-06-28 22:39:28 UTC
Just a guess but you should check whether you have the appropriate PAX_MARKINGS setting in your make.conf. It defaults to PT but you may need XT for your system or even both.
Comment 6 James Le Cuirot gentoo-dev 2015-09-02 23:09:07 UTC
Please test the newest version in the tree as it has some PaX fixes. Also take my previous comment into consideration.
Comment 7 Jaak Ristioja 2015-09-03 18:12:51 UTC
(In reply to Andrew John Hughes from comment #4)
> Can you check that /usr/sbin/paxmark.sh -m actually works for you?

# /usr/sbin/paxmark.sh -m
/usr/sbin/paxmark.sh: line 90: source: /etc/portage/make.conf: is a directory

> Does a bootstrap build work?

What do you mean? USE=jbootstrap?
Comment 8 James Le Cuirot gentoo-dev 2015-09-03 21:10:30 UTC
(In reply to Jaak Ristioja from comment #7)
> /usr/sbin/paxmark.sh: line 90: source: /etc/portage/make.conf: is a directory

That is a bug in sys-apps/elfix and I will make blueness aware of it. He must have missed the memo about make.conf being a directory. So did I actually. I don't believe this is causing it to fail though. It will just fail to read your PAX_MARKINGS setting, which you probably haven't changed anyway.

> What do you mean? USE=jbootstrap?

Yes.