Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 316543 - dev-java/icedtea-[6.1.10.4,7.2.2.1] fails to build on x86 due to bad stack alignment.
Summary: dev-java/icedtea-[6.1.10.4,7.2.2.1] fails to build on x86 due to bad stack al...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Andrew John Hughes
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-21 14:39 UTC by Philipp Riegger
Modified: 2018-02-07 17:54 UTC (History)
11 users (show)

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


Attachments
hs_err_pid30735.log as mentioned in error message (hs_err_pid30735.log,12.81 KB, text/plain)
2010-04-21 14:41 UTC, Philipp Riegger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Riegger 2010-04-21 14:39:16 UTC
I tried to install icedtea on an ~x86 and ~amd64 host. It failed on ~x86.

Reproducible: Always

Steps to Reproduce:
1. layman -a java-overlay
2. emerge icedtea

Actual Results:  
[lots of "Compiling..." messages]
Compiling /var/tmp/portage/dev-java/icedtea-6.1.8.0/work/icedtea6-1.8/openjdk/hotspot/src/share/vm/opto/idealGraphPrinter.cpp
Assembling /var/tmp/portage/dev-java/icedtea-6.1.8.0/work/icedtea6-1.8/openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_32.s
Compiling /var/tmp/portage/dev-java/icedtea-6.1.8.0/work/icedtea6-1.8/openjdk/hotspot/src/share/vm/runtime/vm_version.cpp
Linking vm...
Generating launcher.c
Linking launcher...
Making signal interposition lib...
Making SA debugger back-end...
/var/tmp/portage/dev-java/icedtea-6.1.8.0/work/icedtea6-1.8/openjdk/hotspot/agent/src/os/linux/ps_proc.c: In function 'read_lib_info':
/var/tmp/portage/dev-java/icedtea-6.1.8.0/work/icedtea6-1.8/openjdk/hotspot/agent/src/os/linux/ps_proc.c:256: warning: format '%lx' expects type 'long unsigned int *', but argument 3 has type 'intptr_t *'
All done.
java full version "1.6.0_18-b18"
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x4015b89d, pid=30735, tid=1086945504
#
# JRE version: 6.0_18-b18
# Java VM: OpenJDK Server VM (16.0-b13 mixed mode linux-x86 )
# Derivative: IcedTea6 1.8
# Distribution: Built on Gentoo Base System release 2.0.1 (Wed Apr 21 13:57:24 CEST 2010)
# Problematic frame:
# V  [libjvm.so+0x12089d]
#
# An error report file with more information is saved as:
# /var/tmp/portage/dev-java/icedtea-6.1.8.0/work/icedtea6-1.8/openjdk/build/linux-i586/hotspot/outputdir/linux_i486_compiler2/product/hs_err_pid30735.log
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
#
./test_gamma: line 12: 30735 Aborted                 ./${gamma:-gamma} -Xbatch -showversion Queens < /dev/null
make[4]: *** [product] Error 134
make[3]: *** [generic_build2] Error 2
make[2]: *** [product] Error 2
make[1]: *** [hotspot-build] Error 2
make: *** [stamps/icedtea.stamp] Error 2
 * ERROR: dev-java/icedtea-6.1.8.0 failed:
 *   make failed
 *
 * Call stack:
 *     ebuild.sh, line  48:  Called src_compile
 *   environment, line 4449:  Called die
 * The specific snippet of code:
 *       emake -j 1 || die "make failed"
 *
 * If you need support, post the output of 'emerge --info =dev-java/icedtea-6.1.8.0',
 * the complete build log and the output of 'emerge -pqv =dev-java/icedtea-6.1.8.0'.
 * This ebuild is from an overlay named 'java-overlay': '/mnt/space/gentoo/layman/java-overlay/'
!!! When you file a bug report, please include the following information:
GENTOO_VM=icedtea6-bin  CLASSPATH="" JAVA_HOME=""
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info
 * The complete build log is located at '/var/log/portage/dev-java:icedtea-6.1.8.0:20100421-115617.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/icedtea-6.1.8.0/temp/environment'.
 * S: '/var/tmp/portage/dev-java/icedtea-6.1.8.0/work/icedtea6-1.8'

>>> Failed to emerge dev-java/icedtea-6.1.8.0, Log file:

>>>  '/var/log/portage/dev-java:icedtea-6.1.8.0:20100421-115617.log'

Expected Results:  
I expected it to build and install icedtea on my system.

Portage 2.2_rc67 (default/linux/x86/10.0, gcc-4.4.3, glibc-2.11-r1, 2.6.33-gentoo-r1 i686)
=================================================================
System uname: Linux-2.6.33-gentoo-r1-i686-VIA_Esther_processor_1300MHz-with-gentoo-2.0.1
Timestamp of tree: Wed, 21 Apr 2010 00:45:01 +0000
app-shells/bash:     4.1_p5
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.5-r1, 3.1.2-r2
dev-python/pycrypto: 2.1.0
dev-util/cmake:      2.8.1-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.20.1
sys-devel/gcc:       4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=i686 -mmmx -msse -msse2 -msse3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-Os -march=i686 -mmmx -msse -msse2 -msse3 -pipe"
DISTDIR="/mnt/space/gentoo/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --alphabetical --binpkg-respect-use y --load-average=5 --with-bdeps y"
FEATURES="assume-digests buildpkg collision-protect distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="*.la"
LDFLAGS="-Wl,-O1,--hash-style=gnu,--sort-common,--as-needed"
MAKEOPTS="-j1 -s"
PKGDIR="/mnt/space/gentoo/packages/chris"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /mnt/space/gentoo/layman/stoile /mnt/space/gentoo/layman/x11 /mnt/space/gentoo/layman/java-overlay /mnt/space/gentoo/layman/java-experimental /mnt/space/gentoo/layman/xen /mnt/space/gentoo/layman/sugar /mnt/space/gentoo/layman/sunrise /mnt/space/gentoo/layman/gnome /mnt/space/gentoo/layman/mozilla /mnt/space/gentoo/layman/perl-experimental /mnt/space/gentoo/layman/nx /mnt/space/gentoo/layman/science /mnt/space/gentoo/layman/mysql /mnt/space/gentoo/layman/mpd /mnt/space/gentoo/layman/toolchain /mnt/space/gentoo/layman/dev-zero /mnt/space/gentoo/layman/openrc"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="acl apache2 bash-completion berkdb bzip2 caps cli cracklib crypt cups cxx dri fortran gd gdbm iconv idn ipv6 jpeg jpeg2k ldap logrotate lua lzo mmx modules mudflap mysql ncurses nls nptl nptlonly pam pcre perl pic png pppd python readline reflection session snmp spl sqlite sse sse2 sse3 ssl sysfs tcpd tiff unicode vhosts x86 xattr xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" 
Unset:  CPPFLAGS, CTARGET, FFLAGS, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Philipp Riegger 2010-04-21 14:41:05 UTC
Created attachment 228631 [details]
hs_err_pid30735.log as mentioned in error message
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2010-04-21 15:24:30 UTC
Does downgrading icedtea6-bin to the previous version help?
Comment 3 Philipp Riegger 2010-04-21 20:03:14 UTC
No, does not help. I'm trying other versions of icedtea at the moment. Bad thing is, it takes very very long until I get to the error.
Comment 4 Philipp Riegger 2010-04-21 20:07:57 UTC
Should I try with sun-jdk instead of icedtea6-bin?
Comment 5 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2010-04-21 21:14:03 UTC
(In reply to comment #4)
> Should I try with sun-jdk instead of icedtea6-bin?
 
No, you can't build it with sun-jdk. But you could try with gcj-jdk:
emerge gcj-jdk
JAVA_PKG_FORCE_VM=gcj-jdk emerge icedtea:6
Comment 6 Johannes Hirte 2010-04-23 15:07:27 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Should I try with sun-jdk instead of icedtea6-bin?
> 
> No, you can't build it with sun-jdk. But you could try with gcj-jdk:
> emerge gcj-jdk
> JAVA_PKG_FORCE_VM=gcj-jdk emerge icedtea:6
> 

I can confirm this error. Also previous versions of icedtea didn't work, neither with icedtea6-bin nor gjc-jdk.
Comment 7 Philipp Riegger 2010-04-23 20:23:43 UTC
Yes, it does not work with gcj-jdk. I get a different error, but I get an error.
Comment 8 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2010-04-25 17:04:11 UTC
Can you show the log with error using gcj-jdk then?
Comment 9 Philipp Riegger 2010-04-25 20:17:03 UTC
[next line very often]
/bin/sh: /var/tmp/portage/dev-java/icedtea-6.1.8.0/work/icedtea6-1.8/bootstrap/jdk1.6.0/bin/native2ascii: No such file or directory
>>>Making trim-image-jre @ Fri Apr 23 19:47:22 CEST 2010 ...
>>>Making trim-image-jdk @ Fri Apr 23 19:47:22 CEST 2010 ...
>>>Making process-image-jre @ Fri Apr 23 19:47:22 CEST 2010 ...
>>>Making process-image-jdk @ Fri Apr 23 19:47:22 CEST 2010 ...
>>>Making sec-files @ Fri Apr 23 19:47:23 CEST 2010 ...
>>>Making sec-files-win @ Fri Apr 23 19:47:24 CEST 2010 ...
>>>Making jgss-files @ Fri Apr 23 19:47:24 CEST 2010 ...
>>>Finished making images @ Fri Apr 23 19:47:24 CEST 2010 ...
Control build finished: 10-04-23 19:47
ecj-poured IcedTea is served: openjdk-ecj/build/linux-i586
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x40260cad, pid=30280, tid=1085176688
#
# JRE version: 6.0_18-b18
# Java VM: OpenJDK Client VM (16.0-b13 mixed mode linux-x86 )
# Derivative: IcedTea6 1.8
# Distribution: Built on Gentoo Base System release 2.0.1 (Fri Apr 23 17:29:24 CEST 2010)
# Problematic frame:
# V  [libjvm.so+0x4ecad]
#
# An error report file with more information is saved as:
# /var/tmp/portage/dev-java/icedtea-6.1.8.0/work/icedtea6-1.8/hs_err_pid30280.log
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
#
/bin/sh: line 6: 30280 Aborted                 bootstrap/jdk1.6.0/bin/java -version
bootstrap/jdk1.6.0/bin/java cannot be found or is corrupted.
make: *** [stamps/bootstrap-directory-symlink.stamp] Error 1
 * ERROR: dev-java/icedtea-6.1.8.0 failed:
 *   make failed
 * 
 * Call stack:
 *     ebuild.sh, line  48:  Called src_compile
 *   environment, line 4449:  Called die
 * The specific snippet of code:
 *       emake -j 1 || die "make failed"
 * 
 * If you need support, post the output of 'emerge --info =dev-java/icedtea-6.1.8.0',
 * the complete build log and the output of 'emerge -pqv =dev-java/icedtea-6.1.8.0'.
 * This ebuild is from an overlay named 'java-overlay': '/mnt/space/gentoo/layman/java-overlay/'
!!! When you file a bug report, please include the following information:
GENTOO_VM=gcj-jdk  CLASSPATH="" JAVA_HOME=""
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info
 * The complete build log is located at '/var/log/portage/dev-java:icedtea-6.1.8.0:20100423-152904.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/icedtea-6.1.8.0/temp/environment'.
 * S: '/var/tmp/portage/dev-java/icedtea-6.1.8.0/work/icedtea6-1.8'
Comment 10 Philipp Riegger 2010-04-25 20:18:25 UTC
That should be the right one. I don't have too much time at the moment, but I can do lots of testing in about a week.
Comment 11 Johannes Hirte 2010-04-29 19:26:33 UTC
Ok, I've digged a little into it. This is again the stack-alignment problem of gcc. Take a look at the instruction:

Instructions: (pc=0x4015b89d)
0x4015b88d:   10 39 c8 77 07 8d 4d d8 39 cf 76 37 f3 0f 6f 07
0x4015b89d:   66 0f 7f 00 8b 4f 10 89 4d d8 6a 02 83 c2 04 50

66 0f 7f is the MOVDQA command (if I'm not completely wrong), that needs a 16 byte alignment. Now take a look at the stackpointer:

Top of Stack: (sp=0xbfd04a18)

In dec this is 3218098712, a 2 byte alignment. This must leed to a segfault. So either disable SSE at all for icedtea or add -mstackrealign to CFLAGS. I've tested both on a Pentium4, and both works for me.
Comment 12 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2010-04-29 19:42:15 UTC
(In reply to comment #11)
> Ok, I've digged a little into it. This is again the stack-alignment problem of
> gcc. Take a look at the instruction:

What you mean by "again"? We had this bug before, or?

> either disable SSE at all for icedtea or add -mstackrealign to CFLAGS. I've
> tested both on a Pentium4, and both works for me.

Hmm, but the first comments show this crash in icedtea6-bin. If it's build wrong, how comes it crashes only for some poeple?
Comment 13 Johannes Hirte 2010-04-29 19:57:49 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > Ok, I've digged a little into it. This is again the stack-alignment problem of
> > gcc. Take a look at the instruction:
> 
> What you mean by "again"? We had this bug before, or?

I mean, that the problem with stack alignment is not new. Take a look at
http://bugs.gentoo.org/show_bug.cgi?id=151394
or
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41156

It's the same problem here.

> > either disable SSE at all for icedtea or add -mstackrealign to CFLAGS. I've
> > tested both on a Pentium4, and both works for me.
> 
> Hmm, but the first comments show this crash in icedtea6-bin. If it's build
> wrong, how comes it crashes only for some poeple?

No, it't in icedtea. It happens here:

./test_gamma: line 12: 30735 Aborted                 ./${gamma:-gamma} -Xbatch

This is a shell script that tests the new build icedtea.


Comment 14 Johannes Hirte 2010-04-29 22:24:31 UTC
> > Hmm, but the first comments show this crash in icedtea6-bin. If it's build
> > wrong, how comes it crashes only for some poeple?
> 
> No, it't in icedtea. It happens here:
> 
> ./test_gamma: line 12: 30735 Aborted                 ./${gamma:-gamma} -Xbatch
> 
> This is a shell script that tests the new build icedtea.
> 

Here is the content of test_gamma:

#!/bin/sh
# Generated by /var/tmp/portage/dev-java/icedtea-6.1.8.0/work/icedtea6-1.8/openjdk/hotspot/make/linux/makefiles/buildtree.make
. ./env.sh
if [ -z $JAVA_HOME ]; then { echo JAVA_HOME must be set to run this test.; exit 0; }; fi
if ! ${JAVA_HOME}/bin/java -d32 -fullversion 2>&1 > /dev/null
then
  echo JAVA_HOME must point to 32bit JDK.; exit 0;
fi
rm -f Queens.class
${JAVA_HOME}/bin/javac -d . /var/tmp/portage/dev-java/icedtea-6.1.8.0/work/icedtea6-1.8/openjdk/hotspot/make/test/Queens.java
[ -f gamma_g ] && { gamma=gamma_g; }
./${gamma:-gamma} -Xbatch -showversion Queens < /dev/null

and the content of the sourced env.sh:

# Generated by /var/tmp/portage/dev-java/icedtea-6.1.8.0/work/icedtea6-1.8/openjdk/hotspot/make/linux/makefiles/buildtree.make
: ${JAVA_HOME:=/var/tmp/portage/dev-java/icedtea-6.1.8.0/work/icedtea6-1.8/bootstrap/jdk1.6.0}
LD_LIBRARY_PATH=.:${JAVA_HOME}/jre/lib/i386/native_threads:${JAVA_HOME}/jre/lib/i386:
CLASSPATH=.:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/jre/lib/i18n.jar
HOTSPOT_BUILD_USER="root in hotspot"
export JAVA_HOME LD_LIBRARY_PATH CLASSPATH HOTSPOT_BUILD_USER
Comment 15 Ed Catmur 2010-05-31 02:47:17 UTC
Looking at hotspot/src/cpu/x86/vm/assembler_x86.cpp there are a large number of sites where the code generation code would have to be changed to maintain alignment (by dropping the stack before pushing arguments, etc.) and even this would not be sufficient if - as seems to be the case - other generated code plays with the stack, pushing and popping (etc.) outside of function call boilerplate.

I don't think fixing icedtea will be possible without the active assistance of the upstream developers, and have little confidence about how likely that would be to be forthcoming.  I'm going to try -mstackrealign and accept that x86-32 is no longer a commercially supported architecture :(
Comment 16 Miroslav Šulc gentoo-dev 2011-01-19 04:18:22 UTC
no traffic here. please reopen of the problem persists with the latest version.
Comment 17 onip 2011-01-19 08:19:14 UTC
This isn't solved. It is still happening with 6.1.9.4

The ebuild should, at least, force -mstackrealign so that compiling can complete.
The best would be to correctly patch sources, but I know this is quite overkilling
Comment 18 Serkan Kaba (RETIRED) gentoo-dev 2011-01-19 09:33:36 UTC
Reopening.
Comment 19 Miroslav Šulc gentoo-dev 2011-10-19 14:27:13 UTC
this version is not available anymore. please try latest version of the package. feel free to reopen the bug if the problem persists.
Comment 20 Ed Catmur 2011-10-27 22:26:19 UTC
Issue persists with 6.1.10.4.  Please reopen.
Comment 21 Ed Catmur 2011-10-27 22:29:01 UTC
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xb6caeedc, pid=3501, tid=3062184816
#
# JRE version: 6.0_22-b22
# Java VM: OpenJDK Server VM (20.0-b11 mixed mode linux-x86 )
# Derivative: IcedTea6 1.10.4
# Distribution: Built on Gentoo Base System release 2.1 (Thu Oct 27 22:56:16 BST 2011)
# Problematic frame:
# V  [libjvm.so+0x158edc]  Assembler::jmp_literal(unsigned char*, RelocationHolder const&)+0x8c
#
# An error report file with more information is saved as:
# /var/tmp/portage/dev-java/icedtea-6.1.10.4/work/icedtea6-1.10.4/openjdk.build/hotspot/outputdir/linux_i486_compiler2/product/hs_err_pid3501.log
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
#
./test_gamma: line 13:  3501 Aborted                 ./${gamma:-gamma} -Xbatch -showversion Queens < /dev/null
make[5]: *** [product] Error 134
make[5]: Leaving directory `/var/tmp/portage/dev-java/icedtea-6.1.10.4/work/icedtea6-1.10.4/openjdk.build/hotspot/outputdir'
Comment 22 Ed Catmur 2011-10-27 22:33:47 UTC
Please reopen this bug per above.  As mentioned above, there is a simple fix to force -mstackrealign on x86.
Comment 23 Ralph Sennhauser (RETIRED) gentoo-dev 2011-10-28 06:16:05 UTC
Reopen as per #c22
Comment 24 Ralph Sennhauser (RETIRED) gentoo-dev 2012-06-10 14:20:39 UTC
Please try icedtea-7.2.2.
Comment 25 Petr Zima 2012-08-01 21:23:47 UTC
(In reply to comment #24)
> Please try icedtea-7.2.2.

The bug is still present with icedtea-7.2.2.1 on ~x86 with -O3. As shown below, the problem is a call into libz. Recompiling zlib with -mstackrealign fixes it. I guess -O2 or -fno-tree-vectorize for zlib would also help.

[...]
/bin/mkdir -p /tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk.build-boot/jaxp


########################################################################
########################################################################
##### Entering jaxp for target(s) all                              #####
########################################################################

(cd  ./jaxp/make && \
 /usr/bin/make JDK_TOPDIR=/tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk-boot/jdk JDK_MAKE_SHARED_DIR=/tmp/pa
make[3]: Entering directory `/tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk-boot/jaxp/make'
cd .. && JAVA_HOME=/tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/bootstrap/jdk1.6.0 /usr/bin/ant -Djavac.target=7 -D
Apache Ant(TM) version 1.8.4 compiled on July 26 2012
cd .. && JAVA_HOME=/tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/bootstrap/jdk1.6.0 /usr/bin/ant -Djavac.target=7 -D
Buildfile: /tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk-boot/jaxp/build.xml

-banner:
     [echo] +---------------------------------------+
     [echo] + Starting ant project jaxp +
     [echo] +---------------------------------------+

-javac-jar-exists:

sanity:
     [echo] Sanity Settings:
     [echo] ant.home=/usr/share/ant-core
     [echo] ant.version=Apache Ant(TM) version 1.8.4 compiled on July 26 2012
     [echo] ant.java.version=1.7
     [echo] java.home=/usr/lib/icedtea7/jre
     [echo] java.version=1.7.0_05
     [echo] os.name=Linux
     [echo] os.arch=i386
     [echo] os.version=3.5.0-kotatko
     [echo] bootstrap.dir=/tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk.build-boot/langtools/dist/bootstrap
     [echo] javac.jar=/tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk.build-boot/langtools/dist/bootstrap/lib/
     [echo] javac.memoryInitialSize=256m
     [echo] javac.memoryMaximumSize=512m
     [echo] javac.source=7
     [echo] javac.debug=true
     [echo] javac.target=7
     [echo] javac.version.opt=
     [echo] javac.lint.opts=
     [echo] javac.no.jdk.warnings=-XDignore.symbol.file=true
     [echo] output.dir=/tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk.build-boot/jaxp
     [echo] build.dir=/tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk.build-boot/jaxp/build
     [echo] dist.dir=/tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk.build-boot/jaxp/dist
     [echo] 

init:
    [mkdir] Created dir: /tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk.build-boot/jaxp/build
    [mkdir] Created dir: /tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk.build-boot/jaxp/build/classes
    [mkdir] Created dir: /tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk.build-boot/jaxp/dist
    [mkdir] Created dir: /tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk.build-boot/jaxp/dist/lib

    [javac] Compiling 1925 source files to /tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk.build-boot/jaxp/bui
    [javac] #
    [javac] # A fatal error has been detected by the Java Runtime Environment:
    [javac] #
    [javac] #  SIGSEGV (0xb) at pc=0xb76e5380, pid=32029, tid=3064326976
    [javac] #
    [javac] # JRE version: 7.0_05-b21
    [javac] # Java VM: OpenJDK Client VM (23.0-b21 mixed mode linux-x86 )
    [javac] # Problematic frame:
    [javac] # C  [libz.so.1+0xa380]  inflateMark+0x69
    [javac] #
    [javac] # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" befor
    [javac] #
    [javac] # An error report file with more information is saved as:
    [javac] # /tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk-boot/jaxp/hs_err_pid32029.log
    [javac] #
    [javac] # If you would like to submit a bug report, please include
    [javac] # instructions on how to reproduce the bug and visit:
    [javac] #   http://icedtea.classpath.org/bugzilla
    [javac] #

BUILD FAILED
/tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk-boot/jaxp/build.xml:127: Compile failed; see the compiler erro

Total time: 4 seconds
make[3]: *** [all] Error 1
make[3]: Leaving directory `/tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk-boot/jaxp/make'
make[2]: *** [jaxp-build] Error 2
make[2]: Leaving directory `/tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk-boot'
make[1]: *** [build_product_image] Error 2
make[1]: Leaving directory `/tmp/paludis/dev-java-icedtea-7.2.2.1/work/icedtea-2.2.1/openjdk-boot'
make: *** [stamps/icedtea-boot.stamp] Error 2
Comment 26 Ed Catmur 2012-08-01 21:39:16 UTC
(In reply to comment #25)
> (In reply to comment #24)
> > Please try icedtea-7.2.2.
> 
> The bug is still present with icedtea-7.2.2.1 on ~x86 with -O3. As shown
> below, the problem is a call into libz. Recompiling zlib with -mstackrealign
> fixes it. I guess -O2 or -fno-tree-vectorize for zlib would also help.

The problem is with icedtea, not with zlib. The correct solution is to compile icedtea with -mstackrealign or to fix icedtea.
Comment 27 Petr Zima 2012-08-02 05:33:03 UTC
(In reply to comment #26)
> (In reply to comment #25)
> > (In reply to comment #24)
> > > Please try icedtea-7.2.2.
> > 
> > The bug is still present with icedtea-7.2.2.1 on ~x86 with -O3. As shown
> > below, the problem is a call into libz. Recompiling zlib with -mstackrealign
> > fixes it. I guess -O2 or -fno-tree-vectorize for zlib would also help.
> 
> The problem is with icedtea, not with zlib. The correct solution is to
> compile icedtea with -mstackrealign or to fix icedtea.

I have a bit of experience with these sse/stack alignment problems on x86. I know the culprit is icedtea, which calls into zlib in a wrong way, i.e. with unaligned stack. You are definitely right that the correct solution is to fix icedtea to respect the new stack aligning rules on x86 (required by sse).

But as I understand it, recompiling icedtea with -mstackrealign is no good. The realigning prologue in icedtea would not prevent it to break the alignment again just before calling into zlib. Haven't tried this, anyone has?

You need to realign the stack at the zlib's function entry point. That's where it is unaligned. Anyway recompiling just zlib with -mstackrealign definitely helped.
Comment 28 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-11-11 21:26:23 UTC
Still present in 7.2.4.1?
Comment 29 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-02-07 17:54:47 UTC
No reply for 4+ years, closing as obsolete.