NetBSD Problem Report #46165

From wiz@yt.nih.at  Sat Mar 10 10:13:24 2012
Return-Path: <wiz@yt.nih.at>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id A838A63BA17
	for <gnats-bugs@gnats.netbsd.org>; Sat, 10 Mar 2012 10:13:24 +0000 (UTC)
Message-Id: <20120310101215.86D1939E26C@yt.nih.at>
Date: Sat, 10 Mar 2012 11:12:15 +0100 (CET)
From: Thomas Klausner <wiz@NetBSD.org>
Reply-To: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@gnats.NetBSD.org
Subject: openjdk7 hangs in build with 100% CPU
X-Send-Pr-Version: 3.95


>Number:         46165
>Category:       kern
>Synopsis:       openjdk7 hangs in build with 100% CPU
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 10 10:15:05 +0000 2012
>Last-Modified:  Wed Apr 18 03:45:01 +0000 2012
>Originator:     Thomas Klausner
>Release:        NetBSD 6.99.3
>Organization:
Curiosity is the very basis of education and if you tell me that 
curiosity killed the cat, I say only that the cat died nobly.
- Arnold Edinborough
>Environment:

	

	
System: NetBSD yt 6.99.3 NetBSD 6.99.3 (YT) #3: Fri Mar 9 15:20:11 CET 2012 wiz@yt:/archive/cvs/src/sys/arch/amd64/compile/obj/YT amd64
Architecture: x86_64
Machine: amd64
>Description:
While openjdk7 does take some time building (but less than an hour
on my machine), in my recent bulk builds it hangs very quickly with a process
that so far has taken over 7 hours at 100% CPU without making progress.


My last successful build was on March 5 (using a March 4 snapshot).


Since there were no changes to the package, my guess is that it is a problem
in backwards compatibility. Here's the link list for the process:
sandbox/scratch/lang/openjdk7/work/bootstrap/bin/java:
        -lz.1 => /usr/lib/libz.so.1
        -lgcc_s.1 => /lib/libgcc_s.so.1
        -lc.12 => /usr/lib/libc.so.12
        -lpthread.1 => /usr/lib/libpthread.so.1


So probably the pthread changes.


work.log ends with:
[*] /scratch/lang/openjdk7/work/.wrapper/bin/gcc /scratch/lang/openjdk7/work/.wrapper/bin/gcc --verbose
WARNING: [transform-gcc] passing unknown option --verbose
<.> /scratch/lang/openjdk7/work/.gcc/bin/gcc --verbose -I/scratch/lang/openjdk7/work/.buildlink/include -L/scratch/lang/openjdk7/work/.buildlink/lib
[*] /scratch/lang/openjdk7/work/.wrapper/bin/gcc /scratch/lang/openjdk7/work/.wrapper/bin/gcc -dumpversion
WARNING: [transform-gcc] passing unknown option -dumpversion
<.> /scratch/lang/openjdk7/work/.gcc/bin/gcc -dumpversion -I/scratch/lang/openjdk7/work/.buildlink/include -L/scratch/lang/openjdk7/work/.buildlink/lib


I guess that's from the configure script.


build.log ends with:
WARNING: [license.mk] Every package should define a LICENSE.
===> Building for openjdk7-1.7.0.147.20110811nb2
=> adding X11 run path flags to Makefiles
=> fixing font paths
ulimit -d `ulimit -H -d`; ulimit -s `ulimit -H -s`; cd /scratch/lang/openjdk7/work/openjdk && /usr/bin/env PKGSRC_ZIPEXE=/usr/pkg/bin/zip PKGSRC_UNZIP=/usr/pkg/bin/unzip PKGSRC_UNZIPSFX=/usr/pkg/bin/unzipsfx ALT_BOOTDIR=/scratch/lang/openjdk7/work/bootstrap ALT_DROPS_DIR=/distfiles/openjdk7 ALT_FREETYPE_LIB_PATH=/usr/X11R7/lib ALT_FREETYPE_HEADERS_PATH=/usr/X11R7/include ALT_CUPS_HEADERS_PATH=/usr/pkg/include ALT_COMPILER_PATH=/scratch/lang/openjdk7/work/.wrapper/bin ALT_PACKAGE_PATH=/usr/pkg ALT_X11_PATH=/usr/X11R7 RHINO_JAR=/scratch/lang/openjdk7/work/rhino1_7R3/js.jar ALT_PARALLEL_COMPILE_JOBS=16 HOTSPOT_BUILD_USER=pkgsrc NO_DOCS=true SKIP_COMPARE_IMAGES=true SKIP_FASTDEBUG_BUILD=yes SKIP_DEBUG_BUILD=yes EXTRA_CFLAGS="-DDEFAULT_LIBPATH=\\\"/usr/pkg/lib/jni:/usr/pkg/lib:/lib:/usr/lib\\\"" USETOOLS=no CC=gcc CFLAGS=-O2\ -I/usr/pkg/include\ -I/usr/X11R7/include\ -I/usr/include\ -I/usr/X11R7/include/freetype2\ -I/usr/include/krb5 CPPFLAGS=-I/usr/pkg/include\ -I/usr/X11R7/inclu
 de\ -I/usr/include\ -I/usr/X11R7/include/freetype2\ -I/usr/include/krb5 CXX=c++ CXXFLAGS=-O2\ -I/usr/pkg/include\ -I/usr/X11R7/include\ -I/usr/include\ -I/usr/X11R7/include/freetype2\ -I/usr/include/krb5 COMPILER_RPATH_FLAG=-Wl,-R F77=g77 FC=g77 FFLAGS=-O LANG=C LC_COLLATE=C LC_CTYPE=C LC_MESSAGES=C LC_MONETARY=C LC_NUMERIC=C LC_TIME=C LDFLAGS=-L/usr/pkg/lib\ -L/usr/X11R7/lib\ -Wl,-R/usr/X11R7/lib\ -L/usr/lib\ -Wl,-R/usr/lib\ -Wl,-R/usr/pkg/lib LINKER_RPATH_FLAG=-R PATH=/scratch/lang/openjdk7/work/.wrapper/bin:/scratch/lang/openjdk7/work/.buildlink/bin:/scratch/lang/openjdk7/work/.tools/bin:/scratch/lang/openjdk7/work/apache-ant-1.8.1/bin:/scratch/lang/openjdk7/work/.gcc/bin:/usr/pkg/bin:/scratch/lang/openjdk7/work/bootstrap/bin:/bin:/usr/bin:/usr/pkg/bin:/usr/X11R7/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/pkg/sbin:/usr/local/sbin:/usr/games:/usr/pkg/lib/surfraw:/home/wiz/bin:/usr/X11R7/bin:/usr/pkg/bin:/usr/X11R7/bin PREFIX=/usr/pkg PKG_SYSCONFDIR=/usr/pkg/etc HOME=/scratch/
 lang/openjdk7/work/.home CPP=cpp LINK_ALL_LIBGCC_HACK= LOCALBASE=/usr/pkg NO_WHOLE_ARCHIVE_FLAG=-Wl,--no-whole-archive WHOLE_ARCHIVE_FLAG=-Wl,--whole-archive X11BASE=/usr/X11R7 X11PREFIX=/usr/pkg PKGMANDIR=man PKGINFODIR=info MAKECONF=/dev/null OBJECT_FMT=ELF USETOOLS=no BSD_INSTALL_PROGRAM=/usr/bin/install\ -c\ -s\ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_SCRIPT=/usr/bin/install\ -c\ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_LIB=/usr/bin/install\ -c\ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_DATA=/usr/bin/install\ -c\ -o\ pbulk\ -g\ builder\ -m\ 644 BSD_INSTALL_MAN=/usr/bin/install\ -c\ -o\ pbulk\ -g\ builder\ -m\ 644 BSD_INSTALL=/usr/bin/install BSD_INSTALL_PROGRAM_DIR=/usr/bin/install\ -d\ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_SCRIPT_DIR=/usr/bin/install\ -d\ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_LIB_DIR=/usr/bin/install\ -d\ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_DATA_DIR=/usr/bin/install\ -d\ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_MAN_DIR=/u
 sr/bin/install\ -d\ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_GAME=/usr/bin/install\ -c\ -s\ -o\ pbulk\ -g\ builder\ -m\ 2555 BSD_INSTALL_GAME_DATA=/usr/bin/install\ -c\ -o\ pbulk\ -g\ builder\ -m\ 664 BSD_INSTALL_GAME_DIR=/usr/bin/install\ -d\ -o\ pbulk\ -g\ builder\ -m\ 775 INSTALL_INFO= MAKEINFO=/scratch/lang/openjdk7/work/.tools/bin/makeinfo FLEX= BISON= PKG_CONFIG= PKG_CONFIG_LIBDIR=/scratch/lang/openjdk7/work/.buildlink/lib/pkgconfig:/scratch/lang/openjdk7/work/.buildlink/share/pkgconfig PKG_CONFIG_LOG=/scratch/lang/openjdk7/work/.pkg-config.log PKG_CONFIG_PATH= KRB5_CONFIG=/usr/bin/krb5-config WRAPPER_DEBUG=no WRAPPER_UPDATE_CACHE=yes WRAPPER_REORDER=yes VIEWBASE=/usr/pkg /usr/pkg/bin/gmake


In /bulklog/openjdk*/ the last file changes was at 3:19 and now it's 11:07.


top reports there's a java process that's been eating CPU for hours:
 4968 2001      29    0  1334M   11M CPU/7    468:20 99.02% 99.02% java


I tried attaching to the process, but gdb just hung:
# gdb /scratch/lang/openjdk7/work/bootstrap/bin/java 4968
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64--netbsd".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /scratch/lang/openjdk7/work/bootstrap/bin/java...(no debugging symbols found)...done.
Attaching to program: /scratch/lang/openjdk7/work/bootstrap/bin/java, process 4968
(no further output)
>How-To-Repeat:
cd /usr/pkgsrc/lang/openjdk7
make package


>Fix:
Not known.


>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/46165: openjdk7 hangs in build with 100% CPU
Date: Tue, 17 Apr 2012 17:14:44 +0000


 On Sat, Mar 10, 2012 at 10:15:05AM +0000, Thomas Klausner wrote:
  > While openjdk7 does take some time building (but less than an hour
  > on my machine), in my recent bulk builds it hangs very quickly with
  > a process that so far has taken over 7 hours at 100% CPU without
  > making progress.

 
 FWIW, I haven't seen this so far.

 
 but, are we really sure this isn't a Java bug?

 
 -- 
 David A. Holland
 dholland@netbsd.org

 
From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/46165: openjdk7 hangs in build with 100% CPU
Date: Tue, 17 Apr 2012 23:14:00 +0200


 On Tue, Apr 17, 2012 at 05:15:04PM +0000, David Holland wrote:
 >  FWIW, I haven't seen this so far.

 
 Ok.

 
 >  but, are we really sure this isn't a Java bug?

 
 Just because the problem is new for me and nothing changed in the
 package. Of course, that's not a proof, just an indication.
  Thomas

 
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/46165: openjdk7 hangs in build with 100% CPU
Date: Wed, 18 Apr 2012 03:43:55 +0000


 On Tue, Apr 17, 2012 at 09:15:05PM +0000, Thomas Klausner wrote:
  >  On Tue, Apr 17, 2012 at 05:15:04PM +0000, David Holland wrote:
  >  >  FWIW, I haven't seen this so far.
  >  
  >  Ok.
  >  
  >  >  but, are we really sure this isn't a Java bug?
  >  
  >  Just because the problem is new for me and nothing changed in the
  >  package. Of course, that's not a proof, just an indication.

 
 True.

 
 FWIW I've seen some occasional nonreproducible failures recently, and
 I've been considering marking it not MAKE_JOBS_SAFE, but it's not
 entirely clear if it's really a makefile problem or not. It's possible
 that this is actually the same underlying problem.

 
 -- 
 David A. Holland
 dholland@netbsd.org

 
>Unformatted:

 	

 	



NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.36 2007/11/24 03:27:39 kano Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.