Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 558518 - dev-java/eclipse-ecj-4.4.2-r1: fail to emerge on hardened
Summary: dev-java/eclipse-ecj-4.4.2-r1: fail to emerge on hardened
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-23 22:36 UTC by Alex Efros
Modified: 2015-08-23 22:47 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Efros 2015-08-23 22:36:12 UTC
>>> Compiling source in /var/tmp/portage/dev-java/eclipse-ecj-4.4.2-r1/work ...
ejavac -d target/classes -encoding UTF-8 @sources.lst
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00006bb095000000, 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/eclipse-ecj-4.4.2-r1/work/hs_err_pid24740.log
 * ERROR: dev-java/eclipse-ecj-4.4.2-r1::gentoo failed (compile phase):
 *   ejavac failed
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 3692:  Called java-pkg-simple_src_compile
 *   environment, line 1610:  Called java-pkg-simple_verbose-cmd 'ejavac' '-d' 'target/classes' '-encoding' 'UTF-8' '@sources.lst'
 *   environment, line 1648:  Called ejavac '-d' 'target/classes' '-encoding' 'UTF-8' '@sources.lst'
 *   environment, line  634:  Called die
 * The specific snippet of code:
 *       ${compiler_executable} ${javac_args} "${@}" || die "ejavac failed"
 * 
 * If you need support, post the output of `emerge --info '=dev-java/eclipse-ecj-4.4.2-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-java/eclipse-ecj-4.4.2-r1::gentoo'`.
!!! When you file a bug report, please include the following information:
GENTOO_VM=icedtea-bin-7  CLASSPATH="" JAVA_HOME="/opt/icedtea-bin-7.2.5.5"
JAVACFLAGS="-source 1.6 -target 1.6" COMPILER=""
and of course, the output of emerge --info =eclipse-ecj-4.4.2


Here is related kernel log:
kern.alert: grsec: denied RWX mmap of <anonymous mapping> by /opt/icedtea-bin-7.2.5.5/bin/javac[javac:24741] uid/euid:250/250 gid/egid:250/250, parent /usr/lib64/portage/python3.4/ebuild.sh[ebuild.sh:24705] uid/euid:250/250 gid/egid:250/250
Comment 1 Alex Efros 2015-08-23 22:47:46 UTC
Looks like problem is here:

# paxctl-ng -v /opt/icedtea-bin-7.2.5.5/bin/javac
/opt/icedtea-bin-7.2.5.5/bin/javac:
	PT_PAX    : -em--
	XATTR_PAX : not found

After paxmarking it with -m I got same error but in different place:

>>> Compiling source in /var/tmp/portage/dev-java/eclipse-ecj-4.4.2-r1/work ...
ejavac -d target/classes -encoding UTF-8 @sources.lst
warning: [options] bootstrap class path not set in conjunction with -source 1.6
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
jar cf ecj.jar -C target/classes .
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00006f8459000000, 2555904, 1) failed; error='Operation not permitted' (errno=1)

kern.alert: grsec: denied RWX mmap of <anonymous mapping> by /opt/icedtea-bin-7.2.5.5/bin/jar[jar:27416] uid/euid:250/250 gid/egid:250/250, parent /usr/lib64/portage/python3.4/ebuild.sh[ebuild.sh:27360] uid/euid:250/250 gid/egid:250/250

After paxmarking it with -m too everything works fine.

So, looks like either dev-java/icedtea-bin-7.2.5.5 should be fixed to add paxmarking -m for javac and jar binaries, or dev-java/eclipse-ecj-4.4.2-r1 should be fixed to be able to build without using RWX mmap in javac and jar.