Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 568950 - dev-java/icedtea-7.2.6.3-r2 hangs during awt build
Summary: dev-java/icedtea-7.2.6.3-r2 hangs during awt build
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-12-21 07:59 UTC by Jeroen Roovers (RETIRED)
Modified: 2018-06-21 18:34 UTC (History)
3 users (show)

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


Attachments
dev-java:icedtea-7.2.6.3-r2:20151220-160548.log.xz (dev-java:icedtea-7.2.6.3-r2:20151220-160548.log.xz,458.59 KB, application/x-xz)
2015-12-21 07:59 UTC, Jeroen Roovers (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2015-12-21 07:59:40 UTC
Created attachment 419968 [details]
dev-java:icedtea-7.2.6.3-r2:20151220-160548.log.xz

Building icedtea with no DISPLAY hangs reproducibly at building awt at:

.../work/icedtea-2.6.3/bootstrap/jdk1.6.0/bin/java [..] .../work/icedtea-2.6.3/openjdk.build/tmp/sun/sun.awt/awt/classes  \
        -Djava.awt.headless=true


[ebuild  N    *] dev-java/icedtea-7.2.6.3-r2:7::gentoo  USE="alsa cups gtk jbootstrap kerberos sunec -cacao -cjk -debug -doc -examples -headless-awt (-infinality) -jamvm -javascript (-nsplugin) -nss -pax_kernel -pulseaudio -sctp (-selinux) -smartcard -source {-test} (-webstart) -zero" 0 KiB

Mon Dec 21 08:59:07 CET 2015
emerge --info dev-java/icedtea
Portage 2.2.24 (python 3.4.3-final-0, default/linux/powerpc/ppc64/13.0/64bit-userland, gcc-4.9.3, glibc-2.21-r1, 4.1.12-gentoo ppc64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.1.12-gentoo-ppc64-PPC970FX,_altivec_supported-with-gentoo-2.2
KiB Mem:     8072620 total,    337096 free
KiB Swap:    1048572 total,   1037392 free
Timestamp of repository gentoo: Mon, 21 Dec 2015 03:15:01 +0000
sh bash 4.3_p39
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
distcc 3.2rc1 powerpc64-unknown-linux-gnu [enabled]
app-shells/bash:          4.3_p39::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.3.5-r1::gentoo, 3.4.3::gentoo, 3.5.0-r1::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.18.4::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, 1.15::gentoo
sys-devel/binutils:       2.24-r3::gentoo, 2.25.1-r1::gentoo
sys-devel/gcc:            4.7.4::gentoo, 4.8.4::gentoo, 4.8.5::gentoo, 4.9.3::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.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /world/gentoo/portage
    sync-type: rsync
    sync-uri: rsync://rsync.nl.gentoo.org/gentoo-portage
    priority: 0

JeR
    location: /aches/gentoo/local
    masters: gentoo
    priority: 10000

ACCEPT_KEYWORDS="ppc64"
ACCEPT_LICENSE="*"
CBUILD="powerpc64-unknown-linux-gnu"
CFLAGS="-O2 -ggdb -mcpu=G5 -mtune=G5 -Wall"
CHOST="powerpc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib/ccache/bin /usr/lib/distcc/bin /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/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="-O2 -ggdb -mcpu=G5 -mtune=G5 -Wall"
DISTDIR="/aches/gentoo/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --keep-going"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg cgroup compressdebug config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync metadata-transfer multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms sign splitdebug strict test test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS=" http://mirror.netcologne.de/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gentoo.tiscali.nl/ http://mirror.leaseweb.com/gentoo/ "
LANG="en_GB.utf8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/aches/gentoo/packages/martijn"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl alsa altivec apache2 avahi berkdb botan bzip2 cairo cli consolekit cracklib crypt cups cxx dri drm evdev fontforge fortran fusionsound gadu gdbm gstreamer http2 ibm iconv idn introspection ipv6 jpeg jpeg2k kerberos lcms lensfun lua modules mpi multilib multislot multitarget natspec ncurses nethack nls nptl offensive ofono-headset opengl openmp pam pcre png ppc64 qt3support qt4 r600-llvm-compiler raw readline rubberband rubytests scanner sdl session ssl tcl tcmalloc tcpd theora threads tiff tk truetype unicode vpx webp xattr zlib" ABI_PPC="64" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="gnutls" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_GB en nl" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="modesetting radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 James Le Cuirot gentoo-dev 2015-12-21 09:49:05 UTC
I don't have physical access to timberdoodle so I always build without DISPLAY. I am familiar with this precise point in the build because I also had problems with it hanging. After much trial and error, this turned out to be because the kernel had CONFIG_COMPAT_BRK enabled.

"On non-ancient distros (post-2000 ones) N is usually a safe choice."

I was already very surprised that someone had enabled this so I'd be even more surprised if you have too. You can turn the option on or off without rebooting by setting /proc/sys/kernel/randomize_va_space to 1 (on) or 2 (off). Please test and report back.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2015-12-21 10:21:25 UTC
I have no idea what you are talking about.

DISPLAY isn't set at all (and shouldn't be in a headless setup).
CONFIG_COMPAT_BRK is disabled in the kernel.
/proc/sys/kernel/randomize_va_space happens to be set to 2.

None of these should matter.
Comment 3 James Le Cuirot gentoo-dev 2015-12-21 10:47:35 UTC
(In reply to Jeroen Roovers from comment #2)
> DISPLAY isn't set at all (and shouldn't be in a headless setup).

Right and I was implying that it's always worked fine for me. I have built icedtea on timberdoodle without DISPLAY countless times and the result of that is used to generate icedtea-bin.

> CONFIG_COMPAT_BRK is disabled in the kernel.
> /proc/sys/kernel/randomize_va_space happens to be set to 2.
> 
> None of these should matter.

CONFIG_COMPAT_BRK was definitely the culprit in my case so I thought I should mention it but evidently it's something else here.

Were you suggesting that it does work if you do have a DISPLAY available? Probably not.

When this happened to me, I was able to reduce the problem down to a very simple test program so give this a try.

import javax.imageio.*;

public class Test {
  public static void main(String[] args) {
    ImageIO.scanForPlugins();
  }
}

After the build fails, compile that with /var/tmp/portage/dev-java/icedtea-7.2.6.3-r2/work/icedtea-2.6.3/bootstrap/jdk1.6.0/bin/javac and then run it with /var/tmp/portage/dev-java/icedtea-7.2.6.3-r2/work/icedtea-2.6.3/bootstrap/jdk1.6.0/bin/java.

Note my original issue was reported upstream at http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2693.
Comment 4 James Le Cuirot gentoo-dev 2015-12-21 10:54:36 UTC
Gah, forgot what I was going to say because I was interrupted a dozen times. I notice that you have selected HotSpot (implicitly by not enabling the cacao flag). As mentioned elsewhere, I have had trouble with HotSpot on timberdoodle even though upstream hasn't been able to reproduce the problem at all on RHEL. It is definitely a race condition because it works fine under "taskset -c 0" so you could try this or try enabling the cacao flag to see if it makes any difference. I have tried very hard to identify the cause but my best guess is a bad/old kernel and I'm not allowed to mess with that.
Comment 5 James Le Cuirot gentoo-dev 2015-12-21 10:57:48 UTC
...and it exhibits itself as a sudden crash or segfault as soon as it tries to execute the newly-built VM. This issue is reported here:

http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2368

Sorry for the noise, my brain also suffers from race conditions. :)
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2015-12-21 15:07:56 UTC
portage  13881 99.9  0.3 2158680 24948 pts/4   RNl+ 11:22 284:14 /var/tmp/portage/dev-java/icedtea-7.2.6.3-r2/work/icedtea-2.6.3/bootstrap/jdk1.6.0/bin/java -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput -Xmx1792m -Xms1792m -XX:PermSize=32m -XX:MaxPermSize=160m -cp /var/tmp/portage/dev-java/icedtea-7.2.6.3-r2/work/icedtea-2.6.3/openjdk.build/tmp/sun/sun.awt/awt/classes -Djava.awt.headless=true sun.awt.ToBin

Maybe that isn't caused by a display or lack thereof since it should have access now and yet it's been churning for hours.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2015-12-21 20:00:43 UTC
(In reply to James Le Cuirot from comment #4)
> Gah, forgot what I was going to say because I was interrupted a dozen times.
> I notice that you have selected HotSpot (implicitly by not enabling the
> cacao flag).

I'll give that USE=cacao a go, then.
Comment 8 James Le Cuirot gentoo-dev 2016-04-10 22:14:30 UTC
I'm going to assume that icedtea-3 works now. icedtea-7 just never worked that well on ppc64 and we've since dropped the keyword.
Comment 9 ernsteiswuerfel archtester 2018-06-21 17:57:09 UTC
I guess this can be closed as 7.2.6.3-r2 is no longer in tree?
Comment 10 James Le Cuirot gentoo-dev 2018-06-21 18:34:31 UTC
(In reply to ernsteiswuerfel from comment #9)
> I guess this can be closed as 7.2.6.3-r2 is no longer in tree?

It is already RESOLVED.